Details for #188

This commit is contained in:
the-djmaze 2023-02-01 11:09:18 +01:00
parent 7236412e48
commit 5259da41f2
3 changed files with 17 additions and 16 deletions

View file

@ -43,18 +43,21 @@ export const
},
url = cssLink(value);
clearTimeout(__themeTimer);
if (themeStyle.dataset.name != value) {
clearTimeout(__themeTimer);
themeTrigger(SaveSettingStatus.Saving);
themeTrigger(SaveSettingStatus.Saving);
rl.app.Remote.abort('theme').get('theme', url)
.then(data => {
if (2 === arrayLength(data)) {
themeStyle.textContent = data[1];
themeTrigger(SaveSettingStatus.Success);
}
clearTimer();
}, clearTimer);
rl.app.Remote.abort('theme').get('theme', url)
.then(data => {
if (2 === arrayLength(data)) {
themeStyle.textContent = data[1];
themeStyle.dataset.name = value;
themeTrigger(SaveSettingStatus.Success);
}
clearTimer();
}, clearTimer);
}
},
convertThemeName = theme => theme.replace(/@[a-z]+$/, '').replace(/([A-Z])/g, ' $1').trim();