mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-14 08:41:15 +10:00
feat: uninstall commands, new R UI
This commit is contained in:
@ -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!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user