Permissions popup context iso
This commit is contained in:
parent
f3715411c6
commit
7b5faa1cc1
49 changed files with 562 additions and 506 deletions
21
ts/windows/applyTheme.ts
Normal file
21
ts/windows/applyTheme.ts
Normal file
|
@ -0,0 +1,21 @@
|
|||
// Copyright 2021 Signal Messenger, LLC
|
||||
// SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
async function applyTheme() {
|
||||
const theme = await window.SignalWindow.Settings.themeSetting.getValue();
|
||||
document.body.classList.remove('light-theme');
|
||||
document.body.classList.remove('dark-theme');
|
||||
document.body.classList.add(
|
||||
`${
|
||||
theme === 'system'
|
||||
? window.SignalWindow.context.nativeThemeListener.getSystemTheme()
|
||||
: theme
|
||||
}-theme`
|
||||
);
|
||||
}
|
||||
|
||||
applyTheme();
|
||||
|
||||
window.SignalWindow.context.nativeThemeListener.subscribe(() => {
|
||||
applyTheme();
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue