chore: cleanup Themes

This commit is contained in:
Matthias 2024-07-05 14:36:16 +02:00
parent 2bc363183e
commit b215b20724
2 changed files with 2 additions and 11 deletions

View File

@ -19,18 +19,9 @@ export const themeList: ThemeType[] = [
},
];
export function storeCurrentTheme(themeName: string) {
window.localStorage.theme = themeName;
}
export function getTheme(theme: string): ThemeType | undefined {
if (theme !== undefined) {
return themeList.find((item) => item.name.toLowerCase() === theme.toLowerCase());
}
return undefined;
}
export function getCurrentTheme(): string {
const { theme } = window.localStorage;
return theme;
}

View File

@ -1,4 +1,4 @@
import { getCurrentTheme, getTheme } from '@/shared/themes';
import { getTheme } from '@/shared/themes';
import axios from 'axios';
import { UiVersion } from '@/types';
import { FtWsMessageTypes } from '@/types/wsMessageTypes';
@ -25,7 +25,7 @@ export const useSettingsStore = defineStore('uiSettings', {
openTradesInTitle: OpenTradeVizOptions.showPill as string,
timezone: 'UTC',
backgroundSync: true,
currentTheme: getCurrentTheme(),
currentTheme: 'dark',
_uiVersion: 'dev',
useHeikinAshiCandles: false,
useReducedPairCalls: true,