feat: uninstall commands, new R UI

This commit is contained in:
DecDuck
2025-09-07 17:30:24 +10:00
parent d84c70a05f
commit 5c1b0e6c1e
11 changed files with 424 additions and 346 deletions

View File

@ -1,3 +1,4 @@
import type { UserPlatform } from "~/prisma/client/client";
import { HardwarePlatform } from "~/prisma/client/enums";
export type PlatformRenderable = {
@ -22,3 +23,14 @@ export function renderPlatforms(
})),
];
}
const rawUseAdminPlatforms = () => useState<Array<UserPlatform> | null>('adminPlatforms', () => null);
export async function useAdminPlatforms() {
const platforms = rawUseAdminPlatforms();
if(platforms.value === null){
platforms.value = await $dropFetch("/api/v1/admin/platforms");
}
return platforms.value!
}