Enables sandbox for all windows except main
This commit is contained in:
parent
abb839c24b
commit
e211837bcd
67 changed files with 1190 additions and 615 deletions
44
ts/window.d.ts
vendored
44
ts/window.d.ts
vendored
|
@ -3,7 +3,6 @@
|
|||
|
||||
// Captures the globals put in place by preload.js, background.js and others
|
||||
|
||||
import type { MenuItemConstructorOptions } from 'electron';
|
||||
import type { Store } from 'redux';
|
||||
import type * as Backbone from 'backbone';
|
||||
import type PQueue from 'p-queue/dist';
|
||||
|
@ -28,7 +27,7 @@ import type * as Groups from './groups';
|
|||
import type * as Crypto from './Crypto';
|
||||
import type * as Curve from './Curve';
|
||||
import type * as RemoteConfig from './RemoteConfig';
|
||||
import type * as OS from './OS';
|
||||
import type { OSType } from './util/os/shared';
|
||||
import type { getEnvironment } from './environment';
|
||||
import type { LocalizerType, ThemeType } from './types/Util';
|
||||
import type { Receipt } from './types/Receipt';
|
||||
|
@ -56,6 +55,7 @@ import type { SignalContextType } from './windows/context';
|
|||
import type * as Message2 from './types/Message2';
|
||||
import type { initializeMigrations } from './signal';
|
||||
import type { RetryPlaceholders } from './util/retryPlaceholders';
|
||||
import type { PropsPreloadType as PreferencesPropsType } from './components/Preferences';
|
||||
import type { LocaleDirection } from '../app/locale';
|
||||
|
||||
export { Long } from 'long';
|
||||
|
@ -103,21 +103,46 @@ export type FeatureFlagType = {
|
|||
GV2_MIGRATION_DISABLE_INVITE: boolean;
|
||||
};
|
||||
|
||||
type AboutWindowType = {
|
||||
type AboutWindowPropsType = {
|
||||
arch: string;
|
||||
environmentText: string;
|
||||
executeMenuRole: (role: MenuItemConstructorOptions['role']) => Promise<void>;
|
||||
hasCustomTitleBar: boolean;
|
||||
i18n: LocalizerType;
|
||||
version: string;
|
||||
platform: string;
|
||||
};
|
||||
|
||||
type DebugLogWindowPropsType = {
|
||||
downloadLog: (text: string) => unknown;
|
||||
fetchLogs: () => Promise<string>;
|
||||
uploadLogs: (text: string) => Promise<string>;
|
||||
};
|
||||
|
||||
type PermissionsWindowPropsType = {
|
||||
forCamera: boolean;
|
||||
forCalling: boolean;
|
||||
onAccept: () => void;
|
||||
onClose: () => void;
|
||||
};
|
||||
|
||||
type ScreenShareWindowPropsType = {
|
||||
onStopSharing: () => void;
|
||||
presentedSourceName: string;
|
||||
};
|
||||
|
||||
type SettingsOnRenderCallbackType = (props: PreferencesPropsType) => void;
|
||||
|
||||
type SettingsWindowPropsType = {
|
||||
onRender: (callback: SettingsOnRenderCallbackType) => void;
|
||||
};
|
||||
|
||||
export type SignalCoreType = {
|
||||
AboutWindow?: AboutWindowType;
|
||||
AboutWindowProps?: AboutWindowPropsType;
|
||||
Crypto: typeof Crypto;
|
||||
Curve: typeof Curve;
|
||||
Data: typeof Data;
|
||||
DebugLogWindowProps?: DebugLogWindowPropsType;
|
||||
Groups: typeof Groups;
|
||||
PermissionsWindowProps?: PermissionsWindowPropsType;
|
||||
RemoteConfig: typeof RemoteConfig;
|
||||
ScreenShareWindowProps?: ScreenShareWindowPropsType;
|
||||
Services: {
|
||||
calling: CallingClass;
|
||||
initializeGroupCredentialFetcher: () => Promise<void>;
|
||||
|
@ -127,6 +152,7 @@ export type SignalCoreType = {
|
|||
lightSessionResetQueue?: PQueue;
|
||||
storage: typeof StorageService;
|
||||
};
|
||||
SettingsWindowProps?: SettingsWindowPropsType;
|
||||
Migrations: ReturnType<typeof initializeMigrations>;
|
||||
Types: {
|
||||
Message: typeof Message2;
|
||||
|
@ -137,7 +163,7 @@ export type SignalCoreType = {
|
|||
Components: {
|
||||
ConfirmationDialog: typeof ConfirmationDialog;
|
||||
};
|
||||
OS: typeof OS;
|
||||
OS: OSType;
|
||||
State: {
|
||||
createStore: typeof createStore;
|
||||
Roots: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue