|
|
@ -45,6 +45,8 @@ new Vue({ |
|
|
currentRelease: null, |
|
|
currentRelease: null, |
|
|
latestRelease: null, |
|
|
latestRelease: null, |
|
|
|
|
|
|
|
|
|
|
|
isDark: null, |
|
|
|
|
|
|
|
|
chartOptions: { |
|
|
chartOptions: { |
|
|
chart: { |
|
|
chart: { |
|
|
background: 'transparent', |
|
|
background: 'transparent', |
|
|
@ -239,6 +241,16 @@ new Vue({ |
|
|
.catch(err => alert(err.message || err.toString())) |
|
|
.catch(err => alert(err.message || err.toString())) |
|
|
.finally(() => this.refresh().catch(console.error)); |
|
|
.finally(() => this.refresh().catch(console.error)); |
|
|
}, |
|
|
}, |
|
|
|
|
|
toggleTheme() { |
|
|
|
|
|
if (this.isDark) { |
|
|
|
|
|
localStorage.theme = "light"; |
|
|
|
|
|
document.documentElement.classList.remove('dark'); |
|
|
|
|
|
} else { |
|
|
|
|
|
localStorage.theme = "dark"; |
|
|
|
|
|
document.documentElement.classList.add('dark'); |
|
|
|
|
|
} |
|
|
|
|
|
this.isDark = !this.isDark; |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
filters: { |
|
|
filters: { |
|
|
bytes, |
|
|
bytes, |
|
|
@ -247,6 +259,11 @@ new Vue({ |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
|
|
|
this.isDark = false; |
|
|
|
|
|
if (localStorage.theme === 'dark') { |
|
|
|
|
|
this.isDark = true; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.api = new API(); |
|
|
this.api = new API(); |
|
|
this.api.getSession() |
|
|
this.api.getSession() |
|
|
.then(session => { |
|
|
.then(session => { |
|
|
|