reorganize, fix some fast refresh warnings

This commit is contained in:
Martti Malmi
2024-01-10 18:00:26 +02:00
parent 071eed0d8c
commit baf6cc34ee
16 changed files with 172 additions and 169 deletions

View File

@ -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",
];

View File

@ -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();