2021-02-01 20:01:25 +00:00
|
|
|
// Copyright 2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2022-05-31 21:42:18 +00:00
|
|
|
{
|
2021-02-01 20:01:25 +00:00
|
|
|
let className: string;
|
2022-06-09 16:21:17 +00:00
|
|
|
if (window.SignalContext.OS.isWindows()) {
|
2021-02-01 20:01:25 +00:00
|
|
|
className = 'os-windows';
|
2022-06-09 16:21:17 +00:00
|
|
|
} else if (window.SignalContext.OS.isMacOS()) {
|
2021-02-01 20:01:25 +00:00
|
|
|
className = 'os-macos';
|
2022-06-09 16:21:17 +00:00
|
|
|
} else if (window.SignalContext.OS.isLinux()) {
|
2021-02-01 20:01:25 +00:00
|
|
|
className = 'os-linux';
|
|
|
|
} else {
|
|
|
|
throw new Error('Unexpected operating system; not applying ');
|
|
|
|
}
|
|
|
|
|
2022-05-31 21:42:18 +00:00
|
|
|
document.body.classList.add(className);
|
2022-07-05 16:44:53 +00:00
|
|
|
|
|
|
|
if (window.SignalContext.OS.hasCustomTitleBar()) {
|
|
|
|
document.body.classList.add('os-has-custom-titlebar');
|
|
|
|
}
|
2022-05-31 21:42:18 +00:00
|
|
|
}
|