mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-22 19:15:15 +00:00
chore: cleanup Themes
This commit is contained in:
parent
2bc363183e
commit
b215b20724
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user