mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-21 23:53:52 +00:00
Default to dark theme
This commit is contained in:
parent
d393cd948f
commit
65117a7f5f
|
@ -1,5 +1,5 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en" data-theme="light">
|
||||
<html lang="en" data-theme="dark">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
|
|
|
@ -62,7 +62,7 @@ export default Vue.extend({
|
|||
this.setTheme(e.target.name.trim());
|
||||
},
|
||||
toggleNight() {
|
||||
this.setTheme(this.activeTheme === 'bootstrap_dark' ? 'bootstrap' : 'bootstrap_dark');
|
||||
this.setTheme(this.activeTheme === 'bootstrap' ? 'bootstrap_dark' : 'bootstrap');
|
||||
},
|
||||
setTheme(themeName) {
|
||||
// If theme is already active, do nothing.
|
||||
|
@ -74,7 +74,7 @@ export default Vue.extend({
|
|||
const bw = Array.from(styles).filter((w) => w.textContent?.includes('bootswatch'));
|
||||
document.documentElement.setAttribute(
|
||||
'data-theme',
|
||||
themeName.toLowerCase() === 'bootstrap_dark' ? 'dark' : 'light',
|
||||
themeName.toLowerCase() === 'bootstrap' ? 'light' : 'dark',
|
||||
);
|
||||
// Reset all bootswatch styles
|
||||
bw.forEach((style, index) => {
|
||||
|
|
|
@ -26,7 +26,7 @@ export default new Vuex.Store({
|
|||
if (theme) {
|
||||
return theme.dark;
|
||||
}
|
||||
return false;
|
||||
return true;
|
||||
},
|
||||
getChartTheme(state, getters) {
|
||||
return getters.isDarkTheme ? 'dark' : 'light';
|
||||
|
|
Loading…
Reference in New Issue
Block a user