Files
wanderer/web/src/lib/models/settings.ts
2024-04-13 20:51:05 +02:00

29 lines
673 B
TypeScript

class Settings {
id?: string;
unit?: "metric" | "imperial";
language?: "en" | "de" | "fr" | "hu" | "nl" | "pl" | "pt" | "zh";
mapFocus?: "trails" | "location";
location?: { name: string, lat: number, lon: number };
user?: string;
constructor(
unit: "metric" | "imperial",
language: "en" | "de" | "fr" | "hu" | "nl" | "pl" | "pt" | "zh",
mapFocus: "trails" | "location",
user: string,
params?: {
location: { name: string, lat: number, lon: number }
}
) {
this.unit = unit;
this.language = language;
this.mapFocus = mapFocus;
this.user = user;
this.location = params?.location;
}
}
export { Settings };