mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[refactor] refactored DefaultConfig on client side to resemble typing in StaticConfig
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
import { BsvSearchOrder } from "shared/models/maps/beat-saver.model";
|
||||
|
||||
export const defaultConfiguration: { [key in DefaultConfigKey]: any } = {
|
||||
// NOTE: To refactor. Rename to LocalStorageConfigKeyValues since these are stored in the
|
||||
// localStorage in the browser, and for readability
|
||||
export interface DefaultConfigKeyValues {
|
||||
"first-color": string;
|
||||
"second-color": string;
|
||||
theme: ThemeConfig;
|
||||
language: string;
|
||||
supported_languages: string[];
|
||||
default_mods: string[];
|
||||
"default-shared-folders": string[];
|
||||
"playlist-sort-order": BsvSearchOrder;
|
||||
"map-sort-order": BsvSearchOrder;
|
||||
};
|
||||
|
||||
export type DefaultConfigKey = keyof DefaultConfigKeyValues;
|
||||
|
||||
export const defaultConfiguration: {
|
||||
[key in DefaultConfigKey]: DefaultConfigKeyValues[key]
|
||||
} = {
|
||||
"first-color": "#3b82ff",
|
||||
"second-color": "#ff4444",
|
||||
theme: "os",
|
||||
@@ -16,6 +34,4 @@ export const defaultConfiguration: { [key in DefaultConfigKey]: any } = {
|
||||
"map-sort-order": BsvSearchOrder.Latest,
|
||||
};
|
||||
|
||||
export type DefaultConfigKey = "first-color" | "second-color" | "theme" | "language" | "supported_languages" | "default_mods" | "default-shared-folders" | "playlist-sort-order" | "map-sort-order";
|
||||
|
||||
export type ThemeConfig = "dark" | "light" | "os";
|
||||
|
||||
Reference in New Issue
Block a user