mirror of
https://github.com/henrygd/beszel.git
synced 2026-04-07 05:21:50 +02:00
feat(hub): show "update available" notification in hub web UI (#1830)
* refactor, make opt-in, and deprecate /api/beszel/getkey in favor of /api/beszel/info --------- Co-authored-by: henrygd <hank@henrygd.me>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { atom, computed, listenKeys, map, type ReadableAtom } from "nanostores"
|
||||
import type { AlertMap, ChartTimes, SystemRecord, UserSettings } from "@/types"
|
||||
import type { AlertMap, ChartTimes, SystemRecord, UpdateInfo, UserSettings } from "@/types"
|
||||
import { pb } from "./api"
|
||||
import { Unit } from "./enums"
|
||||
|
||||
@@ -28,6 +28,9 @@ export const $alerts = map<AlertMap>({})
|
||||
/** SSH public key */
|
||||
export const $publicKey = atom("")
|
||||
|
||||
/** New version info if an update is available, otherwise undefined */
|
||||
export const $newVersion = atom<UpdateInfo | undefined>()
|
||||
|
||||
/** Chart time period */
|
||||
export const $chartTime = atom<ChartTimes>("1h")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user