Skip to main content

Variable: SETTINGS_SCHEMA

const SETTINGS_SCHEMA: {
chart: {
default: {};
key: "chartjs_";
type: "object";
validate: () => true;
};
export: {
default: {
format: "png";
includeWatermark: false;
quality: 0.9;
theme: "auto";
};
key: "export_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};
mapTheme: {
default: true;
key: "ffv-map-theme-inverted";
type: "boolean";
validate: (value: unknown) => value is boolean;
};
powerEstimation: {
default: {};
key: "powerEst_";
type: "object";
validate: () => true;
};
theme: {
default: "dark";
key: "ffv-theme";
type: "string";
validate: (value: unknown) => boolean;
};
ui: {
default: {
animationsEnabled: true;
compactMode: false;
showAdvancedControls: false;
};
key: "ui_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};
units: {
default: {
distance: "metric";
temperature: "celsius";
time: "24h";
};
key: "units_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};
};

Defined in: utils/state/domain/settingsStateSchema.ts:47

Settings categories and their persistence configuration.

Type Declaration​

chart​

readonly chart: {
default: {
};
key: "chartjs_";
type: "object";
validate: () => true;
};

chart.default​

readonly default: {
} = {};

chart.key​

readonly key: "chartjs_" = "chartjs_";

chart.type​

readonly type: "object" = "object";

chart.validate​

readonly validate: () => true;

Chart settings are stored as individual primitive values under object keys such as chartjs_field_speed = "hidden".

Returns​

true

export​

readonly export: {
default: {
format: "png";
includeWatermark: false;
quality: 0.9;
theme: "auto";
};
key: "export_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};

export.default​

readonly default: {
format: "png";
includeWatermark: false;
quality: 0.9;
theme: "auto";
};

export.default.format​

readonly format: "png" = "png";

export.default.includeWatermark​

readonly includeWatermark: false = false;

export.default.quality​

readonly quality: 0.9 = 0.9;

export.default.theme​

readonly theme: "auto" = "auto";

export.key​

readonly key: "export_" = "export_";

export.type​

readonly type: "object" = "object";

export.validate​

readonly validate: (value: unknown) => value is Record<string, unknown> = isSettingsObject;
Parameters​
value​

unknown

Returns​

value is Record<string, unknown>

mapTheme​

readonly mapTheme: {
default: true;
key: "ffv-map-theme-inverted";
type: "boolean";
validate: (value: unknown) => value is boolean;
};

mapTheme.default​

readonly default: true = true;

mapTheme.key​

readonly key: "ffv-map-theme-inverted" = "ffv-map-theme-inverted";

mapTheme.type​

readonly type: "boolean" = "boolean";

mapTheme.validate​

readonly validate: (value: unknown) => value is boolean;
Parameters​
value​

unknown

Returns​

value is boolean

powerEstimation​

readonly powerEstimation: {
default: {
};
key: "powerEst_";
type: "object";
validate: () => true;
};

powerEstimation.default​

readonly default: {
} = {};

powerEstimation.key​

readonly key: "powerEst_" = "powerEst_";

powerEstimation.type​

readonly type: "object" = "object";

powerEstimation.validate​

readonly validate: () => true;

Power estimation settings are stored as individual primitive values under object keys such as powerEst_riderWeightKg = 75.

Returns​

true

theme​

readonly theme: {
default: "dark";
key: "ffv-theme";
type: "string";
validate: (value: unknown) => boolean;
};

theme.default​

readonly default: "dark" = "dark";

theme.key​

readonly key: "ffv-theme" = "ffv-theme";

theme.type​

readonly type: "string" = "string";

theme.validate​

readonly validate: (value: unknown) => boolean;
Parameters​
value​

unknown

Returns​

boolean

ui​

readonly ui: {
default: {
animationsEnabled: true;
compactMode: false;
showAdvancedControls: false;
};
key: "ui_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};

ui.default​

readonly default: {
animationsEnabled: true;
compactMode: false;
showAdvancedControls: false;
};

ui.default.animationsEnabled​

readonly animationsEnabled: true = true;

ui.default.compactMode​

readonly compactMode: false = false;

ui.default.showAdvancedControls​

readonly showAdvancedControls: false = false;

ui.key​

readonly key: "ui_" = "ui_";

ui.type​

readonly type: "object" = "object";

ui.validate​

readonly validate: (value: unknown) => value is Record<string, unknown> = isSettingsObject;
Parameters​
value​

unknown

Returns​

value is Record<string, unknown>

units​

readonly units: {
default: {
distance: "metric";
temperature: "celsius";
time: "24h";
};
key: "units_";
type: "object";
validate: (value: unknown) => value is Record<string, unknown>;
};

units.default​

readonly default: {
distance: "metric";
temperature: "celsius";
time: "24h";
};

units.default.distance​

readonly distance: "metric" = "metric";

units.default.temperature​

readonly temperature: "celsius" = "celsius";

units.default.time​

readonly time: "24h" = "24h";

units.key​

readonly key: "units_" = "units_";

units.type​

readonly type: "object" = "object";

units.validate​

readonly validate: (value: unknown) => value is Record<string, unknown> = isSettingsObject;
Parameters​
value​

unknown

Returns​

value is Record<string, unknown>