mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-13 07:04:39 +00:00
15 lines
453 B
TypeScript
15 lines
453 B
TypeScript
import localforage from 'localforage';
|
|
import type { CustomTheme } from '@/types/CustomThemes';
|
|
import { applyTheme } from './applyTheme';
|
|
import { settingsState } from '@/seqta/utils/listeners/SettingsState';
|
|
|
|
|
|
export const enableCurrentTheme = async () => {
|
|
if (settingsState.selectedTheme) {
|
|
const theme = await localforage.getItem(settingsState.selectedTheme) as CustomTheme;
|
|
if (theme) {
|
|
await applyTheme(theme, true);
|
|
}
|
|
}
|
|
};
|