mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-12 15:52:39 +10:00
feat: refactor news and migrate rest of useFetch to $dropFetch
This commit is contained in:
@ -551,13 +551,9 @@ definePageMeta({
|
||||
const router = useRouter();
|
||||
|
||||
const route = useRoute();
|
||||
const headers = useRequestHeaders(["cookie"]);
|
||||
const gameId = route.params.id.toString();
|
||||
const versions = await $dropFetch(
|
||||
`/api/v1/admin/import/version?id=${encodeURIComponent(gameId)}`,
|
||||
{
|
||||
headers,
|
||||
}
|
||||
`/api/v1/admin/import/version?id=${encodeURIComponent(gameId)}`
|
||||
);
|
||||
const currentlySelectedVersion = ref(-1);
|
||||
const versionSettings = ref<{
|
||||
|
||||
@ -321,7 +321,10 @@
|
||||
{{ item.delta ? "Upgrade mode" : "" }}
|
||||
</div>
|
||||
<div class="inline-flex items-center gap-x-2">
|
||||
<component :is="PLATFORM_ICONS[item.platform]" class="size-6 text-blue-600" />
|
||||
<component
|
||||
:is="PLATFORM_ICONS[item.platform]"
|
||||
class="size-6 text-blue-600"
|
||||
/>
|
||||
<Bars3Icon class="cursor-move w-6 h-6 text-zinc-400 handle" />
|
||||
<button @click="() => deleteVersion(item.versionName)">
|
||||
<TrashIcon class="w-5 h-5 text-red-600" />
|
||||
@ -345,7 +348,7 @@
|
||||
:options="{ id: game.id }"
|
||||
accept="image/*"
|
||||
endpoint="/api/v1/admin/game/image"
|
||||
@upload="(result) => uploadAfterImageUpload(result)"
|
||||
@upload="(result: Game) => uploadAfterImageUpload(result)"
|
||||
/>
|
||||
<ModalTemplate v-model="showAddCarouselModal">
|
||||
<template #default>
|
||||
@ -529,12 +532,8 @@ const mobileShowFinalDescription = ref(true);
|
||||
|
||||
const route = useRoute();
|
||||
const gameId = route.params.id.toString();
|
||||
const headers = useRequestHeaders(["cookie"]);
|
||||
const { game: rawGame, unimportedVersions } = await $dropFetch(
|
||||
`/api/v1/admin/game?id=${encodeURIComponent(gameId)}`,
|
||||
{
|
||||
headers,
|
||||
}
|
||||
`/api/v1/admin/game?id=${encodeURIComponent(gameId)}`
|
||||
);
|
||||
const game = ref(rawGame);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user