mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-04 04:51:16 +08:00
active theme now shown in the settings page
This commit is contained in:
parent
7154d3e96d
commit
7a199010c8
1 changed files with 7 additions and 2 deletions
|
@ -9,12 +9,12 @@ function updateSettingsPage(){
|
|||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
setSettingsButton('smoothCaret', config.smoothCaret);
|
||||
setSettingsButton('quickTab', config.quickTab);
|
||||
setSettingsButton('liveWpm', config.showLiveWpm);
|
||||
setSettingsButton('keyTips', config.showKeyTips);
|
||||
setActiveThemeButton(config.theme);
|
||||
|
||||
|
||||
if (config.showKeyTips) {
|
||||
$(".pageSettings .tip").removeClass('hidden');
|
||||
|
@ -25,6 +25,11 @@ function updateSettingsPage(){
|
|||
|
||||
}
|
||||
|
||||
function setActiveThemeButton(theme) {
|
||||
$(".pageSettings .themes .theme").removeClass('active');
|
||||
$(".pageSettings .themes .theme[theme=" + theme + "]").addClass('active');
|
||||
}
|
||||
|
||||
function setSettingsButton(buttonSection,tf) {
|
||||
if (tf) {
|
||||
$(".pageSettings .section."+buttonSection+" .buttons .button.on").addClass('active');
|
||||
|
|
Loading…
Reference in a new issue