reorganize, fix some fast refresh warnings
This commit is contained in:
@ -35,3 +35,26 @@ export function useLocale() {
|
||||
export const getLocale = () => {
|
||||
return (navigator.languages && navigator.languages[0]) ?? navigator.language ?? DefaultLocale;
|
||||
};
|
||||
export const AllLanguageCodes = [
|
||||
"en",
|
||||
"ja",
|
||||
"es",
|
||||
"hu",
|
||||
"zh-CN",
|
||||
"zh-TW",
|
||||
"fr",
|
||||
"ar",
|
||||
"it",
|
||||
"id",
|
||||
"de",
|
||||
"ru",
|
||||
"sv",
|
||||
"hr",
|
||||
"ta-IN",
|
||||
"fa-IR",
|
||||
"th",
|
||||
"pt-BR",
|
||||
"sw",
|
||||
"nl",
|
||||
"fi",
|
||||
];
|
||||
|
@ -20,13 +20,14 @@ class TaskStore extends ExternalStore<Array<UITask>> {
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
const AllTasks: Array<UITask> = [new BackupKeyTask(), new Nip5Task(), new DonateTask()];
|
||||
const AllTasks: Array<UITask> = [new BackupKeyTask(), new Nip5Task()];
|
||||
if (CONFIG.features.zapPool) {
|
||||
AllTasks.push(new NoticeZapPoolDefault());
|
||||
}
|
||||
if (CONFIG.features.subscriptions) {
|
||||
AllTasks.push(new RenewSubTask());
|
||||
}
|
||||
AllTasks.push(new DonateTask());
|
||||
AllTasks.forEach(a =>
|
||||
a.load(() => {
|
||||
this.notifyChange();
|
||||
|
Reference in New Issue
Block a user