2021-08-18 20:08:14 +00:00
|
|
|
// Copyright 2017-2021 Signal Messenger, LLC
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
|
|
|
import { ipcRenderer as ipc } from 'electron';
|
|
|
|
|
|
|
|
import { installCallback, installSetting } from '../util/preload';
|
|
|
|
|
|
|
|
// ChatColorPicker redux hookups
|
|
|
|
installCallback('getCustomColors');
|
|
|
|
installCallback('getConversationsWithCustomColor');
|
|
|
|
installCallback('addCustomColor');
|
|
|
|
installCallback('editCustomColor');
|
|
|
|
installCallback('removeCustomColor');
|
|
|
|
installCallback('removeCustomColorOnConversations');
|
|
|
|
installCallback('resetAllChatColors');
|
|
|
|
installCallback('resetDefaultChatColor');
|
|
|
|
installCallback('setGlobalDefaultConversationColor');
|
|
|
|
installCallback('getDefaultConversationColor');
|
2021-09-07 19:42:17 +00:00
|
|
|
installCallback('persistZoomFactor');
|
2021-09-08 20:39:14 +00:00
|
|
|
installCallback('closeDB');
|
2021-08-18 20:08:14 +00:00
|
|
|
|
|
|
|
// Getters only. These are set by the primary device
|
|
|
|
installSetting('blockedCount', {
|
|
|
|
setter: false,
|
|
|
|
});
|
|
|
|
installSetting('linkPreviewSetting', {
|
|
|
|
setter: false,
|
|
|
|
});
|
|
|
|
installSetting('phoneNumberDiscoverabilitySetting', {
|
|
|
|
setter: false,
|
|
|
|
});
|
|
|
|
installSetting('phoneNumberSharingSetting', {
|
|
|
|
setter: false,
|
|
|
|
});
|
|
|
|
installSetting('readReceiptSetting', {
|
|
|
|
setter: false,
|
|
|
|
});
|
|
|
|
installSetting('typingIndicatorSetting', {
|
|
|
|
setter: false,
|
|
|
|
});
|
|
|
|
|
|
|
|
installSetting('alwaysRelayCalls');
|
|
|
|
installSetting('audioNotification');
|
2021-08-19 22:56:29 +00:00
|
|
|
installSetting('autoDownloadUpdate');
|
2021-08-18 20:08:14 +00:00
|
|
|
installSetting('autoLaunch');
|
|
|
|
installSetting('countMutedConversations');
|
|
|
|
installSetting('callRingtoneNotification');
|
|
|
|
installSetting('callSystemNotification');
|
|
|
|
installSetting('deviceName');
|
|
|
|
installSetting('hideMenuBar');
|
|
|
|
installSetting('incomingCallNotification');
|
2021-08-19 01:04:38 +00:00
|
|
|
installCallback('isPhoneNumberSharingEnabled');
|
2021-08-18 20:08:14 +00:00
|
|
|
installCallback('isPrimary');
|
|
|
|
installCallback('syncRequest');
|
|
|
|
installSetting('notificationDrawAttention');
|
|
|
|
installSetting('notificationSetting');
|
|
|
|
installSetting('spellCheck');
|
|
|
|
installSetting('lastSyncTime');
|
|
|
|
installSetting('systemTraySetting');
|
|
|
|
installSetting('themeSetting');
|
|
|
|
installSetting('universalExpireTimer');
|
|
|
|
installSetting('zoomFactor');
|
|
|
|
|
|
|
|
// Media Settings
|
|
|
|
installCallback('getAvailableIODevices');
|
|
|
|
installSetting('preferredAudioInputDevice');
|
|
|
|
installSetting('preferredAudioOutputDevice');
|
|
|
|
installSetting('preferredVideoInputDevice');
|
|
|
|
|
2021-11-10 00:56:56 +00:00
|
|
|
window.getMediaPermissions = () => ipc.invoke('settings:get:mediaPermissions');
|
2021-08-18 20:08:14 +00:00
|
|
|
|
|
|
|
window.getMediaCameraPermissions = () =>
|
2021-11-10 00:56:56 +00:00
|
|
|
ipc.invoke('settings:get:mediaCameraPermissions');
|
2022-01-11 20:02:46 +00:00
|
|
|
|
|
|
|
window.crashReports = {
|
|
|
|
getCount: () => ipc.invoke('crash-reports:get-count'),
|
|
|
|
upload: () => ipc.invoke('crash-reports:upload'),
|
|
|
|
erase: () => ipc.invoke('crash-reports:erase'),
|
|
|
|
};
|