mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-05-08 08:58:38 +01:00
Allow .tsx files to be .std.tsx
This commit is contained in:
@@ -13,8 +13,7 @@ import { createLogger } from '../ts/logging/log.std.js';
|
||||
import { AUMID } from './startup_config.main.js';
|
||||
import type { WindowsNotificationData } from '../ts/services/notifications.preload.js';
|
||||
import OS from '../ts/util/os/osMain.node.js';
|
||||
// eslint-disable-next-line local-rules/file-suffix
|
||||
import { renderWindowsToast } from './renderWindowsToast.dom.js';
|
||||
import { renderWindowsToast } from './renderWindowsToast.std.js';
|
||||
|
||||
export { sendDummyKeystroke };
|
||||
|
||||
|
||||
@@ -19,21 +19,29 @@ function pathToUri(path: string) {
|
||||
return `file:///${encodeURI(path.replace(/\\/g, '/'))}`;
|
||||
}
|
||||
|
||||
const Toast = (props: {
|
||||
function Toast(props: {
|
||||
launch: string;
|
||||
// Note: though React doesn't like it, Windows seems to require that this be camelcase
|
||||
activationType: string;
|
||||
children: React.ReactNode;
|
||||
}) => React.createElement('toast', props);
|
||||
const Visual = (props: { children: React.ReactNode }) =>
|
||||
React.createElement('visual', props);
|
||||
const Binding = (props: { template: string; children: React.ReactNode }) =>
|
||||
React.createElement('binding', props);
|
||||
const Text = (props: { id: string; children: React.ReactNode }) =>
|
||||
React.createElement('text', props);
|
||||
const Image = (props: { id: string; src: string; 'hint-crop': string }) =>
|
||||
React.createElement('image', props);
|
||||
const Audio = (props: { src: string }) => React.createElement('audio', props);
|
||||
}) {
|
||||
return React.createElement('toast', props);
|
||||
}
|
||||
function Visual(props: { children: React.ReactNode }) {
|
||||
return React.createElement('visual', props);
|
||||
}
|
||||
function Binding(props: { template: string; children: React.ReactNode }) {
|
||||
return React.createElement('binding', props);
|
||||
}
|
||||
function Text(props: { id: string; children: React.ReactNode }) {
|
||||
return React.createElement('text', props);
|
||||
}
|
||||
function Image(props: { id: string; src: string; 'hint-crop': string }) {
|
||||
return React.createElement('image', props);
|
||||
}
|
||||
function Audio(props: { src: string }) {
|
||||
return React.createElement('audio', props);
|
||||
}
|
||||
|
||||
export function renderWindowsToast({
|
||||
avatarPath,
|
||||
Reference in New Issue
Block a user