// Copyright 2023 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import ReactDOM from 'react-dom'; import type { PropsPreloadType } from '../../components/Preferences'; import { i18n } from '../sandboxedInit'; import { Preferences } from '../../components/Preferences'; import { startInteractionMode } from '../../services/InteractionMode'; import { strictAssert } from '../../util/assert'; import { parseEnvironment, setEnvironment } from '../../environment'; const { SettingsWindowProps } = window.Signal; strictAssert(SettingsWindowProps, 'window values not provided'); startInteractionMode(); setEnvironment( parseEnvironment(window.SignalContext.getEnvironment()), window.SignalContext.isTestOrMockEnvironment() ); SettingsWindowProps.onRender( ({ addCustomColor, availableCameras, availableLocales, availableMicrophones, availableSpeakers, blockedCount, closeSettings, customColors, defaultConversationColor, deviceName, phoneNumber, doDeleteAllData, doneRendering, editCustomColor, getConversationsWithCustomColor, hasAudioNotifications, hasAutoConvertEmoji, hasAutoDownloadUpdate, hasAutoLaunch, hasCallNotifications, hasCallRingtoneNotification, hasCountMutedConversations, hasHideMenuBar, hasIncomingCallNotifications, hasLinkPreviews, hasMediaCameraPermissions, hasMediaPermissions, hasMessageAudio, hasMinimizeToAndStartInSystemTray, hasMinimizeToSystemTray, hasNotificationAttention, hasNotifications, hasReadReceipts, hasRelayCalls, hasSpellCheck, hasStoriesDisabled, hasTextFormatting, hasTypingIndicators, initialSpellCheckSetting, isAutoDownloadUpdatesSupported, isAutoLaunchSupported, isHideMenuBarSupported, isMinimizeToAndStartInSystemTraySupported, isNotificationAttentionSupported, isSyncSupported, isSystemTraySupported, lastSyncTime, makeSyncRequest, notificationContent, onAudioNotificationsChange, onAutoConvertEmojiChange, onAutoDownloadUpdateChange, onAutoLaunchChange, onCallNotificationsChange, onCallRingtoneNotificationChange, onCountMutedConversationsChange, onHasStoriesDisabledChanged, onHideMenuBarChange, onIncomingCallNotificationsChange, onLastSyncTimeChange, onLocaleChange, onMediaCameraPermissionsChange, onMediaPermissionsChange, onMessageAudioChange, onMinimizeToAndStartInSystemTrayChange, onMinimizeToSystemTrayChange, onNotificationAttentionChange, onNotificationContentChange, onNotificationsChange, onRelayCallsChange, onSelectedCameraChange, onSelectedMicrophoneChange, onSelectedSpeakerChange, onSentMediaQualityChange, onSpellCheckChange, onTextFormattingChange, onThemeChange, onUniversalExpireTimerChange, onWhoCanFindMeChange, onWhoCanSeeMeChange, onZoomFactorChange, preferredSystemLocales, removeCustomColor, removeCustomColorOnConversations, resetAllChatColors, resetDefaultChatColor, resolvedLocale, selectedCamera, selectedMicrophone, selectedSpeaker, sentMediaQualitySetting, setGlobalDefaultConversationColor, localeOverride, themeSetting, universalExpireTimer, whoCanFindMe, whoCanSeeMe, zoomFactor, }: PropsPreloadType) => { ReactDOM.render( , document.getElementById('app') ); } );