mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 18:56:17 +01:00
tweaks to custom meter percentages
This commit is contained in:
@@ -24,17 +24,21 @@ export const $chartTime = atom("1h") as PreinitializedWritableAtom<ChartTimes>
|
||||
/** Whether to display average or max chart values */
|
||||
export const $maxValues = atom(false)
|
||||
|
||||
// export const UserSettingsSchema = v.object({
|
||||
// chartTime: v.picklist(["1h", "12h", "24h", "1w", "30d"]),
|
||||
// emails: v.optional(v.array(v.pipe(v.string(), v.email())), [pb?.authStore?.record?.email ?? ""]),
|
||||
// webhooks: v.optional(v.array(v.string())),
|
||||
// colorWarn: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(100))),
|
||||
// colorDanger: v.optional(v.pipe(v.number(), v.minValue(1), v.maxValue(100))),
|
||||
// unitTemp: v.optional(v.enum(Unit)),
|
||||
// unitNet: v.optional(v.enum(Unit)),
|
||||
// unitDisk: v.optional(v.enum(Unit)),
|
||||
// })
|
||||
|
||||
/** User settings */
|
||||
export const $userSettings = map<UserSettings>({
|
||||
chartTime: "1h",
|
||||
emails: [pb.authStore.record?.email || ""],
|
||||
meterThresholds: {
|
||||
yellow: 65,
|
||||
red: 90,
|
||||
},
|
||||
// unitTemp: "celsius",
|
||||
// unitNet: "mbps",
|
||||
// unitDisk: "mbps",
|
||||
})
|
||||
// update local storage on change
|
||||
$userSettings.subscribe((value) => {
|
||||
|
||||
Reference in New Issue
Block a user