2023-01-03 19:55:46 +00:00
|
|
|
// Copyright 2018 Signal Messenger, LLC
|
2021-09-16 15:52:56 +00:00
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2023-04-20 21:23:19 +00:00
|
|
|
import { contextBridge } from 'electron';
|
|
|
|
import { MinimalSignalContext } from '../minimalContext';
|
2023-03-14 15:55:31 +00:00
|
|
|
import { config } from '../../context/config';
|
|
|
|
import { environment } from '../../context/environment';
|
|
|
|
|
|
|
|
const environments: Array<string> = [environment];
|
|
|
|
|
|
|
|
if (config.appInstance) {
|
|
|
|
environments.push(String(config.appInstance));
|
|
|
|
}
|
|
|
|
|
|
|
|
const Signal = {
|
2023-04-20 21:23:19 +00:00
|
|
|
AboutWindowProps: {
|
2024-11-06 02:05:24 +00:00
|
|
|
appEnv: environments.join(' - '),
|
2023-04-20 21:23:19 +00:00
|
|
|
arch: process.arch,
|
|
|
|
platform: process.platform,
|
2023-03-14 15:55:31 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
contextBridge.exposeInMainWorld('Signal', Signal);
|
2023-04-20 21:23:19 +00:00
|
|
|
contextBridge.exposeInMainWorld('SignalContext', MinimalSignalContext);
|