signal-desktop/.storybook/preview-head.html

64 lines
1.7 KiB
HTML
Raw Normal View History

2023-01-03 11:55:46 -08:00
<!-- Copyright 2019 Signal Messenger, LLC -->
2020-10-30 15:34:04 -05:00
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
2019-12-17 15:25:57 -05:00
<!-- prettier-ignore -->
<link rel="stylesheet" href="../stylesheets/manifest.css" />
<link
href="../node_modules/@indutny/frameless-titlebar/dist/styles.css"
rel="stylesheet"
type="text/css"
/>
2020-09-24 08:11:38 -07:00
<script>
2022-07-05 09:44:53 -07:00
// eslint-disable-next-line
const noop = () => {};
2023-03-28 13:31:24 -07:00
window.Whisper = window.Whisper || {};
window.Whisper.events = {
on: noop,
};
2021-09-17 17:54:41 -04:00
window.SignalWindow = window.SignalWindow || {};
window.SignalWindow.log = {
2020-09-24 08:11:38 -07:00
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 = {
2022-07-05 09:44:53 -07:00
activeWindowService: {
isActive: () => true,
2022-07-05 09:44:53 -07:00
registerForActive: noop,
unregisterForActive: noop,
registerForChange: noop,
unregisterForChange: noop,
},
nativeThemeListener: {
getSystemValue: async () => 'light',
2022-07-05 09:44:53 -07:00
subscribe: noop,
unsubscribe: noop,
},
Settings: {
themeSetting: {
getValue: async () => 'light',
},
2022-07-19 12:03:25 -07:00
waitForChange: () => new Promise(noop),
},
OS: {
2022-07-05 09:44:53 -07:00
hasCustomTitleBar: () => false,
},
2023-07-20 05:14:08 +02:00
usernames: {
hash: x => x,
},
2023-04-06 14:49:24 -07:00
config: {},
};
2023-04-03 13:16:27 -07:00
window.ConversationController = window.ConversationController || {};
2023-08-16 22:54:39 +02:00
window.ConversationController.isSignalConversationId = () => false;
2023-04-03 13:16:27 -07:00
window.ConversationController.onConvoMessageMount = noop;
2023-03-01 14:00:50 -05:00
window.getPreferredSystemLocales = () => ['en'];
2023-05-23 01:20:24 +02:00
window.getResolvedMessagesLocaleDirection = () => 'ltr';
2021-06-23 13:18:47 -05:00
</script>