Make sure windows with titlebar have OS class
This commit is contained in:
parent
5634601554
commit
9975758fde
5 changed files with 17 additions and 3 deletions
|
@ -29,6 +29,7 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
<script type="text/javascript" src="ts/set_os_class.js"></script>
|
||||||
<script type="application/javascript" src="ts/windows/init.js"></script>
|
<script type="application/javascript" src="ts/windows/init.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
type="application/javascript"
|
type="application/javascript"
|
||||||
src="ts/windows/applyTheme.js"
|
src="ts/windows/applyTheme.js"
|
||||||
></script>
|
></script>
|
||||||
|
<script type="text/javascript" src="ts/set_os_class.js"></script>
|
||||||
<script type="application/javascript" src="ts/windows/init.js"></script>
|
<script type="application/javascript" src="ts/windows/init.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
type="application/javascript"
|
type="application/javascript"
|
||||||
src="ts/windows/applyTheme.js"
|
src="ts/windows/applyTheme.js"
|
||||||
></script>
|
></script>
|
||||||
|
<script type="text/javascript" src="ts/set_os_class.js"></script>
|
||||||
<script type="application/javascript" src="ts/windows/init.js"></script>
|
<script type="application/javascript" src="ts/windows/init.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -3,11 +3,11 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
let className: string;
|
let className: string;
|
||||||
if (window.Signal.OS.isWindows()) {
|
if (window.SignalContext.OS.isWindows()) {
|
||||||
className = 'os-windows';
|
className = 'os-windows';
|
||||||
} else if (window.Signal.OS.isMacOS()) {
|
} else if (window.SignalContext.OS.isMacOS()) {
|
||||||
className = 'os-macos';
|
className = 'os-macos';
|
||||||
} else if (window.Signal.OS.isLinux()) {
|
} else if (window.SignalContext.OS.isLinux()) {
|
||||||
className = 'os-linux';
|
className = 'os-linux';
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Unexpected operating system; not applying ');
|
throw new Error('Unexpected operating system; not applying ');
|
||||||
|
|
|
@ -27,6 +27,7 @@ import { createSetting } from '../util/preload';
|
||||||
import { initialize as initializeLogging } from '../logging/set_up_renderer_logging';
|
import { initialize as initializeLogging } from '../logging/set_up_renderer_logging';
|
||||||
import { waitForSettingsChange } from './waitForSettingsChange';
|
import { waitForSettingsChange } from './waitForSettingsChange';
|
||||||
import { createNativeThemeListener } from '../context/createNativeThemeListener';
|
import { createNativeThemeListener } from '../context/createNativeThemeListener';
|
||||||
|
import { isWindows, isLinux, isMacOS } from '../OS';
|
||||||
|
|
||||||
const config = url.parse(window.location.toString(), true).query;
|
const config = url.parse(window.location.toString(), true).query;
|
||||||
const { locale } = config;
|
const { locale } = config;
|
||||||
|
@ -56,6 +57,11 @@ export type SignalContextType = {
|
||||||
themeSetting: SettingType<IPCEventsValuesType['themeSetting']>;
|
themeSetting: SettingType<IPCEventsValuesType['themeSetting']>;
|
||||||
waitForChange: () => Promise<void>;
|
waitForChange: () => Promise<void>;
|
||||||
};
|
};
|
||||||
|
OS: {
|
||||||
|
isWindows: typeof isWindows;
|
||||||
|
isLinux: typeof isLinux;
|
||||||
|
isMacOS: typeof isMacOS;
|
||||||
|
};
|
||||||
config: ParsedUrlQuery;
|
config: ParsedUrlQuery;
|
||||||
getAppInstance: () => string | undefined;
|
getAppInstance: () => string | undefined;
|
||||||
getEnvironment: () => string;
|
getEnvironment: () => string;
|
||||||
|
@ -77,6 +83,11 @@ export const SignalContext: SignalContextType = {
|
||||||
themeSetting: createSetting('themeSetting', { setter: false }),
|
themeSetting: createSetting('themeSetting', { setter: false }),
|
||||||
waitForChange: waitForSettingsChange,
|
waitForChange: waitForSettingsChange,
|
||||||
},
|
},
|
||||||
|
OS: {
|
||||||
|
isWindows,
|
||||||
|
isLinux,
|
||||||
|
isMacOS,
|
||||||
|
},
|
||||||
bytes: new Bytes(),
|
bytes: new Bytes(),
|
||||||
config,
|
config,
|
||||||
crypto: new Crypto(),
|
crypto: new Crypto(),
|
||||||
|
|
Loading…
Reference in a new issue