diff --git a/about.html b/about.html index a4156e371..a8122f4e5 100644 --- a/about.html +++ b/about.html @@ -29,6 +29,7 @@
+ diff --git a/debug_log.html b/debug_log.html index a55265e40..c9f18a804 100644 --- a/debug_log.html +++ b/debug_log.html @@ -33,6 +33,7 @@ type="application/javascript" src="ts/windows/applyTheme.js" > + diff --git a/settings.html b/settings.html index 4cec0187b..a1a26d341 100644 --- a/settings.html +++ b/settings.html @@ -33,6 +33,7 @@ type="application/javascript" src="ts/windows/applyTheme.js" > + diff --git a/ts/set_os_class.ts b/ts/set_os_class.ts index 5d5ba2c4f..297f343e8 100644 --- a/ts/set_os_class.ts +++ b/ts/set_os_class.ts @@ -3,11 +3,11 @@ { let className: string; - if (window.Signal.OS.isWindows()) { + if (window.SignalContext.OS.isWindows()) { className = 'os-windows'; - } else if (window.Signal.OS.isMacOS()) { + } else if (window.SignalContext.OS.isMacOS()) { className = 'os-macos'; - } else if (window.Signal.OS.isLinux()) { + } else if (window.SignalContext.OS.isLinux()) { className = 'os-linux'; } else { throw new Error('Unexpected operating system; not applying '); diff --git a/ts/windows/context.ts b/ts/windows/context.ts index 76a0fd089..5f623f99a 100644 --- a/ts/windows/context.ts +++ b/ts/windows/context.ts @@ -27,6 +27,7 @@ import { createSetting } from '../util/preload'; import { initialize as initializeLogging } from '../logging/set_up_renderer_logging'; import { waitForSettingsChange } from './waitForSettingsChange'; import { createNativeThemeListener } from '../context/createNativeThemeListener'; +import { isWindows, isLinux, isMacOS } from '../OS'; const config = url.parse(window.location.toString(), true).query; const { locale } = config; @@ -56,6 +57,11 @@ export type SignalContextType = { themeSetting: SettingType; waitForChange: () => Promise; }; + OS: { + isWindows: typeof isWindows; + isLinux: typeof isLinux; + isMacOS: typeof isMacOS; + }; config: ParsedUrlQuery; getAppInstance: () => string | undefined; getEnvironment: () => string; @@ -77,6 +83,11 @@ export const SignalContext: SignalContextType = { themeSetting: createSetting('themeSetting', { setter: false }), waitForChange: waitForSettingsChange, }, + OS: { + isWindows, + isLinux, + isMacOS, + }, bytes: new Bytes(), config, crypto: new Crypto(),