Added slim download tab toggle in settings
This commit is contained in:
parent
e703ee66a7
commit
45375e2f4a
@ -518,6 +518,10 @@ <h2 id="settings_heading">Settings</h2>
|
|||||||
<input type="checkbox" v-model="darkMode">
|
<input type="checkbox" v-model="darkMode">
|
||||||
<span class="checkbox_text">Dark Mode</span>
|
<span class="checkbox_text">Dark Mode</span>
|
||||||
</label>
|
</label>
|
||||||
|
<label class="with_checkbox">
|
||||||
|
<input type="checkbox" v-model="slimDownloads">
|
||||||
|
<span class="checkbox_text">Slim download tab</span>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="settings_group">
|
<div class="settings_group">
|
||||||
|
@ -96,6 +96,9 @@ function startApp() {
|
|||||||
socket.emit('login', arl)
|
socket.emit('login', arl)
|
||||||
$('#login_input_arl').val(arl)
|
$('#login_input_arl').val(arl)
|
||||||
}
|
}
|
||||||
|
if ('true' === localStorage.getItem('slimDownloads')) {
|
||||||
|
document.getElementById("download_list").classList.add("slim")
|
||||||
|
}
|
||||||
|
|
||||||
// Open default tab
|
// Open default tab
|
||||||
document.getElementById('main_home_tablink').click()
|
document.getElementById('main_home_tablink').click()
|
||||||
|
@ -16,9 +16,20 @@ const SettingsTab = new Vue({
|
|||||||
},
|
},
|
||||||
set(wantDarkMode) {
|
set(wantDarkMode) {
|
||||||
document.documentElement.setAttribute('data-theme', wantDarkMode ? 'dark' : 'default')
|
document.documentElement.setAttribute('data-theme', wantDarkMode ? 'dark' : 'default')
|
||||||
|
|
||||||
localStorage.setItem('darkMode', wantDarkMode)
|
localStorage.setItem('darkMode', wantDarkMode)
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
slimDownloads: {
|
||||||
|
get() {
|
||||||
|
return 'true' === localStorage.getItem('slimDownloads')
|
||||||
|
},
|
||||||
|
set(wantSlimDownloads) {
|
||||||
|
if (wantSlimDownloads)
|
||||||
|
document.getElementById("download_list").classList.add("slim")
|
||||||
|
else
|
||||||
|
document.getElementById("download_list").classList.remove("slim")
|
||||||
|
localStorage.setItem('slimDownloads', wantSlimDownloads)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
Loading…
Reference in New Issue
Block a user