Skip to content

main/settings-file

exportSettings(sender, definitions, settings): Promise<boolean>

Defined in: app/src/main/settings-file.ts:43

Saves the settings that the user changed, in a file that the user picks.

WebContents

The settings page.

readonly SettingDefinition<unknown>[]

The settings that the page shows.

SettingsService

The settings.

Promise<boolean>

Whether the file was saved.


importSettings(sender, shown, settings): Promise<{ applied: number; ok: true; skipped: number; } | { error: "invalid" | "canceled"; ok: false; }>

Defined in: app/src/main/settings-file.ts:73

Reads settings from a file that the user picks. Settings that a policy fixes, that the page does not show or whose value is not valid are skipped; nothing else changes.

WebContents

The settings page.

ReadonlyMap<string, SettingDefinition<unknown>>

The settings that the page shows, by key.

SettingsService

The settings.

Promise<{ applied: number; ok: true; skipped: number; } | { error: "invalid" | "canceled"; ok: false; }>