Skip to content

shared/ipc/settings-contracts

SettingView = v.InferOutput<typeof SettingView>

Defined in: app/src/shared/ipc/settings-contracts.ts:13

A setting as the settings page shows it.

const ExportSettings: RequestContract<{ }, { saved: boolean; }>

Defined in: app/src/shared/ipc/settings-contracts.ts:65

Saves the settings that the user changed to a file that the user picks.


const GetSettings: RequestContract<{ }, { accents: object[]; settings: object[]; }>

Defined in: app/src/shared/ipc/settings-contracts.ts:29

Returns every setting that the settings page shows, and the accent swatches.


const ImportSettings: RequestContract<{ }, { applied: number; ok: true; skipped: number; } | { error: "invalid" | "canceled"; ok: false; }>

Defined in: app/src/shared/ipc/settings-contracts.ts:74

Reads settings from a file that the user picks, and tells what it changed.


const ResetSettings: RequestContract<{ keys: string[]; }, null>

Defined in: app/src/shared/ipc/settings-contracts.ts:56

Sets settings back to their defaults; settings that a policy fixes stay as they are.


const RestartBrowser: RequestContract<{ }, null>

Defined in: app/src/shared/ipc/settings-contracts.ts:86

Quits the browser and starts it again with the open tabs, so changed settings take effect.


const SetSetting: RequestContract<{ key: string; value: unknown; }, { ok: true; } | { error: "invalid" | "unknown" | "locked"; ok: false; }>

Defined in: app/src/shared/ipc/settings-contracts.ts:37

Changes a setting; the browser process validates the value against its schema.


const SettingsChanged: EventContract<{ settings: object[]; }>

Defined in: app/src/shared/ipc/settings-contracts.ts:49

Sent to the settings page when settings changed, also in another window or by policy.


const SettingView: StrictObjectSchema<{ changed: BooleanSchema<undefined>; key: SchemaWithPipe<readonly [StringSchema<undefined>, RegexAction<string, undefined>]>; locked: BooleanSchema<undefined>; recommended: BooleanSchema<undefined>; restart: BooleanSchema<undefined>; value: UnknownSchema; }, undefined>

Defined in: app/src/shared/ipc/settings-contracts.ts:13

A setting as the settings page shows it: its key, its effective value, whether a mandatory policy sets the value, so it cannot be changed, whether the user set a value other than the default, whether the value is the one that a recommended policy suggests, and whether the value differs from the one that the browser started with and takes effect only after a restart.