signal-desktop/.storybook/preview-head.html
2023-08-21 09:30:33 -07:00

63 lines
1.7 KiB
HTML

<!-- Copyright 2019 Signal Messenger, LLC -->
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
<!-- prettier-ignore -->
<link rel="stylesheet" href="../stylesheets/manifest.css" />
<link
href="../node_modules/@indutny/frameless-titlebar/dist/styles.css"
rel="stylesheet"
type="text/css"
/>
<script>
// eslint-disable-next-line
const noop = () => {};
window.Whisper = window.Whisper || {};
window.Whisper.events = {
on: noop,
};
window.SignalWindow = window.SignalWindow || {};
window.SignalWindow.log = {
fatal: console.error.bind(console),
error: console.error.bind(console),
warn: console.warn.bind(console),
info: console.info.bind(console),
debug: console.debug.bind(console),
trace: console.trace.bind(console),
};
window.SignalContext = {
activeWindowService: {
isActive: () => true,
registerForActive: noop,
unregisterForActive: noop,
registerForChange: noop,
unregisterForChange: noop,
},
nativeThemeListener: {
getSystemValue: async () => 'light',
subscribe: noop,
unsubscribe: noop,
},
Settings: {
themeSetting: {
getValue: async () => 'light',
},
waitForChange: () => new Promise(noop),
},
OS: {
hasCustomTitleBar: () => false,
},
usernames: {
hash: x => x,
},
config: {},
};
window.ConversationController = window.ConversationController || {};
window.ConversationController.isSignalConversationId = () => false;
window.ConversationController.onConvoMessageMount = noop;
window.getPreferredSystemLocales = () => ['en'];
window.getResolvedMessagesLocaleDirection = () => 'ltr';
</script>