forked from misskey-dev/misskey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enhance(dev): 開発モード時にlocaleと型定義が自動的に再生成されるように (misskey-dev#12481)
* enhance: localeを任意のタイミングでリビルドできるように * enhance: localeも監視し、必要であればlocaleをリビルドするように * feat: devモードの時のみナビゲーションバーからキャッシュクリアができるように * refactor: キャッシュクリア部分を共通化 * fix: localesのファイル変更イベントが取れないのを修正 * fix: replaceAllでコケるのを修正 * change: 開発モードに関係なくナビゲーションバーからキャッシュクリアできるように * refactor: 必要のないリビルドをしないように * update: CHANGELOG.md --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
- Loading branch information
1 parent
cc1644d
commit 7df163b
Showing
8 changed files
with
80 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { unisonReload } from '@/scripts/unison-reload.js'; | ||
import * as os from '@/os.js'; | ||
import { miLocalStorage } from '@/local-storage.js'; | ||
import { fetchCustomEmojis } from '@/custom-emojis.js'; | ||
|
||
export async function clearCache() { | ||
os.waiting(); | ||
miLocalStorage.removeItem('locale'); | ||
miLocalStorage.removeItem('theme'); | ||
miLocalStorage.removeItem('emojis'); | ||
miLocalStorage.removeItem('lastEmojisFetchedAt'); | ||
await fetchCustomEmojis(true); | ||
unisonReload(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters