site updates

This commit is contained in:
Henry Dollman
2024-07-10 16:09:08 -04:00
parent 307218d001
commit 96e4c3b9ea
7 changed files with 91 additions and 36 deletions

View File

@@ -1,6 +1,8 @@
import { toast } from '@/components/ui/use-toast'
import { type ClassValue, clsx } from 'clsx'
import { twMerge } from 'tailwind-merge'
import { $servers, pb } from './stores'
import { SystemRecord } from '@/types'
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs))
@@ -21,3 +23,11 @@ export async function copyToClipboard(content: string) {
})
}
}
export const updateServerList = () => {
pb.collection<SystemRecord>('systems')
.getFullList({ sort: '+name' })
.then((records) => {
$servers.set(records)
})
}