mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 18:56:17 +01:00
updates
This commit is contained in:
@@ -1,3 +1,14 @@
|
||||
import PocketBase from 'pocketbase'
|
||||
import { atom } from 'nanostores'
|
||||
import { SystemRecord } from '@/types'
|
||||
|
||||
export const pb = new PocketBase('/')
|
||||
// @ts-ignore
|
||||
pb.authStore.storageKey = 'pb_admin_auth'
|
||||
|
||||
export const $authenticated = atom(pb.authStore.isValid)
|
||||
export const $servers = atom([] as SystemRecord[])
|
||||
|
||||
pb.authStore.onChange(() => {
|
||||
$authenticated.set(pb.authStore.isValid)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user