This commit is contained in:
syuilo
2025-03-10 11:23:15 +09:00
parent 9842eb2eeb
commit cef7575b76
34 changed files with 176 additions and 176 deletions

View File

@@ -23,11 +23,11 @@ export async function addTheme(theme: Theme): Promise<void> {
if (themes.some(t => t.id === theme.id)) {
throw new Error('already exists');
}
prefer.set('themes', [...themes, theme]);
prefer.commit('themes', [...themes, theme]);
}
export async function removeTheme(theme: Theme): Promise<void> {
if ($i == null) return;
const themes = getThemes().filter(t => t.id !== theme.id);
prefer.set('themes', themes);
prefer.commit('themes', themes);
}