mirror of
https://github.com/henrygd/beszel.git
synced 2026-04-19 19:31:48 +02:00
refactor: add api module and page preloading
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
import PocketBase from "pocketbase"
|
||||
import { atom, map } from "nanostores"
|
||||
import { AlertMap, ChartTimes, SystemRecord, UserSettings } from "@/types"
|
||||
import { basePath } from "@/components/router"
|
||||
import { Unit } from "./enums"
|
||||
|
||||
/** PocketBase JS Client */
|
||||
export const pb = new PocketBase(basePath)
|
||||
import { pb } from "./api"
|
||||
|
||||
/** Store if user is authenticated */
|
||||
export const $authenticated = atom(pb.authStore.isValid)
|
||||
|
||||
Reference in New Issue
Block a user