mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2026-04-28 04:13:18 +01:00
Introduce isStagingServer util method
This commit is contained in:
@@ -9,7 +9,7 @@ import type { IPCType } from '../../window.d';
|
||||
import { parseIntWithFallback } from '../../util/parseIntWithFallback';
|
||||
import { getSignalConnections } from '../../util/getSignalConnections';
|
||||
import { ThemeType } from '../../types/Util';
|
||||
import { getEnvironment, Environment } from '../../environment';
|
||||
import { Environment } from '../../environment';
|
||||
import { SignalContext } from '../context';
|
||||
import * as log from '../../logging/log';
|
||||
import { formatCountForLogging } from '../../logging/formatCountForLogging';
|
||||
@@ -48,7 +48,6 @@ window.RETRY_DELAY = false;
|
||||
|
||||
window.platform = process.platform;
|
||||
window.getTitle = () => title;
|
||||
window.getEnvironment = getEnvironment;
|
||||
window.getAppInstance = () => config.appInstance;
|
||||
window.getVersion = () => config.version;
|
||||
window.getBuildCreation = () => parseIntWithFallback(config.buildCreation, 0);
|
||||
@@ -61,8 +60,8 @@ window.getBackupServerPublicParams = () => config.backupServerPublicParams;
|
||||
window.getSfuUrl = () => config.sfuUrl;
|
||||
|
||||
let title = config.name;
|
||||
if (getEnvironment() !== Environment.Production) {
|
||||
title += ` - ${getEnvironment()}`;
|
||||
if (config.environment !== Environment.PackagedApp) {
|
||||
title += ` - ${config.environment}`;
|
||||
}
|
||||
if (config.appInstance) {
|
||||
title += ` - ${config.appInstance}`;
|
||||
@@ -169,7 +168,7 @@ window.logAuthenticatedConnect = () => {
|
||||
window.open = () => null;
|
||||
|
||||
// Playwright uses `eval` for `.evaluate()` API
|
||||
if (config.ciMode !== 'full' && config.environment !== 'test') {
|
||||
if (config.ciMode !== 'full' && config.environment !== Environment.Test) {
|
||||
// eslint-disable-next-line no-eval, no-multi-assign
|
||||
window.eval = global.eval = () => null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user