Respect system theme in debug log modal
This commit is contained in:
parent
1913752fa0
commit
70afb58510
2 changed files with 21 additions and 2 deletions
|
@ -10,7 +10,25 @@ $(document).on('keydown', e => {
|
|||
});
|
||||
|
||||
const $body = $(document.body);
|
||||
$body.addClass(`${window.theme}-theme`);
|
||||
|
||||
async function applyTheme() {
|
||||
const theme = await window.themeSetting.getValue();
|
||||
document.body.classList.remove('light-theme');
|
||||
document.body.classList.remove('dark-theme');
|
||||
document.body.classList.add(
|
||||
`${
|
||||
theme === 'system'
|
||||
? window.SignalContext.nativeThemeListener.getSystemTheme()
|
||||
: theme
|
||||
}-theme`
|
||||
);
|
||||
}
|
||||
|
||||
applyTheme();
|
||||
|
||||
window.SignalContext.nativeThemeListener.subscribe(() => {
|
||||
applyTheme();
|
||||
});
|
||||
|
||||
// got.js appears to need this to successfully submit debug logs to the cloud
|
||||
window.setImmediate = window.nodeSetImmediate;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue