refactor(frontend): rename store.set -> store.commit

This commit is contained in:
syuilo
2025-03-10 11:27:07 +09:00
parent 08f7e7d9b3
commit b200743845
20 changed files with 113 additions and 113 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);
}