SettingsController
SettingsController exposes launcher settings, data-folder relocation, and native file dialogs to the frontend. It stays limited to DTO conversion and feature invocation.
- Methods: 16
- Referenced types: 3
Methods
- DetectOptimum
- GetDataFolder
- GetOptimumStatus
- GetSettings
- InspectOptimum
- MoveDataFolder
- OpenDirectory
- OpenOptimumInstallationGuide
- SelectDataFolder
- SelectGameArchive
- SelectGameDirectory
- SelectModFile
- SelectModFiles
- SelectOptimumInstallation
- SetLibrarySort
- UpdateSettings
DetectOptimum
DetectOptimum searches standard locations for a usable Optimum installation.
Go
DetectOptimum() OptimumStatusDTOTypeScript
DetectOptimum(): Promise<OptimumStatusDTO>Returns
| Go type | TypeScript type |
|---|---|
OptimumStatusDTO | OptimumStatusDTO |
Example
const detectOptimum = await DetectOptimum()Source
internal/transport/wails/settings_controller.go:123
GetDataFolder
GetDataFolder reports the active launcher data directory and its storage usage.
Go
GetDataFolder() (DataFolderDTO, error)TypeScript
GetDataFolder(): Promise<DataFolderDTO>Returns
| Go type | TypeScript type |
|---|---|
DataFolderDTO | DataFolderDTO |
Example
const getDataFolder = await GetDataFolder()Source
internal/transport/wails/settings_controller.go:81
GetOptimumStatus
GetOptimumStatus reports the configured Optimum runtime and whether it is usable.
Go
GetOptimumStatus() (OptimumStatusDTO, error)TypeScript
GetOptimumStatus(): Promise<OptimumStatusDTO>Returns
| Go type | TypeScript type |
|---|---|
OptimumStatusDTO | OptimumStatusDTO |
Example
const getOptimumStatus = await GetOptimumStatus()Source
internal/transport/wails/settings_controller.go:114
GetSettings
GetSettings returns the launcher's current user-configurable settings.
Go
GetSettings() (SettingsDTO, error)TypeScript
GetSettings(): Promise<SettingsDTO>Returns
| Go type | TypeScript type |
|---|---|
SettingsDTO | SettingsDTO |
Example
const getSettings = await GetSettings()Source
internal/transport/wails/settings_controller.go:54
InspectOptimum
InspectOptimum validates a selected Optimum installation directory.
Go
InspectOptimum(path string) (OptimumStatusDTO, error)TypeScript
InspectOptimum(path: string): Promise<OptimumStatusDTO>Parameters
| Name | Type |
|---|---|
path | string |
Returns
| Go type | TypeScript type |
|---|---|
OptimumStatusDTO | OptimumStatusDTO |
Example
const inspectOptimum = await InspectOptimum("/path/to/file")Source
internal/transport/wails/settings_controller.go:128
MoveDataFolder
MoveDataFolder validates and prepares the target, then starts relocation in the background. A nil return means the move was accepted, not completed; progress and failure are reported through data-folder events, and success relaunches the launcher.
Go
MoveDataFolder(target string) errorTypeScript
MoveDataFolder(target: string): Promise<void>Parameters
| Name | Type |
|---|---|
target | string |
Errors
data_folder_busy: another relocation or background work is activeinstance_already_running: a game instance is currently running
Example
await MoveDataFolder("")Source
internal/transport/wails/settings_controller.go:99
OpenDirectory
OpenDirectory opens an approved local directory in the system file manager.
Go
OpenDirectory(path string) errorTypeScript
OpenDirectory(path: string): Promise<void>Parameters
| Name | Type |
|---|---|
path | string |
Example
await OpenDirectory("/path/to/file")Source
internal/transport/wails/settings_controller.go:154
OpenOptimumInstallationGuide
OpenOptimumInstallationGuide opens installation guidance for the optional Optimum runtime.
Go
OpenOptimumInstallationGuide()TypeScript
OpenOptimumInstallationGuide(): Promise<void>Example
await OpenOptimumInstallationGuide()Source
internal/transport/wails/settings_controller.go:139
SelectDataFolder
SelectDataFolder prompts for a launcher data directory.
Go
SelectDataFolder() (string, error)TypeScript
SelectDataFolder(): Promise<string>Returns
| Go type | TypeScript type |
|---|---|
string | string |
Example
const selectDataFolder = await SelectDataFolder()Source
internal/transport/wails/settings_controller.go:87
SelectGameArchive
SelectGameArchive prompts for a local game archive.
Go
SelectGameArchive() (string, error)TypeScript
SelectGameArchive(): Promise<string>Returns
| Go type | TypeScript type |
|---|---|
string | string |
Example
const selectGameArchive = await SelectGameArchive()Source
internal/transport/wails/settings_controller.go:104
SelectGameDirectory
SelectGameDirectory prompts for an existing game installation directory.
Go
SelectGameDirectory() (string, error)TypeScript
SelectGameDirectory(): Promise<string>Returns
| Go type | TypeScript type |
|---|---|
string | string |
Example
const selectGameDirectory = await SelectGameDirectory()Source
internal/transport/wails/settings_controller.go:109
SelectModFile
SelectModFile prompts for one local mod archive.
Go
SelectModFile() (string, error)TypeScript
SelectModFile(): Promise<string>Returns
| Go type | TypeScript type |
|---|---|
string | string |
Example
const selectModFile = await SelectModFile()Source
internal/transport/wails/settings_controller.go:144
SelectModFiles
SelectModFiles prompts for multiple local mod archives.
Go
SelectModFiles() ([]string, error)TypeScript
SelectModFiles(): Promise<string[]>Returns
| Go type | TypeScript type |
|---|---|
[]string | string[] |
Example
const selectModFiles = await SelectModFiles()Source
internal/transport/wails/settings_controller.go:149
SelectOptimumInstallation
SelectOptimumInstallation prompts for an Optimum installation to inspect.
Go
SelectOptimumInstallation() (string, error)TypeScript
SelectOptimumInstallation(): Promise<string>Returns
| Go type | TypeScript type |
|---|---|
string | string |
Example
const selectOptimumInstallation = await SelectOptimumInstallation()Source
internal/transport/wails/settings_controller.go:134
SetLibrarySort
SetLibrarySort updates the ordering used by the instance library.
Go
SetLibrarySort(value string) (SettingsDTO, error)TypeScript
SetLibrarySort(value: string): Promise<SettingsDTO>Parameters
| Name | Type |
|---|---|
value | string |
Returns
| Go type | TypeScript type |
|---|---|
SettingsDTO | SettingsDTO |
Example
const setLibrarySort = await SetLibrarySort("")Source
internal/transport/wails/settings_controller.go:75
UpdateSettings
UpdateSettings validates and persists the complete settings document.
Go
UpdateSettings(request SettingsDTO) (SettingsDTO, error)TypeScript
UpdateSettings(request: SettingsDTO): Promise<SettingsDTO>Parameters
| Name | Type |
|---|---|
request | SettingsDTO |
Returns
| Go type | TypeScript type |
|---|---|
SettingsDTO | SettingsDTO |
Example
const updateSettings = await UpdateSettings({ language: "", downloadsParallel: 0, confirmDeletion: false, globalLaunchArguments: [], optimumPath: "/path/to/file", checkForUpdates: false, updateChannel: "", skippedUpdateVersion: "1.0.0", telemetryEnabled: false, automaticSafetySnapshots: false, automaticSnapshotRetention: 0, librarySort: "" })Source
internal/transport/wails/settings_controller.go:60