mirror of
https://github.com/Drop-OSS/drop.git
synced 2025-11-09 20:12:10 +10:00
fix: inital eslint errors
This commit is contained in:
1
app.vue
1
app.vue
@ -1,4 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<NuxtLoadingIndicator />
|
||||||
<NuxtLayout>
|
<NuxtLayout>
|
||||||
<NuxtPage />
|
<NuxtPage />
|
||||||
</NuxtLayout>
|
</NuxtLayout>
|
||||||
|
|||||||
@ -43,6 +43,7 @@ async function main() {
|
|||||||
try {
|
try {
|
||||||
await fs.rename(oldPath, newPath);
|
await fs.rename(oldPath, newPath);
|
||||||
console.log("Directory renamed from .prisma to _prisma");
|
console.log("Directory renamed from .prisma to _prisma");
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log("Directory .prisma does not exist or has already been renamed");
|
console.log("Directory .prisma does not exist or has already been renamed");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="inline-flex w-full group hover:scale-105 transition-all duration-200">
|
<div
|
||||||
|
class="inline-flex w-full group hover:scale-105 transition-all duration-200"
|
||||||
|
>
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
:loading="isLibraryLoading"
|
:loading="isLibraryLoading"
|
||||||
@click="() => toggleLibrary()"
|
|
||||||
:style="'none'"
|
:style="'none'"
|
||||||
class="transition w-full inline-flex items-center justify-center h-full gap-x-2 rounded-none rounded-l-md bg-white/10 hover:bg-white/20 text-zinc-100 backdrop-blur px-5 py-3 active:scale-95"
|
class="transition w-full inline-flex items-center justify-center h-full gap-x-2 rounded-none rounded-l-md bg-white/10 hover:bg-white/20 text-zinc-100 backdrop-blur px-5 py-3 active:scale-95"
|
||||||
|
@click="() => toggleLibrary()"
|
||||||
>
|
>
|
||||||
{{ inLibrary ? "In Library" : "Add to Library" }}
|
{{ inLibrary ? "In Library" : "Add to Library" }}
|
||||||
<CheckIcon v-if="inLibrary" class="-mr-0.5 h-5 w-5" aria-hidden="true" />
|
<CheckIcon v-if="inLibrary" class="-mr-0.5 h-5 w-5" aria-hidden="true" />
|
||||||
@ -69,8 +71,8 @@
|
|||||||
<div class="border-t border-zinc-700 pt-1">
|
<div class="border-t border-zinc-700 pt-1">
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
:loading="false"
|
:loading="false"
|
||||||
@click="createCollectionModal = true"
|
|
||||||
class="w-full"
|
class="w-full"
|
||||||
|
@click="createCollectionModal = true"
|
||||||
>
|
>
|
||||||
<PlusIcon class="mr-2 h-4 w-4" />
|
<PlusIcon class="mr-2 h-4 w-4" />
|
||||||
Add to new collection
|
Add to new collection
|
||||||
@ -84,14 +86,13 @@
|
|||||||
|
|
||||||
<CreateCollectionModal
|
<CreateCollectionModal
|
||||||
v-model="createCollectionModal"
|
v-model="createCollectionModal"
|
||||||
:gameId="props.gameId"
|
:game-id="props.gameId"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { PlusIcon, ChevronDownIcon, CheckIcon } from "@heroicons/vue/24/solid";
|
import { PlusIcon, ChevronDownIcon, CheckIcon } from "@heroicons/vue/24/solid";
|
||||||
import { Menu, MenuButton, MenuItems, MenuItem } from "@headlessui/vue";
|
import { Menu, MenuButton, MenuItems, MenuItem } from "@headlessui/vue";
|
||||||
import type { ComponentPublicInstance } from "vue";
|
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
gameId: string;
|
gameId: string;
|
||||||
@ -104,12 +105,12 @@ const collections = await useCollections();
|
|||||||
const library = await useLibrary();
|
const library = await useLibrary();
|
||||||
|
|
||||||
const inLibrary = computed(
|
const inLibrary = computed(
|
||||||
() => library.value.entries.findIndex((e) => e.gameId == props.gameId) != -1
|
() => library.value.entries.findIndex((e) => e.gameId == props.gameId) != -1,
|
||||||
);
|
);
|
||||||
const inCollections = computed(() =>
|
const inCollections = computed(() =>
|
||||||
collections.value.map(
|
collections.value.map(
|
||||||
(e) => e.entries.findIndex((e) => e.gameId == props.gameId) != -1
|
(e) => e.entries.findIndex((e) => e.gameId == props.gameId) != -1,
|
||||||
)
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
async function toggleLibrary() {
|
async function toggleLibrary() {
|
||||||
@ -122,14 +123,15 @@ async function toggleLibrary() {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
await refreshLibrary();
|
await refreshLibrary();
|
||||||
} catch (e: any) {
|
} catch (e) {
|
||||||
createModal(
|
createModal(
|
||||||
ModalType.Notification,
|
ModalType.Notification,
|
||||||
{
|
{
|
||||||
title: "Failed to add game to library",
|
title: "Failed to add game to library",
|
||||||
|
// @ts-expect-error attempt to display statusMessage on error
|
||||||
description: `Drop couldn't add this game to your library: ${e?.statusMessage}`,
|
description: `Drop couldn't add this game to your library: ${e?.statusMessage}`,
|
||||||
},
|
},
|
||||||
(_, c) => c()
|
(_, c) => c(),
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
isLibraryLoading.value = false;
|
isLibraryLoading.value = false;
|
||||||
@ -150,16 +152,16 @@ async function toggleCollection(id: string) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
await refreshCollection(id);
|
await refreshCollection(id);
|
||||||
} catch (e: any) {
|
} catch (e) {
|
||||||
createModal(
|
createModal(
|
||||||
ModalType.Notification,
|
ModalType.Notification,
|
||||||
{
|
{
|
||||||
title: "Failed to add game to library",
|
title: "Failed to add game to library",
|
||||||
|
// @ts-expect-error attempt to display statusMessage on error
|
||||||
description: `Drop couldn't add this game to your library: ${e?.statusMessage}`,
|
description: `Drop couldn't add this game to your library: ${e?.statusMessage}`,
|
||||||
},
|
},
|
||||||
(_, c) => c()
|
(_, c) => c(),
|
||||||
);
|
);
|
||||||
} finally {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
<button
|
<button
|
||||||
v-for="(_, i) in amount"
|
v-for="(_, i) in amount"
|
||||||
:key="i"
|
:key="i"
|
||||||
@click="() => slideTo(i)"
|
|
||||||
:class="[
|
:class="[
|
||||||
carousel.currentSlide == i ? 'bg-blue-600 w-6' : 'bg-zinc-700 w-3',
|
carousel.currentSlide == i ? 'bg-blue-600 w-6' : 'bg-zinc-700 w-3',
|
||||||
'transition-all cursor-pointer h-2 rounded-full',
|
'transition-all cursor-pointer h-2 rounded-full',
|
||||||
@ -15,7 +14,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { injectCarousel } from "vue3-carousel";
|
import { injectCarousel } from "vue3-carousel";
|
||||||
|
|
||||||
const carousel = inject(injectCarousel)!!;
|
const carousel = inject(injectCarousel)!;
|
||||||
|
|
||||||
const amount = carousel.maxSlide - carousel.minSlide + 1;
|
const amount = carousel.maxSlide - carousel.minSlide + 1;
|
||||||
|
|
||||||
|
|||||||
@ -13,8 +13,8 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<form @submit.prevent="() => createCollection()">
|
<form @submit.prevent="() => createCollection()">
|
||||||
<input
|
<input
|
||||||
type="text"
|
|
||||||
v-model="collectionName"
|
v-model="collectionName"
|
||||||
|
type="text"
|
||||||
placeholder="Collection name"
|
placeholder="Collection name"
|
||||||
class="block w-full rounded-md border-0 bg-zinc-800 py-1.5 text-white shadow-sm ring-1 ring-inset ring-zinc-700 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 bg-zinc-800 py-1.5 text-white shadow-sm ring-1 ring-inset ring-zinc-700 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
/>
|
/>
|
||||||
@ -27,16 +27,16 @@
|
|||||||
<LoadingButton
|
<LoadingButton
|
||||||
:loading="createCollectionLoading"
|
:loading="createCollectionLoading"
|
||||||
:disabled="!collectionName"
|
:disabled="!collectionName"
|
||||||
@click="() => createCollection()"
|
|
||||||
class="w-full sm:w-fit"
|
class="w-full sm:w-fit"
|
||||||
|
@click="() => createCollection()"
|
||||||
>
|
>
|
||||||
Create
|
Create
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
<button
|
<button
|
||||||
|
ref="cancelButtonRef"
|
||||||
type="button"
|
type="button"
|
||||||
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-800 hover:bg-zinc-900 sm:mt-0 sm:w-auto"
|
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-800 hover:bg-zinc-900 sm:mt-0 sm:w-auto"
|
||||||
@click="() => close()"
|
@click="() => close()"
|
||||||
ref="cancelButtonRef"
|
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
@ -58,7 +58,7 @@ const emit = defineEmits<{
|
|||||||
created: [collectionId: string];
|
created: [collectionId: string];
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const open: Ref<boolean> = defineModel<boolean>() as any;
|
const open: Ref<boolean> = defineModel<boolean>();
|
||||||
|
|
||||||
const collectionName = ref("");
|
const collectionName = ref("");
|
||||||
const createCollectionLoading = ref(false);
|
const createCollectionLoading = ref(false);
|
||||||
@ -104,7 +104,7 @@ async function createCollection() {
|
|||||||
title: "Failed to create collection",
|
title: "Failed to create collection",
|
||||||
description: `Drop couldn't create your collection: ${err?.statusMessage}`,
|
description: `Drop couldn't create your collection: ${err?.statusMessage}`,
|
||||||
},
|
},
|
||||||
(_, c) => c()
|
(_, c) => c(),
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
createCollectionLoading.value = false;
|
createCollectionLoading.value = false;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<ModalTemplate :modelValue="!!collection">
|
<ModalTemplate :model-value="!!collection">
|
||||||
<template #default>
|
<template #default>
|
||||||
<div>
|
<div>
|
||||||
<DialogTitle
|
<DialogTitle
|
||||||
@ -19,14 +19,14 @@
|
|||||||
<template #buttons>
|
<template #buttons>
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
:loading="deleteLoading"
|
:loading="deleteLoading"
|
||||||
@click="() => deleteCollection()"
|
|
||||||
class="bg-red-600 text-white hover:bg-red-500"
|
class="bg-red-600 text-white hover:bg-red-500"
|
||||||
|
@click="() => deleteCollection()"
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
<button
|
<button
|
||||||
@click="() => (collection = undefined)"
|
|
||||||
class="inline-flex items-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold font-display text-white hover:bg-zinc-700"
|
class="inline-flex items-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold font-display text-white hover:bg-zinc-700"
|
||||||
|
@click="() => (collection = undefined)"
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
@ -49,23 +49,24 @@ async function deleteCollection() {
|
|||||||
|
|
||||||
deleteLoading.value = true;
|
deleteLoading.value = true;
|
||||||
await $dropFetch(`/api/v1/collection/${collection.value.id}`, {
|
await $dropFetch(`/api/v1/collection/${collection.value.id}`, {
|
||||||
// @ts-ignore
|
// @ts-expect-error not documented
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
});
|
});
|
||||||
const index = collections.value.findIndex(
|
const index = collections.value.findIndex(
|
||||||
(e) => e.id == collection.value?.id
|
(e) => e.id == collection.value?.id,
|
||||||
);
|
);
|
||||||
collections.value.splice(index, 1);
|
collections.value.splice(index, 1);
|
||||||
|
|
||||||
collection.value = undefined;
|
collection.value = undefined;
|
||||||
} catch (e: any) {
|
} catch (e) {
|
||||||
createModal(
|
createModal(
|
||||||
ModalType.Notification,
|
ModalType.Notification,
|
||||||
{
|
{
|
||||||
title: "Failed to add game to library",
|
title: "Failed to add game to library",
|
||||||
|
// @ts-expect-error attempt to display statusMessage on error
|
||||||
description: `Drop couldn't add this game to your library: ${e?.statusMessage}`,
|
description: `Drop couldn't add this game to your library: ${e?.statusMessage}`,
|
||||||
},
|
},
|
||||||
(_, c) => c()
|
(_, c) => c(),
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
deleteLoading.value = false;
|
deleteLoading.value = false;
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<ModalTemplate :modelValue="!!article">
|
<ModalTemplate :model-value="!!article">
|
||||||
<template #default>
|
<template #default>
|
||||||
<div>
|
<div>
|
||||||
<DialogTitle
|
<DialogTitle
|
||||||
@ -19,14 +19,14 @@
|
|||||||
<template #buttons>
|
<template #buttons>
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
:loading="deleteLoading"
|
:loading="deleteLoading"
|
||||||
@click="() => deleteArticle()"
|
|
||||||
class="bg-red-600 text-white hover:bg-red-500"
|
class="bg-red-600 text-white hover:bg-red-500"
|
||||||
|
@click="() => deleteArticle()"
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
<button
|
<button
|
||||||
@click="() => (article = undefined)"
|
|
||||||
class="inline-flex items-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold font-display text-white hover:bg-zinc-700"
|
class="inline-flex items-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold font-display text-white hover:bg-zinc-700"
|
||||||
|
@click="() => (article = undefined)"
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
@ -55,21 +55,24 @@ async function deleteArticle() {
|
|||||||
if (!article.value || !news.value) return;
|
if (!article.value || !news.value) return;
|
||||||
|
|
||||||
deleteLoading.value = true;
|
deleteLoading.value = true;
|
||||||
await $dropFetch(`/api/v1/admin/news/${article.value.id}`, { method: "DELETE" });
|
await $dropFetch(`/api/v1/admin/news/${article.value.id}`, {
|
||||||
|
method: "DELETE",
|
||||||
|
});
|
||||||
|
|
||||||
const index = news.value.findIndex((e) => e.id == article.value?.id);
|
const index = news.value.findIndex((e) => e.id == article.value?.id);
|
||||||
news.value.splice(index, 1);
|
news.value.splice(index, 1);
|
||||||
|
|
||||||
article.value = undefined;
|
article.value = undefined;
|
||||||
router.push("/news");
|
router.push("/news");
|
||||||
} catch (e: any) {
|
} catch (e) {
|
||||||
createModal(
|
createModal(
|
||||||
ModalType.Notification,
|
ModalType.Notification,
|
||||||
{
|
{
|
||||||
title: "Failed to delete article",
|
title: "Failed to delete article",
|
||||||
|
// @ts-expect-error attempt to display statusMessage on error
|
||||||
description: `Drop couldn't delete this article: ${e?.statusMessage}`,
|
description: `Drop couldn't delete this article: ${e?.statusMessage}`,
|
||||||
},
|
},
|
||||||
(_, c) => c()
|
(_, c) => c(),
|
||||||
);
|
);
|
||||||
} finally {
|
} finally {
|
||||||
deleteLoading.value = false;
|
deleteLoading.value = false;
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="currentComponent">
|
<div ref="currentComponent">
|
||||||
<ClientOnly fallback-tag="span">
|
<ClientOnly fallback-tag="span">
|
||||||
<VueCarousel :itemsToShow="singlePage" :itemsToScroll="singlePage">
|
<VueCarousel :items-to-show="singlePage" :items-to-scroll="singlePage">
|
||||||
<VueSlide
|
<VueSlide
|
||||||
class="justify-start"
|
|
||||||
v-for="(game, gameIdx) in games"
|
v-for="(game, gameIdx) in games"
|
||||||
:key="gameIdx"
|
:key="gameIdx"
|
||||||
|
class="justify-start"
|
||||||
>
|
>
|
||||||
<GamePanel :game="game" />
|
<GamePanel :game="game" />
|
||||||
</VueSlide>
|
</VueSlide>
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
v-if="game"
|
v-if="game"
|
||||||
:href="props.href ?? `/store/${game.id}`"
|
:href="props.href ?? `/store/${game.id}`"
|
||||||
class="group relative w-48 h-64 rounded-lg overflow-hidden transition-all duration-300 text-left hover:scale-[1.02] hover:shadow-lg hover:-translate-y-0.5"
|
class="group relative w-48 h-64 rounded-lg overflow-hidden transition-all duration-300 text-left hover:scale-[1.02] hover:shadow-lg hover:-translate-y-0.5"
|
||||||
@click.native="active = game.id"
|
@click="active = game.id"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="absolute inset-0 transition-all duration-300 group-hover:scale-110"
|
class="absolute inset-0 transition-all duration-300 group-hover:scale-110"
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex flex-row items-center gap-x-2">
|
<div class="flex flex-row items-center gap-x-2">
|
||||||
<img :src="game.icon" class="w-12 h-12 rounded-sm object-cover" />
|
<img :src="game.icon" class="w-12 h-12 rounded-sm object-cover" >
|
||||||
<div class="flex flex-col items-left">
|
<div class="flex flex-col items-left">
|
||||||
<h1 class="font-semibold font-display text-lg text-zinc-100">
|
<h1 class="font-semibold font-display text-lg text-zinc-100">
|
||||||
{{ game.name }}
|
{{ game.name }}
|
||||||
|
|||||||
@ -3,7 +3,6 @@
|
|||||||
<svg viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
<svg viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path
|
<path
|
||||||
fill="currentColor"
|
fill="currentColor"
|
||||||
d="M20.992 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.050 0.005 0.109 0.005 0.168 0 1.523-1.191 2.768-2.693 2.854l-0.008 0zM11.026 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.048 0.005 0.104 0.005 0.161 0 1.525-1.19 2.771-2.692 2.862l-0.008 0zM26.393 6.465c-1.763-0.832-3.811-1.49-5.955-1.871l-0.149-0.022c-0.005-0.001-0.011-0.002-0.017-0.002-0.035 0-0.065 0.019-0.081 0.047l-0 0c-0.234 0.411-0.488 0.924-0.717 1.45l-0.043 0.111c-1.030-0.165-2.218-0.259-3.428-0.259s-2.398 0.094-3.557 0.275l0.129-0.017c-0.27-0.63-0.528-1.142-0.813-1.638l0.041 0.077c-0.017-0.029-0.048-0.047-0.083-0.047-0.005 0-0.011 0-0.016 0.001l0.001-0c-2.293 0.403-4.342 1.060-6.256 1.957l0.151-0.064c-0.017 0.007-0.031 0.019-0.040 0.034l-0 0c-2.854 4.041-4.562 9.069-4.562 14.496 0 0.907 0.048 1.802 0.141 2.684l-0.009-0.11c0.003 0.029 0.018 0.053 0.039 0.070l0 0c2.14 1.601 4.628 2.891 7.313 3.738l0.176 0.048c0.008 0.003 0.018 0.004 0.028 0.004 0.032 0 0.060-0.015 0.077-0.038l0-0c0.535-0.72 1.044-1.536 1.485-2.392l0.047-0.1c0.006-0.012 0.010-0.027 0.010-0.043 0-0.041-0.026-0.075-0.062-0.089l-0.001-0c-0.912-0.352-1.683-0.727-2.417-1.157l0.077 0.042c-0.029-0.017-0.048-0.048-0.048-0.083 0-0.031 0.015-0.059 0.038-0.076l0-0c0.157-0.118 0.315-0.24 0.465-0.364 0.016-0.013 0.037-0.021 0.059-0.021 0.014 0 0.027 0.003 0.038 0.008l-0.001-0c2.208 1.061 4.8 1.681 7.536 1.681s5.329-0.62 7.643-1.727l-0.107 0.046c0.012-0.006 0.025-0.009 0.040-0.009 0.022 0 0.043 0.008 0.059 0.021l-0-0c0.15 0.124 0.307 0.248 0.466 0.365 0.023 0.018 0.038 0.046 0.038 0.077 0 0.035-0.019 0.065-0.046 0.082l-0 0c-0.661 0.395-1.432 0.769-2.235 1.078l-0.105 0.036c-0.036 0.014-0.062 0.049-0.062 0.089 0 0.016 0.004 0.031 0.011 0.044l-0-0.001c0.501 0.96 1.009 1.775 1.571 2.548l-0.040-0.057c0.017 0.024 0.046 0.040 0.077 0.040 0.010 0 0.020-0.002 0.029-0.004l-0.001 0c2.865-0.892 5.358-2.182 7.566-3.832l-0.065 0.047c0.022-0.016 0.036-0.041 0.039-0.069l0-0c0.087-0.784 0.136-1.694 0.136-2.615 0-5.415-1.712-10.43-4.623-14.534l0.052 0.078c-0.008-0.016-0.022-0.029-0.038-0.036l-0-0z">
|
d="M20.992 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.050 0.005 0.109 0.005 0.168 0 1.523-1.191 2.768-2.693 2.854l-0.008 0zM11.026 20.163c-1.511-0.099-2.699-1.349-2.699-2.877 0-0.051 0.001-0.102 0.004-0.153l-0 0.007c-0.003-0.048-0.005-0.104-0.005-0.161 0-1.525 1.19-2.771 2.692-2.862l0.008-0c1.509 0.082 2.701 1.325 2.701 2.847 0 0.062-0.002 0.123-0.006 0.184l0-0.008c0.003 0.048 0.005 0.104 0.005 0.161 0 1.525-1.19 2.771-2.692 2.862l-0.008 0zM26.393 6.465c-1.763-0.832-3.811-1.49-5.955-1.871l-0.149-0.022c-0.005-0.001-0.011-0.002-0.017-0.002-0.035 0-0.065 0.019-0.081 0.047l-0 0c-0.234 0.411-0.488 0.924-0.717 1.45l-0.043 0.111c-1.030-0.165-2.218-0.259-3.428-0.259s-2.398 0.094-3.557 0.275l0.129-0.017c-0.27-0.63-0.528-1.142-0.813-1.638l0.041 0.077c-0.017-0.029-0.048-0.047-0.083-0.047-0.005 0-0.011 0-0.016 0.001l0.001-0c-2.293 0.403-4.342 1.060-6.256 1.957l0.151-0.064c-0.017 0.007-0.031 0.019-0.040 0.034l-0 0c-2.854 4.041-4.562 9.069-4.562 14.496 0 0.907 0.048 1.802 0.141 2.684l-0.009-0.11c0.003 0.029 0.018 0.053 0.039 0.070l0 0c2.14 1.601 4.628 2.891 7.313 3.738l0.176 0.048c0.008 0.003 0.018 0.004 0.028 0.004 0.032 0 0.060-0.015 0.077-0.038l0-0c0.535-0.72 1.044-1.536 1.485-2.392l0.047-0.1c0.006-0.012 0.010-0.027 0.010-0.043 0-0.041-0.026-0.075-0.062-0.089l-0.001-0c-0.912-0.352-1.683-0.727-2.417-1.157l0.077 0.042c-0.029-0.017-0.048-0.048-0.048-0.083 0-0.031 0.015-0.059 0.038-0.076l0-0c0.157-0.118 0.315-0.24 0.465-0.364 0.016-0.013 0.037-0.021 0.059-0.021 0.014 0 0.027 0.003 0.038 0.008l-0.001-0c2.208 1.061 4.8 1.681 7.536 1.681s5.329-0.62 7.643-1.727l-0.107 0.046c0.012-0.006 0.025-0.009 0.040-0.009 0.022 0 0.043 0.008 0.059 0.021l-0-0c0.15 0.124 0.307 0.248 0.466 0.365 0.023 0.018 0.038 0.046 0.038 0.077 0 0.035-0.019 0.065-0.046 0.082l-0 0c-0.661 0.395-1.432 0.769-2.235 1.078l-0.105 0.036c-0.036 0.014-0.062 0.049-0.062 0.089 0 0.016 0.004 0.031 0.011 0.044l-0-0.001c0.501 0.96 1.009 1.775 1.571 2.548l-0.040-0.057c0.017 0.024 0.046 0.040 0.077 0.040 0.010 0 0.020-0.002 0.029-0.004l-0.001 0c2.865-0.892 5.358-2.182 7.566-3.832l-0.065 0.047c0.022-0.016 0.036-0.041 0.039-0.069l0-0c0.087-0.784 0.136-1.694 0.136-2.615 0-5.415-1.712-10.43-4.623-14.534l0.052 0.078c-0.008-0.016-0.022-0.029-0.038-0.036l-0-0z"/>
|
||||||
</path>
|
|
||||||
</svg>
|
</svg>
|
||||||
</template>
|
</template>
|
||||||
@ -1,14 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<svg viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
<svg
|
||||||
|
viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||||
<g id="Dribbble-Light-Preview" transform="translate(-140.000000, -7559.000000)" fill="currentColor">
|
<g id="Dribbble-Light-Preview" transform="translate(-140.000000, -7559.000000)" fill="currentColor">
|
||||||
<g id="icons" transform="translate(56.000000, 160.000000)">
|
<g id="icons" transform="translate(56.000000, 160.000000)">
|
||||||
<path
|
<path
|
||||||
d="M94,7399 C99.523,7399 104,7403.59 104,7409.253 C104,7413.782 101.138,7417.624 97.167,7418.981 C96.66,7419.082 96.48,7418.762 96.48,7418.489 C96.48,7418.151 96.492,7417.047 96.492,7415.675 C96.492,7414.719 96.172,7414.095 95.813,7413.777 C98.04,7413.523 100.38,7412.656 100.38,7408.718 C100.38,7407.598 99.992,7406.684 99.35,7405.966 C99.454,7405.707 99.797,7404.664 99.252,7403.252 C99.252,7403.252 98.414,7402.977 96.505,7404.303 C95.706,7404.076 94.85,7403.962 94,7403.958 C93.15,7403.962 92.295,7404.076 91.497,7404.303 C89.586,7402.977 88.746,7403.252 88.746,7403.252 C88.203,7404.664 88.546,7405.707 88.649,7405.966 C88.01,7406.684 87.619,7407.598 87.619,7408.718 C87.619,7412.646 89.954,7413.526 92.175,7413.785 C91.889,7414.041 91.63,7414.493 91.54,7415.156 C90.97,7415.418 89.522,7415.871 88.63,7414.304 C88.63,7414.304 88.101,7413.319 87.097,7413.247 C87.097,7413.247 86.122,7413.234 87.029,7413.87 C87.029,7413.87 87.684,7414.185 88.139,7415.37 C88.139,7415.37 88.726,7417.2 91.508,7416.58 C91.513,7417.437 91.522,7418.245 91.522,7418.489 C91.522,7418.76 91.338,7419.077 90.839,7418.982 C86.865,7417.627 84,7413.783 84,7409.253 C84,7403.59 88.478,7399 94,7399"
|
id="github-[#142]"
|
||||||
id="github-[#142]">
|
d="M94,7399 C99.523,7399 104,7403.59 104,7409.253 C104,7413.782 101.138,7417.624 97.167,7418.981 C96.66,7419.082 96.48,7418.762 96.48,7418.489 C96.48,7418.151 96.492,7417.047 96.492,7415.675 C96.492,7414.719 96.172,7414.095 95.813,7413.777 C98.04,7413.523 100.38,7412.656 100.38,7408.718 C100.38,7407.598 99.992,7406.684 99.35,7405.966 C99.454,7405.707 99.797,7404.664 99.252,7403.252 C99.252,7403.252 98.414,7402.977 96.505,7404.303 C95.706,7404.076 94.85,7403.962 94,7403.958 C93.15,7403.962 92.295,7404.076 91.497,7404.303 C89.586,7402.977 88.746,7403.252 88.746,7403.252 C88.203,7404.664 88.546,7405.707 88.649,7405.966 C88.01,7406.684 87.619,7407.598 87.619,7408.718 C87.619,7412.646 89.954,7413.526 92.175,7413.785 C91.889,7414.041 91.63,7414.493 91.54,7415.156 C90.97,7415.418 89.522,7415.871 88.63,7414.304 C88.63,7414.304 88.101,7413.319 87.097,7413.247 C87.097,7413.247 86.122,7413.234 87.029,7413.87 C87.029,7413.87 87.684,7414.185 88.139,7415.37 C88.139,7415.37 88.726,7417.2 91.508,7416.58 C91.513,7417.437 91.522,7418.245 91.522,7418.489 C91.522,7418.76 91.338,7419.077 90.839,7418.982 C86.865,7417.627 84,7413.783 84,7409.253 C84,7403.59 88.478,7399 94,7399"/>
|
||||||
|
|
||||||
</path>
|
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
</g>
|
</g>
|
||||||
|
|||||||
@ -7,14 +7,14 @@
|
|||||||
<!-- Search bar -->
|
<!-- Search bar -->
|
||||||
<div class="mt-5 relative">
|
<div class="mt-5 relative">
|
||||||
<input
|
<input
|
||||||
|
id="search"
|
||||||
|
v-model="searchQuery"
|
||||||
type="text"
|
type="text"
|
||||||
name="search"
|
name="search"
|
||||||
id="search"
|
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
class="block w-full rounded-md bg-zinc-900 py-2 pl-9 pr-2 text-sm text-zinc-100 outline outline-1 -outline-offset-1 outline-zinc-700 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600"
|
class="block w-full rounded-md bg-zinc-900 py-2 pl-9 pr-2 text-sm text-zinc-100 outline outline-1 -outline-offset-1 outline-zinc-700 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600"
|
||||||
placeholder="Search library..."
|
placeholder="Search library..."
|
||||||
v-model="searchQuery"
|
>
|
||||||
/>
|
|
||||||
<MagnifyingGlassIcon
|
<MagnifyingGlassIcon
|
||||||
class="pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-zinc-400"
|
class="pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-zinc-400"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
@ -22,11 +22,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TransitionGroup
|
<TransitionGroup
|
||||||
|
v-if="filteredLibrary.length > 0"
|
||||||
name="list"
|
name="list"
|
||||||
tag="ul"
|
tag="ul"
|
||||||
role="list"
|
role="list"
|
||||||
class="mt-2 space-y-0.5"
|
class="mt-2 space-y-0.5"
|
||||||
v-if="filteredLibrary.length > 0"
|
|
||||||
>
|
>
|
||||||
<li v-for="game in filteredLibrary" :key="game.id" class="flex">
|
<li v-for="game in filteredLibrary" :key="game.id" class="flex">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
@ -37,7 +37,7 @@
|
|||||||
:src="useObject(game.mCoverId)"
|
:src="useObject(game.mCoverId)"
|
||||||
class="h-9 w-9 flex-shrink-0 rounded transition-all duration-300 group-hover:scale-105 hover:rotate-[-2deg] hover:shadow-lg"
|
class="h-9 w-9 flex-shrink-0 rounded transition-all duration-300 group-hover:scale-105 hover:rotate-[-2deg] hover:shadow-lg"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
>
|
||||||
<div class="min-w-0 flex-1 pl-2.5">
|
<div class="min-w-0 flex-1 pl-2.5">
|
||||||
<p class="text-sm font-semibold text-display text-zinc-200 truncate text-left">
|
<p class="text-sm font-semibold text-display text-zinc-200 truncate text-left">
|
||||||
{{ game.mName }}
|
{{ game.mName }}
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
<!-- Create article button - only show for admin users -->
|
<!-- Create article button - only show for admin users -->
|
||||||
<button
|
<button
|
||||||
v-if="user?.admin"
|
v-if="user?.admin"
|
||||||
@click="modalOpen = !modalOpen"
|
|
||||||
class="transition inline-flex w-full items-center px-4 gap-x-2 py-2 bg-zinc-800 hover:bg-zinc-700 text-zinc-200 font-semibold text-sm shadow-sm"
|
class="transition inline-flex w-full items-center px-4 gap-x-2 py-2 bg-zinc-800 hover:bg-zinc-700 text-zinc-200 font-semibold text-sm shadow-sm"
|
||||||
|
@click="modalOpen = !modalOpen"
|
||||||
>
|
>
|
||||||
<PlusIcon
|
<PlusIcon
|
||||||
class="h-5 w-5 transition-transform duration-200"
|
class="h-5 w-5 transition-transform duration-200"
|
||||||
@ -13,11 +13,11 @@
|
|||||||
<span>New article</span>
|
<span>New article</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<ModalTemplate size-class="sm:max-w-[80vw]" v-model="modalOpen">
|
<ModalTemplate v-model="modalOpen" size-class="sm:max-w-[80vw]">
|
||||||
<h3 class="text-lg font-semibold text-zinc-100 mb-4">
|
<h3 class="text-lg font-semibold text-zinc-100 mb-4">
|
||||||
Create New Article
|
Create New Article
|
||||||
</h3>
|
</h3>
|
||||||
<form @submit.prevent="() => createArticle()" class="space-y-4">
|
<form class="space-y-4" @submit.prevent="() => createArticle()">
|
||||||
<div>
|
<div>
|
||||||
<label for="title" class="block text-sm font-medium text-zinc-400"
|
<label for="title" class="block text-sm font-medium text-zinc-400"
|
||||||
>Title</label
|
>Title</label
|
||||||
@ -29,7 +29,7 @@
|
|||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
class="mt-1 block w-full rounded-md bg-zinc-900 border-zinc-700 text-zinc-100 shadow-sm focus:border-primary-500 focus:ring-primary-500"
|
class="mt-1 block w-full rounded-md bg-zinc-900 border-zinc-700 text-zinc-100 shadow-sm focus:border-primary-500 focus:ring-primary-500"
|
||||||
required
|
required
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
class="mt-1 block w-full rounded-md bg-zinc-900 border-zinc-700 text-zinc-100 shadow-sm focus:border-primary-500 focus:ring-primary-500"
|
class="mt-1 block w-full rounded-md bg-zinc-900 border-zinc-700 text-zinc-100 shadow-sm focus:border-primary-500 focus:ring-primary-500"
|
||||||
required
|
required
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@ -56,8 +56,8 @@
|
|||||||
v-for="shortcut in markdownShortcuts"
|
v-for="shortcut in markdownShortcuts"
|
||||||
:key="shortcut.label"
|
:key="shortcut.label"
|
||||||
type="button"
|
type="button"
|
||||||
@click="applyMarkdown(shortcut)"
|
|
||||||
class="px-2 py-1 text-sm rounded bg-zinc-800 text-zinc-300 hover:bg-zinc-700 transition-colors"
|
class="px-2 py-1 text-sm rounded bg-zinc-800 text-zinc-300 hover:bg-zinc-700 transition-colors"
|
||||||
|
@click="applyMarkdown(shortcut)"
|
||||||
>
|
>
|
||||||
{{ shortcut.label }}
|
{{ shortcut.label }}
|
||||||
</button>
|
</button>
|
||||||
@ -71,12 +71,12 @@
|
|||||||
<span class="text-sm text-zinc-500 mb-2">Editor</span>
|
<span class="text-sm text-zinc-500 mb-2">Editor</span>
|
||||||
<textarea
|
<textarea
|
||||||
id="content"
|
id="content"
|
||||||
v-model="newArticle.content"
|
|
||||||
ref="contentEditor"
|
ref="contentEditor"
|
||||||
@keydown="handleContentKeydown"
|
v-model="newArticle.content"
|
||||||
class="flex-1 rounded-md bg-zinc-900 border-zinc-700 text-zinc-100 shadow-sm focus:border-primary-500 focus:ring-primary-500 font-mono resize-none"
|
class="flex-1 rounded-md bg-zinc-900 border-zinc-700 text-zinc-100 shadow-sm focus:border-primary-500 focus:ring-primary-500 font-mono resize-none"
|
||||||
required
|
required
|
||||||
></textarea>
|
@keydown="handleContentKeydown"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Preview -->
|
<!-- Preview -->
|
||||||
@ -115,17 +115,17 @@
|
|||||||
class="transition mt-2 block text-sm font-semibold text-zinc-400 group-hover:text-zinc-500"
|
class="transition mt-2 block text-sm font-semibold text-zinc-400 group-hover:text-zinc-500"
|
||||||
>Upload cover image</span
|
>Upload cover image</span
|
||||||
>
|
>
|
||||||
<p class="mt-1 text-xs text-zinc-400" v-if="currentFile">
|
<p v-if="currentFile" class="mt-1 text-xs text-zinc-400">
|
||||||
{{ currentFile.name }}
|
{{ currentFile.name }}
|
||||||
</p>
|
</p>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
|
id="file-upload"
|
||||||
accept="image/*"
|
accept="image/*"
|
||||||
@change="(e) => file = (e.target as any)?.files"
|
|
||||||
class="hidden"
|
class="hidden"
|
||||||
type="file"
|
type="file"
|
||||||
id="file-upload"
|
@change="(e) => file = (e.target as any)?.files"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
@ -141,8 +141,8 @@
|
|||||||
{{ tag }}
|
{{ tag }}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click="removeTag(tag)"
|
|
||||||
class="text-white hover:text-white/80"
|
class="text-white hover:text-white/80"
|
||||||
|
@click="removeTag(tag)"
|
||||||
>
|
>
|
||||||
<XMarkIcon class="h-3 w-3" />
|
<XMarkIcon class="h-3 w-3" />
|
||||||
</button>
|
</button>
|
||||||
@ -150,16 +150,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex gap-x-2">
|
<div class="flex gap-x-2">
|
||||||
<input
|
<input
|
||||||
type="text"
|
|
||||||
v-model="newTagInput"
|
v-model="newTagInput"
|
||||||
@keydown.enter.prevent="addTag"
|
type="text"
|
||||||
placeholder="Add a tag..."
|
placeholder="Add a tag..."
|
||||||
class="mt-1 block w-full rounded-md bg-zinc-900 border-zinc-700 text-zinc-100 shadow-sm focus:border-primary-500 focus:ring-primary-500"
|
class="mt-1 block w-full rounded-md bg-zinc-900 border-zinc-700 text-zinc-100 shadow-sm focus:border-primary-500 focus:ring-primary-500"
|
||||||
/>
|
@keydown.enter.prevent="addTag"
|
||||||
|
>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
@click="addTag"
|
|
||||||
class="mt-1 px-3 py-2 rounded-md bg-zinc-800 text-zinc-100 hover:bg-zinc-700"
|
class="mt-1 px-3 py-2 rounded-md bg-zinc-800 text-zinc-100 hover:bg-zinc-700"
|
||||||
|
@click="addTag"
|
||||||
>
|
>
|
||||||
Add
|
Add
|
||||||
</button>
|
</button>
|
||||||
@ -184,14 +184,14 @@
|
|||||||
<template #buttons>
|
<template #buttons>
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@click="() => createArticle()"
|
|
||||||
class="bg-blue-600 text-white hover:bg-blue-500"
|
class="bg-blue-600 text-white hover:bg-blue-500"
|
||||||
|
@click="() => createArticle()"
|
||||||
>
|
>
|
||||||
Submit
|
Submit
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
<button
|
<button
|
||||||
@click="() => (modalOpen = !modalOpen)"
|
|
||||||
class="inline-flex items-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold font-display text-white hover:bg-zinc-700"
|
class="inline-flex items-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold font-display text-white hover:bg-zinc-700"
|
||||||
|
@click="() => (modalOpen = !modalOpen)"
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -17,11 +17,11 @@
|
|||||||
</div>
|
</div>
|
||||||
<input
|
<input
|
||||||
id="search"
|
id="search"
|
||||||
type="text"
|
|
||||||
v-model="searchQuery"
|
v-model="searchQuery"
|
||||||
|
type="text"
|
||||||
class="block w-full rounded-md border-0 bg-zinc-800 py-2.5 pl-10 pr-3 text-zinc-100 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-500 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 bg-zinc-800 py-2.5 pl-10 pr-3 text-zinc-100 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-500 sm:text-sm sm:leading-6"
|
||||||
placeholder="Search articles..."
|
placeholder="Search articles..."
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -49,13 +49,13 @@
|
|||||||
<button
|
<button
|
||||||
v-for="tag in availableTags"
|
v-for="tag in availableTags"
|
||||||
:key="tag"
|
:key="tag"
|
||||||
@click="toggleTag(tag)"
|
|
||||||
class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors duration-200"
|
class="inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium transition-colors duration-200"
|
||||||
:class="[
|
:class="[
|
||||||
selectedTags.includes(tag)
|
selectedTags.includes(tag)
|
||||||
? 'bg-blue-600 text-white'
|
? 'bg-blue-600 text-white'
|
||||||
: 'bg-zinc-800 text-zinc-300 hover:bg-zinc-700',
|
: 'bg-zinc-800 text-zinc-300 hover:bg-zinc-700',
|
||||||
]"
|
]"
|
||||||
|
@click="toggleTag(tag)"
|
||||||
>
|
>
|
||||||
{{ tag }}
|
{{ tag }}
|
||||||
</button>
|
</button>
|
||||||
@ -85,7 +85,7 @@
|
|||||||
<img
|
<img
|
||||||
:src="useObject(article.image)"
|
:src="useObject(article.image)"
|
||||||
class="absolute blur-sm inset-0 w-full h-full object-cover transition-all duration-200 group-hover:scale-110"
|
class="absolute blur-sm inset-0 w-full h-full object-cover transition-all duration-200 group-hover:scale-110"
|
||||||
/>
|
>
|
||||||
<div
|
<div
|
||||||
class="absolute inset-0 bg-gradient-to-b from-transparent to-zinc-800 transition-all duration-200"
|
class="absolute inset-0 bg-gradient-to-b from-transparent to-zinc-800 transition-all duration-200"
|
||||||
/>
|
/>
|
||||||
@ -97,7 +97,7 @@
|
|||||||
<p
|
<p
|
||||||
class="relative mt-1 text-xs text-zinc-400 line-clamp-2"
|
class="relative mt-1 text-xs text-zinc-400 line-clamp-2"
|
||||||
v-html="formatExcerpt(article.description)"
|
v-html="formatExcerpt(article.description)"
|
||||||
></p>
|
/>
|
||||||
<div
|
<div
|
||||||
class="relative mt-2 flex items-center gap-x-2 text-xs text-zinc-500"
|
class="relative mt-2 flex items-center gap-x-2 text-xs text-zinc-500"
|
||||||
>
|
>
|
||||||
|
|||||||
@ -29,9 +29,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ml-4 flex shrink-0">
|
<div class="ml-4 flex shrink-0">
|
||||||
<button
|
<button
|
||||||
@click="() => deleteMe()"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="inline-flex rounded-md text-zinc-400 hover:text-zinc-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
|
class="inline-flex rounded-md text-zinc-400 hover:text-zinc-400 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2"
|
||||||
|
@click="() => deleteMe()"
|
||||||
>
|
>
|
||||||
<span class="sr-only">Close</span>
|
<span class="sr-only">Close</span>
|
||||||
<XMarkIcon class="size-5" aria-hidden="true" />
|
<XMarkIcon class="size-5" aria-hidden="true" />
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<Listbox as="div" v-model="typedModel">
|
<Listbox v-model="typedModel" as="div">
|
||||||
<ListboxLabel class="block text-sm font-medium leading-6 text-zinc-100"
|
<ListboxLabel class="block text-sm font-medium leading-6 text-zinc-100"
|
||||||
><slot
|
><slot
|
||||||
/></ListboxLabel>
|
/></ListboxLabel>
|
||||||
@ -32,11 +32,11 @@
|
|||||||
class="absolute z-10 mt-1 max-h-56 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-zinc-950 ring-opacity-5 focus:outline-none sm:text-sm"
|
class="absolute z-10 mt-1 max-h-56 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-zinc-950 ring-opacity-5 focus:outline-none sm:text-sm"
|
||||||
>
|
>
|
||||||
<ListboxOption
|
<ListboxOption
|
||||||
as="template"
|
|
||||||
v-for="[name, value] in Object.entries(values)"
|
v-for="[name, value] in Object.entries(values)"
|
||||||
:key="value"
|
:key="value"
|
||||||
:value="value"
|
|
||||||
v-slot="{ active, selected }"
|
v-slot="{ active, selected }"
|
||||||
|
as="template"
|
||||||
|
:value="value"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
:class="[
|
:class="[
|
||||||
|
|||||||
@ -51,17 +51,17 @@
|
|||||||
class="transition mt-2 block text-sm font-semibold text-zinc-400 group-hover:text-zinc-500"
|
class="transition mt-2 block text-sm font-semibold text-zinc-400 group-hover:text-zinc-500"
|
||||||
>Upload file</span
|
>Upload file</span
|
||||||
>
|
>
|
||||||
<p class="mt-1 text-xs text-zinc-400" v-if="currentFile">
|
<p v-if="currentFile" class="mt-1 text-xs text-zinc-400">
|
||||||
{{ currentFile.name }}
|
{{ currentFile.name }}
|
||||||
</p>
|
</p>
|
||||||
</label>
|
</label>
|
||||||
<input
|
<input
|
||||||
|
id="file-upload"
|
||||||
:accept="props.accept"
|
:accept="props.accept"
|
||||||
@change="(e) => file = (e.target as any)?.files"
|
|
||||||
class="hidden"
|
class="hidden"
|
||||||
type="file"
|
type="file"
|
||||||
id="file-upload"
|
@change="(e) => file = (e.target as any)?.files"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -70,16 +70,16 @@
|
|||||||
:disabled="currentFile == undefined"
|
:disabled="currentFile == undefined"
|
||||||
type="button"
|
type="button"
|
||||||
:loading="uploadLoading"
|
:loading="uploadLoading"
|
||||||
@click="() => uploadFile_wrapper()"
|
|
||||||
:class="['inline-flex w-full shadow-sm sm:ml-3 sm:w-auto']"
|
:class="['inline-flex w-full shadow-sm sm:ml-3 sm:w-auto']"
|
||||||
|
@click="() => uploadFile_wrapper()"
|
||||||
>
|
>
|
||||||
Upload
|
Upload
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
<button
|
<button
|
||||||
|
ref="cancelButtonRef"
|
||||||
type="button"
|
type="button"
|
||||||
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-800 hover:bg-zinc-900 sm:mt-0 sm:w-auto"
|
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-800 hover:bg-zinc-900 sm:mt-0 sm:w-auto"
|
||||||
@click="open = false"
|
@click="open = false"
|
||||||
ref="cancelButtonRef"
|
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
<img
|
<img
|
||||||
:src="useObject(user.profilePicture)"
|
:src="useObject(user.profilePicture)"
|
||||||
class="w-5 h-5 rounded-sm"
|
class="w-5 h-5 rounded-sm"
|
||||||
/>
|
>
|
||||||
<span class="ml-2 text-sm font-bold">{{ user.displayName }}</span>
|
<span class="ml-2 text-sm font-bold">{{ user.displayName }}</span>
|
||||||
<ChevronDownIcon class="ml-3 h-4" />
|
<ChevronDownIcon class="ml-3 h-4" />
|
||||||
</div>
|
</div>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
<img
|
<img
|
||||||
:src="useObject(user.profilePicture)"
|
:src="useObject(user.profilePicture)"
|
||||||
class="w-5 h-5 rounded-sm"
|
class="w-5 h-5 rounded-sm"
|
||||||
/>
|
>
|
||||||
<span class="ml-2 text-sm font-bold">{{ user.displayName }}</span>
|
<span class="ml-2 text-sm font-bold">{{ user.displayName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
@ -47,11 +47,11 @@
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
:href="nav.route"
|
:href="nav.route"
|
||||||
@click="() => navigateTo(nav.route, close)"
|
|
||||||
:class="[
|
:class="[
|
||||||
active ? 'bg-zinc-800 text-zinc-100' : 'text-zinc-400',
|
active ? 'bg-zinc-800 text-zinc-100' : 'text-zinc-400',
|
||||||
'text-left transition block px-4 py-2 text-sm',
|
'text-left transition block px-4 py-2 text-sm',
|
||||||
]"
|
]"
|
||||||
|
@click="() => navigateTo(nav.route, close)"
|
||||||
>
|
>
|
||||||
{{ nav.label }}
|
{{ nav.label }}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="inline-flex justify-center items-center gap-x-1 -mb-1 relative">
|
<div class="inline-flex justify-center items-center gap-x-1 -mb-1 relative">
|
||||||
<svg aria-hidden="true" viewBox="0 0 418 42" class="absolute inset-0 h-full w-full fill-blue-300/30 scale-75"
|
<svg
|
||||||
|
aria-hidden="true" viewBox="0 0 418 42" class="absolute inset-0 h-full w-full fill-blue-300/30 scale-75"
|
||||||
preserveAspectRatio="none">
|
preserveAspectRatio="none">
|
||||||
<path
|
<path
|
||||||
d="M203.371.916c-26.013-2.078-76.686 1.963-124.73 9.946L67.3 12.749C35.421 18.062 18.2 21.766 6.004 25.934 1.244 27.561.828 27.778.874 28.61c.07 1.214.828 1.121 9.595-1.176 9.072-2.377 17.15-3.92 39.246-7.496C123.565 7.986 157.869 4.492 195.942 5.046c7.461.108 19.25 1.696 19.17 2.582-.107 1.183-7.874 4.31-25.75 10.366-21.992 7.45-35.43 12.534-36.701 13.884-2.173 2.308-.202 4.407 4.442 4.734 2.654.187 3.263.157 15.593-.78 35.401-2.686 57.944-3.488 88.365-3.143 46.327.526 75.721 2.23 130.788 7.584 19.787 1.924 20.814 1.98 24.557 1.332l.066-.011c1.201-.203 1.53-1.825.399-2.335-2.911-1.31-4.893-1.604-22.048-3.261-57.509-5.556-87.871-7.36-132.059-7.842-23.239-.254-33.617-.116-50.627.674-11.629.54-42.371 2.494-46.696 2.967-2.359.259 8.133-3.625 26.504-9.81 23.239-7.825 27.934-10.149 28.304-14.005.417-4.348-3.529-6-16.878-7.066Z" />
|
d="M203.371.916c-26.013-2.078-76.686 1.963-124.73 9.946L67.3 12.749C35.421 18.062 18.2 21.766 6.004 25.934 1.244 27.561.828 27.778.874 28.61c.07 1.214.828 1.121 9.595-1.176 9.072-2.377 17.15-3.92 39.246-7.496C123.565 7.986 157.869 4.492 195.942 5.046c7.461.108 19.25 1.696 19.17 2.582-.107 1.183-7.874 4.31-25.75 10.366-21.992 7.45-35.43 12.534-36.701 13.884-2.173 2.308-.202 4.407 4.442 4.734 2.654.187 3.263.157 15.593-.78 35.401-2.686 57.944-3.488 88.365-3.143 46.327.526 75.721 2.23 130.788 7.584 19.787 1.924 20.814 1.98 24.557 1.332l.066-.011c1.201-.203 1.53-1.825.399-2.335-2.911-1.31-4.893-1.604-22.048-3.261-57.509-5.556-87.871-7.36-132.059-7.842-23.239-.254-33.617-.116-50.627.674-11.629.54-42.371 2.494-46.696 2.967-2.359.259 8.133-3.625 26.504-9.81 23.239-7.825 27.934-10.149 28.304-14.005.417-4.348-3.529-6-16.878-7.066Z" />
|
||||||
|
|||||||
@ -71,8 +71,8 @@ if (import.meta.client) {
|
|||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
v-else
|
v-else
|
||||||
@click="signIn"
|
|
||||||
class="text-sm font-semibold leading-7 text-blue-600"
|
class="text-sm font-semibold leading-7 text-blue-600"
|
||||||
|
@click="signIn"
|
||||||
>
|
>
|
||||||
Sign in <span aria-hidden="true">→</span>
|
Sign in <span aria-hidden="true">→</span>
|
||||||
</button>
|
</button>
|
||||||
@ -105,7 +105,7 @@ if (import.meta.client) {
|
|||||||
src="/wallpapers/error-wallpaper.jpg"
|
src="/wallpapers/error-wallpaper.jpg"
|
||||||
class="absolute inset-0 h-full w-full object-cover"
|
class="absolute inset-0 h-full w-full object-cover"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<UserFooter class="z-50" hydrate-on-interaction />
|
<UserFooter class="z-50" hydrate-on-interaction />
|
||||||
</div>
|
</div>
|
||||||
<div class="flex w-full min-h-screen bg-zinc-900" v-else>
|
<div v-else class="flex w-full min-h-screen bg-zinc-900">
|
||||||
<NuxtPage />
|
<NuxtPage />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -60,9 +60,9 @@
|
|||||||
<td class="whitespace-nowrap px-3 py-4 text-sm text-zinc-400">
|
<td class="whitespace-nowrap px-3 py-4 text-sm text-zinc-400">
|
||||||
<ul class="flex flex-col gap-y-2">
|
<ul class="flex flex-col gap-y-2">
|
||||||
<li
|
<li
|
||||||
class="inline-flex items-center gap-x-0.5"
|
|
||||||
v-for="capability in client.capabilities"
|
v-for="capability in client.capabilities"
|
||||||
:key="capability"
|
:key="capability"
|
||||||
|
class="inline-flex items-center gap-x-0.5"
|
||||||
>
|
>
|
||||||
<CheckIcon class="size-4" /> {{ capability }}
|
<CheckIcon class="size-4" /> {{ capability }}
|
||||||
</li>
|
</li>
|
||||||
@ -75,8 +75,8 @@
|
|||||||
class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-3"
|
class="relative whitespace-nowrap py-4 pl-3 pr-4 text-right text-sm font-medium sm:pr-3"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
@click="() => revokeClientWrapper(client.id)"
|
|
||||||
class="text-red-600 hover:text-red-900"
|
class="text-red-600 hover:text-red-900"
|
||||||
|
@click="() => revokeClientWrapper(client.id)"
|
||||||
>
|
>
|
||||||
Revoke<span class="sr-only">, {{ client.name }}</span>
|
Revoke<span class="sr-only">, {{ client.name }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -113,7 +113,7 @@
|
|||||||
class="h-[min(152px,40cqw)] object-cover"
|
class="h-[min(152px,40cqw)] object-cover"
|
||||||
src="https://tailwindcss.com/plus-assets/img/component-images/bento-03-security.png"
|
src="https://tailwindcss.com/plus-assets/img/component-images/bento-03-security.png"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
<div class="flex flex-col gap-y-4 max-w-lg">
|
<div class="flex flex-col gap-y-4 max-w-lg">
|
||||||
<Listbox
|
<Listbox
|
||||||
as="div"
|
as="div"
|
||||||
v-on:update:model-value="(value) => updateCurrentlySelectedVersion(value)"
|
|
||||||
:model-value="currentlySelectedVersion"
|
:model-value="currentlySelectedVersion"
|
||||||
|
@update:model-value="(value) => updateCurrentlySelectedVersion(value)"
|
||||||
>
|
>
|
||||||
<ListboxLabel class="block text-sm font-medium leading-6 text-zinc-100"
|
<ListboxLabel class="block text-sm font-medium leading-6 text-zinc-100"
|
||||||
>Select version to import</ListboxLabel
|
>Select version to import</ListboxLabel
|
||||||
@ -37,11 +37,11 @@
|
|||||||
class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-zinc-800 focus:outline-none sm:text-sm"
|
class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-zinc-800 focus:outline-none sm:text-sm"
|
||||||
>
|
>
|
||||||
<ListboxOption
|
<ListboxOption
|
||||||
as="template"
|
|
||||||
v-for="(version, versionIdx) in versions"
|
v-for="(version, versionIdx) in versions"
|
||||||
:key="version"
|
:key="version"
|
||||||
:value="versionIdx"
|
|
||||||
v-slot="{ active, selected }"
|
v-slot="{ active, selected }"
|
||||||
|
as="template"
|
||||||
|
:value="versionIdx"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
:class="[
|
:class="[
|
||||||
@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</Listbox>
|
</Listbox>
|
||||||
|
|
||||||
<div class="flex flex-col gap-8" v-if="versionGuesses">
|
<div v-if="versionGuesses" class="flex flex-col gap-8">
|
||||||
<!-- setup executable -->
|
<!-- setup executable -->
|
||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
@ -93,15 +93,15 @@
|
|||||||
<Combobox
|
<Combobox
|
||||||
as="div"
|
as="div"
|
||||||
:value="versionSettings.setup"
|
:value="versionSettings.setup"
|
||||||
@update:model-value="(v) => updateSetupCommand(v)"
|
|
||||||
nullable
|
nullable
|
||||||
|
@update:model-value="(v) => updateSetupCommand(v)"
|
||||||
>
|
>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<ComboboxInput
|
<ComboboxInput
|
||||||
class="block flex-1 border-0 py-1.5 pl-1 bg-transparent text-zinc-100 placeholder:text-zinc-400 focus:ring-0 sm:text-sm sm:leading-6"
|
class="block flex-1 border-0 py-1.5 pl-1 bg-transparent text-zinc-100 placeholder:text-zinc-400 focus:ring-0 sm:text-sm sm:leading-6"
|
||||||
|
:placeholder="'setup.exe'"
|
||||||
@change="setupProcessQuery = $event.target.value"
|
@change="setupProcessQuery = $event.target.value"
|
||||||
@blur="setupProcessQuery = ''"
|
@blur="setupProcessQuery = ''"
|
||||||
:placeholder="'setup.exe'"
|
|
||||||
/>
|
/>
|
||||||
<ComboboxButton
|
<ComboboxButton
|
||||||
v-if="setupFilteredVersionGuesses?.length ?? 0 > 0"
|
v-if="setupFilteredVersionGuesses?.length ?? 0 > 0"
|
||||||
@ -119,9 +119,9 @@
|
|||||||
<ComboboxOption
|
<ComboboxOption
|
||||||
v-for="guess in setupFilteredVersionGuesses"
|
v-for="guess in setupFilteredVersionGuesses"
|
||||||
:key="guess.filename"
|
:key="guess.filename"
|
||||||
|
v-slot="{ active, selected }"
|
||||||
:value="guess.filename"
|
:value="guess.filename"
|
||||||
as="template"
|
as="template"
|
||||||
v-slot="{ active, selected }"
|
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
:class="[
|
:class="[
|
||||||
@ -156,9 +156,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ComboboxOption>
|
</ComboboxOption>
|
||||||
<ComboboxOption
|
<ComboboxOption
|
||||||
:value="setupProcessQuery"
|
|
||||||
v-if="setupProcessQuery"
|
v-if="setupProcessQuery"
|
||||||
v-slot="{ active, selected }"
|
v-slot="{ active, selected }"
|
||||||
|
:value="setupProcessQuery"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
:class="[
|
:class="[
|
||||||
@ -189,13 +189,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</Combobox>
|
</Combobox>
|
||||||
<input
|
<input
|
||||||
type="text"
|
|
||||||
name="startup"
|
|
||||||
id="startup"
|
id="startup"
|
||||||
v-model="versionSettings.setupArgs"
|
v-model="versionSettings.setupArgs"
|
||||||
|
type="text"
|
||||||
|
name="startup"
|
||||||
class="border-l border-zinc-700 block flex-1 border-0 py-1.5 pl-2 bg-transparent text-zinc-100 placeholder:text-zinc-400 focus:ring-0 sm:text-sm sm:leading-6"
|
class="border-l border-zinc-700 block flex-1 border-0 py-1.5 pl-2 bg-transparent text-zinc-100 placeholder:text-zinc-400 focus:ring-0 sm:text-sm sm:leading-6"
|
||||||
placeholder="--setup"
|
placeholder="--setup"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -249,15 +249,15 @@
|
|||||||
<Combobox
|
<Combobox
|
||||||
as="div"
|
as="div"
|
||||||
:value="versionSettings.launch"
|
:value="versionSettings.launch"
|
||||||
@update:model-value="(v) => updateLaunchCommand(v)"
|
|
||||||
nullable
|
nullable
|
||||||
|
@update:model-value="(v) => updateLaunchCommand(v)"
|
||||||
>
|
>
|
||||||
<div class="relative">
|
<div class="relative">
|
||||||
<ComboboxInput
|
<ComboboxInput
|
||||||
class="block flex-1 border-0 py-1.5 pl-1 bg-transparent text-zinc-100 placeholder:text-zinc-400 focus:ring-0 sm:text-sm sm:leading-6"
|
class="block flex-1 border-0 py-1.5 pl-1 bg-transparent text-zinc-100 placeholder:text-zinc-400 focus:ring-0 sm:text-sm sm:leading-6"
|
||||||
|
:placeholder="'game.exe'"
|
||||||
@change="launchProcessQuery = $event.target.value"
|
@change="launchProcessQuery = $event.target.value"
|
||||||
@blur="launchProcessQuery = ''"
|
@blur="launchProcessQuery = ''"
|
||||||
:placeholder="'game.exe'"
|
|
||||||
/>
|
/>
|
||||||
<ComboboxButton
|
<ComboboxButton
|
||||||
v-if="launchFilteredVersionGuesses?.length ?? 0 > 0"
|
v-if="launchFilteredVersionGuesses?.length ?? 0 > 0"
|
||||||
@ -275,9 +275,9 @@
|
|||||||
<ComboboxOption
|
<ComboboxOption
|
||||||
v-for="guess in launchFilteredVersionGuesses"
|
v-for="guess in launchFilteredVersionGuesses"
|
||||||
:key="guess.filename"
|
:key="guess.filename"
|
||||||
|
v-slot="{ active, selected }"
|
||||||
:value="guess.filename"
|
:value="guess.filename"
|
||||||
as="template"
|
as="template"
|
||||||
v-slot="{ active, selected }"
|
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
:class="[
|
:class="[
|
||||||
@ -312,9 +312,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ComboboxOption>
|
</ComboboxOption>
|
||||||
<ComboboxOption
|
<ComboboxOption
|
||||||
:value="launchProcessQuery"
|
|
||||||
v-if="launchProcessQuery"
|
v-if="launchProcessQuery"
|
||||||
v-slot="{ active, selected }"
|
v-slot="{ active, selected }"
|
||||||
|
:value="launchProcessQuery"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
:class="[
|
:class="[
|
||||||
@ -345,18 +345,18 @@
|
|||||||
</div>
|
</div>
|
||||||
</Combobox>
|
</Combobox>
|
||||||
<input
|
<input
|
||||||
type="text"
|
|
||||||
name="startup"
|
|
||||||
id="startup"
|
id="startup"
|
||||||
v-model="versionSettings.launchArgs"
|
v-model="versionSettings.launchArgs"
|
||||||
|
type="text"
|
||||||
|
name="startup"
|
||||||
class="border-l border-zinc-700 block flex-1 border-0 py-1.5 pl-2 bg-transparent text-zinc-100 placeholder:text-zinc-400 focus:ring-0 sm:text-sm sm:leading-6"
|
class="border-l border-zinc-700 block flex-1 border-0 py-1.5 pl-2 bg-transparent text-zinc-100 placeholder:text-zinc-400 focus:ring-0 sm:text-sm sm:leading-6"
|
||||||
placeholder="--launch"
|
placeholder="--launch"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="absolute inset-0 bg-zinc-900/50"
|
|
||||||
v-if="versionSettings.onlySetup"
|
v-if="versionSettings.onlySetup"
|
||||||
|
class="absolute inset-0 bg-zinc-900/50"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -393,7 +393,7 @@
|
|||||||
/>
|
/>
|
||||||
</Switch>
|
</Switch>
|
||||||
</SwitchGroup>
|
</SwitchGroup>
|
||||||
<Disclosure as="div" class="py-2" v-slot="{ open }">
|
<Disclosure v-slot="{ open }" as="div" class="py-2">
|
||||||
<dt>
|
<dt>
|
||||||
<DisclosureButton
|
<DisclosureButton
|
||||||
class="border-b border-zinc-600 pb-2 flex w-full items-start justify-between text-left text-zinc-100"
|
class="border-b border-zinc-600 pb-2 flex w-full items-start justify-between text-left text-zinc-100"
|
||||||
@ -453,15 +453,15 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
id="umu-id"
|
id="umu-id"
|
||||||
|
v-model="umuId"
|
||||||
name="umu-id"
|
name="umu-id"
|
||||||
type="text"
|
type="text"
|
||||||
autocomplete="umu-id"
|
autocomplete="umu-id"
|
||||||
required
|
required
|
||||||
:disabled="!umuIdEnabled"
|
:disabled="!umuIdEnabled"
|
||||||
v-model="umuId"
|
|
||||||
placeholder="umu-starcitizen"
|
placeholder="umu-starcitizen"
|
||||||
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-950 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-950 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -473,9 +473,9 @@
|
|||||||
</Disclosure>
|
</Disclosure>
|
||||||
|
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
@click="startImport_wrapper"
|
|
||||||
class="w-fit"
|
class="w-fit"
|
||||||
:loading="importLoading"
|
:loading="importLoading"
|
||||||
|
@click="startImport_wrapper"
|
||||||
>
|
>
|
||||||
Import
|
Import
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
|
|||||||
@ -8,7 +8,7 @@
|
|||||||
class="flex flex-col lg:flex-row lg:justify-between items-start lg:items-center gap-2"
|
class="flex flex-col lg:flex-row lg:justify-between items-start lg:items-center gap-2"
|
||||||
>
|
>
|
||||||
<div class="inline-flex items-center gap-4">
|
<div class="inline-flex items-center gap-4">
|
||||||
<img :src="useObject(game.mIconId)" class="size-20" />
|
<img :src="useObject(game.mIconId)" class="size-20" >
|
||||||
<div>
|
<div>
|
||||||
<h1 class="text-5xl font-bold font-display text-zinc-100">
|
<h1 class="text-5xl font-bold font-display text-zinc-100">
|
||||||
{{ game.mName }}
|
{{ game.mName }}
|
||||||
@ -19,9 +19,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
@click="() => (showEditCoreMetadata = true)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="relative inline-flex gap-x-3 items-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
class="relative inline-flex gap-x-3 items-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||||
|
@click="() => (showEditCoreMetadata = true)"
|
||||||
>
|
>
|
||||||
Edit <PencilIcon class="size-4" />
|
Edit <PencilIcon class="size-4" />
|
||||||
</button>
|
</button>
|
||||||
@ -44,9 +44,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ml-4 mt-4 shrink-0">
|
<div class="ml-4 mt-4 shrink-0">
|
||||||
<button
|
<button
|
||||||
@click="() => (showAddCarouselModal = true)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="relative inline-flex items-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
class="relative inline-flex items-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||||
|
@click="() => (showAddCarouselModal = true)"
|
||||||
>
|
>
|
||||||
Add from image library
|
Add from image library
|
||||||
</button>
|
</button>
|
||||||
@ -54,28 +54,28 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="text-zinc-400 text-center py-8"
|
|
||||||
v-if="game.mImageCarousel.length == 0"
|
v-if="game.mImageCarousel.length == 0"
|
||||||
|
class="text-zinc-400 text-center py-8"
|
||||||
>
|
>
|
||||||
No images added to the carousel yet.
|
No images added to the carousel yet.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<draggable
|
<draggable
|
||||||
v-else
|
v-else
|
||||||
@update="() => updateImageCarousel()"
|
|
||||||
:list="game.mImageCarousel"
|
:list="game.mImageCarousel"
|
||||||
class="w-full flex flex-row gap-x-4 overflow-x-auto my-2 py-4"
|
class="w-full flex flex-row gap-x-4 overflow-x-auto my-2 py-4"
|
||||||
|
@update="() => updateImageCarousel()"
|
||||||
>
|
>
|
||||||
<template #item="{ element }: { element: string }">
|
<template #item="{ element }: { element: string }">
|
||||||
<div class="relative group min-w-fit">
|
<div class="relative group min-w-fit">
|
||||||
<img :src="useObject(element)" class="h-48 w-auto" />
|
<img :src="useObject(element)" class="h-48 w-auto" >
|
||||||
<div
|
<div
|
||||||
class="transition-all lg:opacity-0 lg:group-hover:opacity-100 absolute inset-0 flex flex-col items-center justify-center gap-y-2 bg-zinc-950/50"
|
class="transition-all lg:opacity-0 lg:group-hover:opacity-100 absolute inset-0 flex flex-col items-center justify-center gap-y-2 bg-zinc-950/50"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
@click="() => removeImageFromCarousel(element)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||||
|
@click="() => removeImageFromCarousel(element)"
|
||||||
>
|
>
|
||||||
Remove image
|
Remove image
|
||||||
</button>
|
</button>
|
||||||
@ -129,10 +129,10 @@
|
|||||||
</button>
|
</button>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
|
class="block lg:hidden"
|
||||||
@click="
|
@click="
|
||||||
() => (mobileShowFinalDescription = !mobileShowFinalDescription)
|
() => (mobileShowFinalDescription = !mobileShowFinalDescription)
|
||||||
"
|
"
|
||||||
class="block lg:hidden"
|
|
||||||
>
|
>
|
||||||
<DocumentIcon
|
<DocumentIcon
|
||||||
v-if="!mobileShowFinalDescription"
|
v-if="!mobileShowFinalDescription"
|
||||||
@ -166,7 +166,7 @@
|
|||||||
'lg:block prose prose-invert prose-blue bg-zinc-950/30 rounded px-4 py-3',
|
'lg:block prose prose-invert prose-blue bg-zinc-950/30 rounded px-4 py-3',
|
||||||
]"
|
]"
|
||||||
v-html="descriptionHTML"
|
v-html="descriptionHTML"
|
||||||
></div>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -229,9 +229,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex-shrink-0">
|
<div class="flex-shrink-0">
|
||||||
<button
|
<button
|
||||||
@click="() => (showUploadModal = true)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="relative inline-flex items-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
class="relative inline-flex items-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||||
|
@click="() => (showUploadModal = true)"
|
||||||
>
|
>
|
||||||
Upload
|
Upload
|
||||||
</button>
|
</button>
|
||||||
@ -244,30 +244,30 @@
|
|||||||
:key="image"
|
:key="image"
|
||||||
class="group relative flex items-center bg-zinc-950/30"
|
class="group relative flex items-center bg-zinc-950/30"
|
||||||
>
|
>
|
||||||
<img :src="useObject(image)" class="w-full h-auto" />
|
<img :src="useObject(image)" class="w-full h-auto" >
|
||||||
<div
|
<div
|
||||||
class="transition-all lg:opacity-0 lg:group-hover:opacity-100 absolute inset-0 flex flex-col items-center justify-center gap-y-2 bg-zinc-950/50"
|
class="transition-all lg:opacity-0 lg:group-hover:opacity-100 absolute inset-0 flex flex-col items-center justify-center gap-y-2 bg-zinc-950/50"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
v-if="image !== game.mBannerId"
|
v-if="image !== game.mBannerId"
|
||||||
@click="() => updateBannerImage(image)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||||
|
@click="() => updateBannerImage(image)"
|
||||||
>
|
>
|
||||||
Set as banner
|
Set as banner
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
v-if="image !== game.mCoverId"
|
v-if="image !== game.mCoverId"
|
||||||
@click="() => updateCoverImage(image)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||||
|
@click="() => updateCoverImage(image)"
|
||||||
>
|
>
|
||||||
Set as cover
|
Set as cover
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
@click="() => deleteImage(image)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="inline-flex items-center gap-x-1.5 rounded-md bg-red-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-red-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-600"
|
class="inline-flex items-center gap-x-1.5 rounded-md bg-red-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-red-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-600"
|
||||||
|
@click="() => deleteImage(image)"
|
||||||
>
|
>
|
||||||
Delete image
|
Delete image
|
||||||
</button>
|
</button>
|
||||||
@ -305,10 +305,10 @@
|
|||||||
|
|
||||||
<div class="mt-4 text-center w-full text-sm text-zinc-600">lowest</div>
|
<div class="mt-4 text-center w-full text-sm text-zinc-600">lowest</div>
|
||||||
<draggable
|
<draggable
|
||||||
@update="() => updateVersionOrder()"
|
|
||||||
:list="game.versions"
|
:list="game.versions"
|
||||||
handle=".handle"
|
handle=".handle"
|
||||||
class="mt-2 space-y-4"
|
class="mt-2 space-y-4"
|
||||||
|
@update="() => updateVersionOrder()"
|
||||||
>
|
>
|
||||||
<template #item="{ element: item }: { element: GameVersion }">
|
<template #item="{ element: item }: { element: GameVersion }">
|
||||||
<div
|
<div
|
||||||
@ -334,8 +334,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</draggable>
|
</draggable>
|
||||||
<div
|
<div
|
||||||
class="text-center font-bold text-zinc-400 my-3"
|
|
||||||
v-if="game.versions.length == 0"
|
v-if="game.versions.length == 0"
|
||||||
|
class="text-center font-bold text-zinc-400 my-3"
|
||||||
>
|
>
|
||||||
no versions added
|
no versions added
|
||||||
</div>
|
</div>
|
||||||
@ -358,14 +358,14 @@
|
|||||||
:key="image"
|
:key="image"
|
||||||
class="group relative flex items-center bg-zinc-950/30"
|
class="group relative flex items-center bg-zinc-950/30"
|
||||||
>
|
>
|
||||||
<img :src="useObject(image)" class="w-full h-auto" />
|
<img :src="useObject(image)" class="w-full h-auto" >
|
||||||
<div
|
<div
|
||||||
class="transition-all lg:opacity-0 lg:group-hover:opacity-100 absolute inset-0 flex flex-col items-center justify-center gap-y-2 bg-zinc-950/50"
|
class="transition-all lg:opacity-0 lg:group-hover:opacity-100 absolute inset-0 flex flex-col items-center justify-center gap-y-2 bg-zinc-950/50"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
@click="() => addImageToCarousel(image)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||||
|
@click="() => addImageToCarousel(image)"
|
||||||
>
|
>
|
||||||
Add
|
Add
|
||||||
</button>
|
</button>
|
||||||
@ -381,10 +381,10 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<button
|
<button
|
||||||
|
ref="cancelButtonRef"
|
||||||
type="button"
|
type="button"
|
||||||
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-900 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-700 hover:bg-zinc-950 sm:mt-0 sm:w-auto"
|
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-900 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-700 hover:bg-zinc-950 sm:mt-0 sm:w-auto"
|
||||||
@click="showAddCarouselModal = false"
|
@click="showAddCarouselModal = false"
|
||||||
ref="cancelButtonRef"
|
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
@ -398,14 +398,14 @@
|
|||||||
:key="image"
|
:key="image"
|
||||||
class="group relative flex items-center bg-zinc-950/30"
|
class="group relative flex items-center bg-zinc-950/30"
|
||||||
>
|
>
|
||||||
<img :src="useObject(image)" class="w-full h-auto" />
|
<img :src="useObject(image)" class="w-full h-auto" >
|
||||||
<div
|
<div
|
||||||
class="transition-all lg:opacity-0 lg:group-hover:opacity-100 absolute inset-0 flex flex-col items-center justify-center gap-y-2 bg-zinc-950/50"
|
class="transition-all lg:opacity-0 lg:group-hover:opacity-100 absolute inset-0 flex flex-col items-center justify-center gap-y-2 bg-zinc-950/50"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
@click="() => insertImageAtCursor(image)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
class="inline-flex items-center gap-x-1.5 rounded-md bg-blue-600 px-1.5 py-0.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||||
|
@click="() => insertImageAtCursor(image)"
|
||||||
>
|
>
|
||||||
Insert
|
Insert
|
||||||
</button>
|
</button>
|
||||||
@ -421,10 +421,10 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #buttons>
|
<template #buttons>
|
||||||
<button
|
<button
|
||||||
|
ref="cancelButtonRef"
|
||||||
type="button"
|
type="button"
|
||||||
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-900 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-700 hover:bg-zinc-950 sm:mt-0 sm:w-auto"
|
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-900 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-700 hover:bg-zinc-950 sm:mt-0 sm:w-auto"
|
||||||
@click="showAddCarouselModal = false"
|
@click="showAddCarouselModal = false"
|
||||||
ref="cancelButtonRef"
|
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
@ -435,7 +435,7 @@
|
|||||||
<div class="flex flex-col lg:flex-row gap-6">
|
<div class="flex flex-col lg:flex-row gap-6">
|
||||||
<!-- icon upload div -->
|
<!-- icon upload div -->
|
||||||
<div class="flex flex-col items-center gap-4">
|
<div class="flex flex-col items-center gap-4">
|
||||||
<img :src="coreMetadataIconUrl" class="size-24 aspect-square" />
|
<img :src="coreMetadataIconUrl" class="size-24 aspect-square" >
|
||||||
<label for="file-upload">
|
<label for="file-upload">
|
||||||
<span
|
<span
|
||||||
type="button"
|
type="button"
|
||||||
@ -444,12 +444,12 @@
|
|||||||
Upload
|
Upload
|
||||||
</span>
|
</span>
|
||||||
<input
|
<input
|
||||||
|
id="file-upload"
|
||||||
accept="image/*"
|
accept="image/*"
|
||||||
@change="(e) => coreMetadataUploadFiles(e as any)"
|
|
||||||
class="hidden"
|
class="hidden"
|
||||||
type="file"
|
type="file"
|
||||||
id="file-upload"
|
@change="(e) => coreMetadataUploadFiles(e as any)"
|
||||||
/>
|
>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<!-- edit title -->
|
<!-- edit title -->
|
||||||
@ -460,12 +460,12 @@
|
|||||||
>
|
>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
|
id="name"
|
||||||
|
v-model="coreMetadataName"
|
||||||
type="text"
|
type="text"
|
||||||
name="name"
|
name="name"
|
||||||
id="name"
|
|
||||||
class="block w-full rounded-md bg-zinc-800 px-3 py-1.5 text-base text-zinc-100 outline outline-1 -outline-offset-1 outline-zinc-700 placeholder:text-zinc-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600 sm:text-sm/6"
|
class="block w-full rounded-md bg-zinc-800 px-3 py-1.5 text-base text-zinc-100 outline outline-1 -outline-offset-1 outline-zinc-700 placeholder:text-zinc-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600 sm:text-sm/6"
|
||||||
v-model="coreMetadataName"
|
>
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@ -476,12 +476,12 @@
|
|||||||
>
|
>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
|
id="description"
|
||||||
|
v-model="coreMetadataDescription"
|
||||||
type="text"
|
type="text"
|
||||||
name="description"
|
name="description"
|
||||||
id="description"
|
|
||||||
class="block w-full rounded-md bg-zinc-800 px-3 py-1.5 text-base text-zinc-100 outline outline-1 -outline-offset-1 outline-zinc-700 placeholder:text-zinc-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600 sm:text-sm/6"
|
class="block w-full rounded-md bg-zinc-800 px-3 py-1.5 text-base text-zinc-100 outline outline-1 -outline-offset-1 outline-zinc-700 placeholder:text-zinc-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600 sm:text-sm/6"
|
||||||
v-model="coreMetadataDescription"
|
>
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -491,16 +491,16 @@
|
|||||||
<LoadingButton
|
<LoadingButton
|
||||||
type="button"
|
type="button"
|
||||||
:loading="coreMetadataLoading"
|
:loading="coreMetadataLoading"
|
||||||
@click="() => coreMetadataUpdate_wrapper()"
|
|
||||||
:class="['inline-flex w-full shadow-sm sm:ml-3 sm:w-auto']"
|
:class="['inline-flex w-full shadow-sm sm:ml-3 sm:w-auto']"
|
||||||
|
@click="() => coreMetadataUpdate_wrapper()"
|
||||||
>
|
>
|
||||||
Save
|
Save
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
<button
|
<button
|
||||||
|
ref="cancelButtonRef"
|
||||||
type="button"
|
type="button"
|
||||||
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-900 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-700 hover:bg-zinc-950 sm:mt-0 sm:w-auto"
|
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-900 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-700 hover:bg-zinc-950 sm:mt-0 sm:w-auto"
|
||||||
@click="showEditCoreMetadata = false"
|
@click="showEditCoreMetadata = false"
|
||||||
ref="cancelButtonRef"
|
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex flex-col gap-y-6 w-full max-w-md">
|
<div class="flex flex-col gap-y-6 w-full max-w-md">
|
||||||
<Listbox as="div" v-on:update:model-value="(value) => updateSelectedGame_wrapper(value)"
|
<Listbox
|
||||||
:model="currentlySelectedGame">
|
as="div" :model="currentlySelectedGame"
|
||||||
|
@update:model-value="(value) => updateSelectedGame_wrapper(value)">
|
||||||
<ListboxLabel class="block text-sm font-medium leading-6 text-zinc-100">Select game to import</ListboxLabel>
|
<ListboxLabel class="block text-sm font-medium leading-6 text-zinc-100">Select game to import</ListboxLabel>
|
||||||
<div class="relative mt-2">
|
<div class="relative mt-2">
|
||||||
<ListboxButton
|
<ListboxButton
|
||||||
@ -15,22 +16,27 @@
|
|||||||
</span>
|
</span>
|
||||||
</ListboxButton>
|
</ListboxButton>
|
||||||
|
|
||||||
<transition leave-active-class="transition ease-in duration-100" leave-from-class="opacity-100"
|
<transition
|
||||||
|
leave-active-class="transition ease-in duration-100" leave-from-class="opacity-100"
|
||||||
leave-to-class="opacity-0">
|
leave-to-class="opacity-0">
|
||||||
<ListboxOptions
|
<ListboxOptions
|
||||||
class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-zinc-800 focus:outline-none sm:text-sm">
|
class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-zinc-800 focus:outline-none sm:text-sm">
|
||||||
<ListboxOption as="template" v-for="(game, gameIdx) in games.unimportedGames" :key="game" :value="gameIdx"
|
<ListboxOption
|
||||||
v-slot="{ active, selected }">
|
v-for="(game, gameIdx) in games.unimportedGames" :key="game" v-slot="{ active, selected }" as="template"
|
||||||
<li :class="[
|
:value="gameIdx">
|
||||||
|
<li
|
||||||
|
:class="[
|
||||||
active ? 'bg-blue-600 text-white' : 'text-zinc-100',
|
active ? 'bg-blue-600 text-white' : 'text-zinc-100',
|
||||||
'relative cursor-default select-none py-2 pl-3 pr-9',
|
'relative cursor-default select-none py-2 pl-3 pr-9',
|
||||||
]">
|
]">
|
||||||
<span :class="[
|
<span
|
||||||
|
:class="[
|
||||||
selected ? 'font-semibold' : 'font-normal',
|
selected ? 'font-semibold' : 'font-normal',
|
||||||
'block truncate',
|
'block truncate',
|
||||||
]">{{ game }}</span>
|
]">{{ game }}</span>
|
||||||
|
|
||||||
<span v-if="selected" :class="[
|
<span
|
||||||
|
v-if="selected" :class="[
|
||||||
active ? 'text-white' : 'text-blue-600',
|
active ? 'text-white' : 'text-blue-600',
|
||||||
'absolute inset-y-0 right-0 flex items-center pr-4',
|
'absolute inset-y-0 right-0 flex items-center pr-4',
|
||||||
]">
|
]">
|
||||||
@ -46,7 +52,7 @@
|
|||||||
<div v-if="currentlySelectedGame !== -1" class="flex flex-col gap-y-4">
|
<div v-if="currentlySelectedGame !== -1" class="flex flex-col gap-y-4">
|
||||||
<!-- without metadata option -->
|
<!-- without metadata option -->
|
||||||
<div>
|
<div>
|
||||||
<LoadingButton @click="() => importGame_wrapper(false)" class="w-fit" :loading="importLoading">Import without
|
<LoadingButton class="w-fit" :loading="importLoading" @click="() => importGame_wrapper(false)">Import without
|
||||||
metadata
|
metadata
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
|
|
||||||
@ -60,12 +66,13 @@
|
|||||||
|
|
||||||
<!-- with metadata option -->
|
<!-- with metadata option -->
|
||||||
<div class="flex flex-col gap-y-4">
|
<div class="flex flex-col gap-y-4">
|
||||||
<Listbox as="div" v-if="metadataResults && metadataResults.length > 0" v-model="currentlySelectedMetadata">
|
<Listbox v-if="metadataResults && metadataResults.length > 0" v-model="currentlySelectedMetadata" as="div">
|
||||||
<ListboxLabel class="block text-sm font-medium leading-6 text-zinc-100">Select game</ListboxLabel>
|
<ListboxLabel class="block text-sm font-medium leading-6 text-zinc-100">Select game</ListboxLabel>
|
||||||
<div class="relative mt-2">
|
<div class="relative mt-2">
|
||||||
<ListboxButton
|
<ListboxButton
|
||||||
class="relative w-full cursor-default rounded-md bg-zinc-950 py-1.5 pl-3 pr-10 text-left text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-800 focus:outline-none focus:ring-2 focus:ring-blue-600 sm:text-sm sm:leading-6">
|
class="relative w-full cursor-default rounded-md bg-zinc-950 py-1.5 pl-3 pr-10 text-left text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-800 focus:outline-none focus:ring-2 focus:ring-blue-600 sm:text-sm sm:leading-6">
|
||||||
<GameSearchResultWidget v-if="currentlySelectedMetadata != -1"
|
<GameSearchResultWidget
|
||||||
|
v-if="currentlySelectedMetadata != -1"
|
||||||
:game="metadataResults[currentlySelectedMetadata]" />
|
:game="metadataResults[currentlySelectedMetadata]" />
|
||||||
<span v-else class="block truncate text-zinc-600">Please select a game...</span>
|
<span v-else class="block truncate text-zinc-600">Please select a game...</span>
|
||||||
<span class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
|
<span class="pointer-events-none absolute inset-y-0 right-0 flex items-center pr-2">
|
||||||
@ -73,13 +80,16 @@
|
|||||||
</span>
|
</span>
|
||||||
</ListboxButton>
|
</ListboxButton>
|
||||||
|
|
||||||
<transition leave-active-class="transition ease-in duration-100" leave-from-class="opacity-100"
|
<transition
|
||||||
|
leave-active-class="transition ease-in duration-100" leave-from-class="opacity-100"
|
||||||
leave-to-class="opacity-0">
|
leave-to-class="opacity-0">
|
||||||
<ListboxOptions
|
<ListboxOptions
|
||||||
class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
|
class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
|
||||||
<ListboxOption as="template" v-for="(result, resultIdx) in metadataResults" :key="result.id"
|
<ListboxOption
|
||||||
:value="resultIdx" v-slot="{ active, selected }">
|
v-for="(result, resultIdx) in metadataResults" :key="result.id" v-slot="{ active, selected }"
|
||||||
<li :class="[
|
as="template" :value="resultIdx">
|
||||||
|
<li
|
||||||
|
:class="[
|
||||||
active ? 'bg-blue-600 text-white' : 'text-zinc-100',
|
active ? 'bg-blue-600 text-white' : 'text-zinc-100',
|
||||||
'relative cursor-default select-none py-2 pl-3 pr-9',
|
'relative cursor-default select-none py-2 pl-3 pr-9',
|
||||||
]">
|
]">
|
||||||
@ -90,10 +100,12 @@
|
|||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
</Listbox>
|
</Listbox>
|
||||||
<div v-else-if="gameSearchResultsLoading" role="status"
|
<div
|
||||||
|
v-else-if="gameSearchResultsLoading" role="status"
|
||||||
class="inline-flex text-zinc-100 font-display font-semibold items-center gap-x-4">
|
class="inline-flex text-zinc-100 font-display font-semibold items-center gap-x-4">
|
||||||
Loading game results...
|
Loading game results...
|
||||||
<svg aria-hidden="true" class="w-6 h-6 text-transparent animate-spin fill-white" viewBox="0 0 100 101"
|
<svg
|
||||||
|
aria-hidden="true" class="w-6 h-6 text-transparent animate-spin fill-white" viewBox="0 0 100 101"
|
||||||
fill="none" xmlns="http://www.w3.org/2000/svg">
|
fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path
|
<path
|
||||||
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
|
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
|
||||||
@ -119,8 +131,9 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<LoadingButton @click="() => importGame_wrapper()" class="w-fit" :loading="importLoading"
|
<LoadingButton
|
||||||
:disabled="currentlySelectedMetadata === -1">Import
|
class="w-fit" :loading="importLoading" :disabled="currentlySelectedMetadata === -1"
|
||||||
|
@click="() => importGame_wrapper()">Import
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
|
|
||||||
<div v-if="importError" class="mt-4 w-fit rounded-md bg-red-600/10 p-4">
|
<div v-if="importError" class="mt-4 w-fit rounded-md bg-red-600/10 p-4">
|
||||||
|
|||||||
@ -43,13 +43,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="mt-2 grid grid-cols-1">
|
<div class="mt-2 grid grid-cols-1">
|
||||||
<input
|
<input
|
||||||
|
id="search"
|
||||||
|
v-model="searchQuery"
|
||||||
type="text"
|
type="text"
|
||||||
name="search"
|
name="search"
|
||||||
id="search"
|
|
||||||
class="col-start-1 row-start-1 block w-full rounded-md bg-zinc-900 py-1.5 pl-10 pr-3 text-base text-zinc-100 outline outline-1 -outline-offset-1 outline-zinc-700 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600 sm:pl-9 sm:text-sm/6"
|
class="col-start-1 row-start-1 block w-full rounded-md bg-zinc-900 py-1.5 pl-10 pr-3 text-base text-zinc-100 outline outline-1 -outline-offset-1 outline-zinc-700 placeholder:text-gray-400 focus:outline focus:outline-2 focus:-outline-offset-2 focus:outline-blue-600 sm:pl-9 sm:text-sm/6"
|
||||||
placeholder="Search library..."
|
placeholder="Search library..."
|
||||||
v-model="searchQuery"
|
>
|
||||||
/>
|
|
||||||
<MagnifyingGlassIcon
|
<MagnifyingGlassIcon
|
||||||
class="pointer-events-none col-start-1 row-start-1 ml-3 size-5 self-center text-zinc-400 sm:size-4"
|
class="pointer-events-none col-start-1 row-start-1 ml-3 size-5 self-center text-zinc-400 sm:size-4"
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
@ -69,7 +69,7 @@
|
|||||||
class="h-16 w-16 flex-shrink-0 rounded-md"
|
class="h-16 w-16 flex-shrink-0 rounded-md"
|
||||||
:src="useObject(game.mIconId)"
|
:src="useObject(game.mIconId)"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
>
|
||||||
<div class="flex flex-col">
|
<div class="flex flex-col">
|
||||||
<h3 class="text-sm font-medium text-zinc-100 font-display">
|
<h3 class="text-sm font-medium text-zinc-100 font-display">
|
||||||
{{ game.mName }}
|
{{ game.mName }}
|
||||||
@ -93,8 +93,8 @@
|
|||||||
Edit →
|
Edit →
|
||||||
</NuxtLink>
|
</NuxtLink>
|
||||||
<button
|
<button
|
||||||
@click="() => deleteGame(game.id)"
|
|
||||||
class="mt-2 w-fit rounded-md bg-red-600 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-red-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-600"
|
class="mt-2 w-fit rounded-md bg-red-600 px-2.5 py-1.5 text-sm font-semibold text-white shadow-sm hover:bg-red-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-red-600"
|
||||||
|
@click="() => deleteGame(game.id)"
|
||||||
>
|
>
|
||||||
Delete
|
Delete
|
||||||
</button>
|
</button>
|
||||||
@ -150,14 +150,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<p
|
<p
|
||||||
class="text-zinc-600 text-sm font-display font-bold uppercase text-center col-span-4"
|
|
||||||
v-if="filteredLibraryGames.length == 0 && libraryGames.length != 0"
|
v-if="filteredLibraryGames.length == 0 && libraryGames.length != 0"
|
||||||
|
class="text-zinc-600 text-sm font-display font-bold uppercase text-center col-span-4"
|
||||||
>
|
>
|
||||||
No results
|
No results
|
||||||
</p>
|
</p>
|
||||||
<p
|
<p
|
||||||
class="text-zinc-600 text-sm font-display font-bold uppercase text-center col-span-4"
|
|
||||||
v-if="filteredLibraryGames.length == 0 && libraryGames.length == 0"
|
v-if="filteredLibraryGames.length == 0 && libraryGames.length == 0"
|
||||||
|
class="text-zinc-600 text-sm font-display font-bold uppercase text-center col-span-4"
|
||||||
>
|
>
|
||||||
No games imported
|
No games imported
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="grow w-full flex items-center justify-center"
|
|
||||||
v-if="task && task.success"
|
v-if="task && task.success"
|
||||||
|
class="grow w-full flex items-center justify-center"
|
||||||
>
|
>
|
||||||
<div class="flex flex-col items-center">
|
<div class="flex flex-col items-center">
|
||||||
<CheckCircleIcon class="h-12 w-12 text-green-600" aria-hidden="true" />
|
<CheckCircleIcon class="h-12 w-12 text-green-600" aria-hidden="true" />
|
||||||
@ -18,8 +18,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="grow w-full flex items-center justify-center"
|
|
||||||
v-else-if="task && task.error"
|
v-else-if="task && task.error"
|
||||||
|
class="grow w-full flex items-center justify-center"
|
||||||
>
|
>
|
||||||
<div class="flex flex-col items-center">
|
<div class="flex flex-col items-center">
|
||||||
<ExclamationCircleIcon
|
<ExclamationCircleIcon
|
||||||
|
|||||||
@ -26,9 +26,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="ml-4 mt-2 shrink-0">
|
<div class="ml-4 mt-2 shrink-0">
|
||||||
<button
|
<button
|
||||||
@click="() => (createModalOpen = true)"
|
|
||||||
type="button"
|
type="button"
|
||||||
class="relative inline-flex items-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
class="relative inline-flex items-center rounded-md bg-blue-600 px-3 py-2 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||||
|
@click="() => (createModalOpen = true)"
|
||||||
>
|
>
|
||||||
Create invitation
|
Create invitation
|
||||||
</button>
|
</button>
|
||||||
@ -84,7 +84,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="py-4 text-zinc-400 text-sm" v-if="invitations.length == 0">
|
<div v-if="invitations.length == 0" class="py-4 text-zinc-400 text-sm">
|
||||||
No invitations.
|
No invitations.
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -119,8 +119,8 @@
|
|||||||
leave-to="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
leave-to="opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95"
|
||||||
>
|
>
|
||||||
<form
|
<form
|
||||||
@submit.prevent="() => invite_wrapper()"
|
|
||||||
class="relative transform rounded-lg bg-zinc-900 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg"
|
class="relative transform rounded-lg bg-zinc-900 text-left shadow-xl transition-all sm:my-8 sm:w-full sm:max-w-lg"
|
||||||
|
@submit.prevent="() => invite_wrapper()"
|
||||||
>
|
>
|
||||||
<div class="px-4 pb-4 pt-5 space-y-4 sm:p-6 sm:pb-4">
|
<div class="px-4 pb-4 pt-5 space-y-4 sm:p-6 sm:pb-4">
|
||||||
<div class="sm:flex sm:items-start">
|
<div class="sm:flex sm:items-start">
|
||||||
@ -158,13 +158,13 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
id="username"
|
id="username"
|
||||||
|
v-model="username"
|
||||||
name="invite-username"
|
name="invite-username"
|
||||||
type="text"
|
type="text"
|
||||||
autocomplete="username"
|
autocomplete="username"
|
||||||
v-model="username"
|
|
||||||
placeholder="myUsername"
|
placeholder="myUsername"
|
||||||
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -185,13 +185,13 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
id="email"
|
id="email"
|
||||||
|
v-model="email"
|
||||||
name="invite-email"
|
name="invite-email"
|
||||||
type="email"
|
type="email"
|
||||||
autocomplete="email"
|
autocomplete="email"
|
||||||
v-model="email"
|
|
||||||
placeholder="me@example.com"
|
placeholder="me@example.com"
|
||||||
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -233,7 +233,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Listbox as="div" v-model="expiryKey">
|
<Listbox v-model="expiryKey" as="div">
|
||||||
<ListboxLabel
|
<ListboxLabel
|
||||||
class="block text-sm/6 font-medium text-zinc-100"
|
class="block text-sm/6 font-medium text-zinc-100"
|
||||||
>Expires in</ListboxLabel
|
>Expires in</ListboxLabel
|
||||||
@ -262,11 +262,11 @@
|
|||||||
class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm"
|
class="absolute z-10 mt-1 max-h-60 w-full overflow-auto rounded-md bg-zinc-900 py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm"
|
||||||
>
|
>
|
||||||
<ListboxOption
|
<ListboxOption
|
||||||
as="template"
|
|
||||||
v-for="[label, _] in Object.entries(expiry)"
|
v-for="[label, _] in Object.entries(expiry)"
|
||||||
:key="label"
|
:key="label"
|
||||||
:value="label"
|
|
||||||
v-slot="{ active, selected }"
|
v-slot="{ active, selected }"
|
||||||
|
as="template"
|
||||||
|
:value="label"
|
||||||
>
|
>
|
||||||
<li
|
<li
|
||||||
:class="[
|
:class="[
|
||||||
@ -334,10 +334,10 @@
|
|||||||
Invite
|
Invite
|
||||||
</LoadingButton>
|
</LoadingButton>
|
||||||
<button
|
<button
|
||||||
|
ref="cancelButtonRef"
|
||||||
type="button"
|
type="button"
|
||||||
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-700 hover:bg-zinc-900 sm:mt-0 sm:w-auto"
|
class="mt-3 inline-flex w-full justify-center rounded-md bg-zinc-800 px-3 py-2 text-sm font-semibold text-zinc-100 shadow-sm ring-1 ring-inset ring-zinc-700 hover:bg-zinc-900 sm:mt-0 sm:w-auto"
|
||||||
@click="createModalOpen = false"
|
@click="createModalOpen = false"
|
||||||
ref="cancelButtonRef"
|
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
@ -380,7 +380,8 @@ import {
|
|||||||
} from "@heroicons/vue/24/solid";
|
} from "@heroicons/vue/24/solid";
|
||||||
import type { Invitation } from "@prisma/client";
|
import type { Invitation } from "@prisma/client";
|
||||||
import type { SerializeObject } from "nitropack";
|
import type { SerializeObject } from "nitropack";
|
||||||
import { DateTime, DurationLike } from "luxon";
|
import type { DurationLike } from "luxon";
|
||||||
|
import { DateTime } from "luxon";
|
||||||
|
|
||||||
definePageMeta({
|
definePageMeta({
|
||||||
layout: "admin",
|
layout: "admin",
|
||||||
|
|||||||
@ -23,14 +23,14 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
id="display-name"
|
id="display-name"
|
||||||
|
v-model="displayName"
|
||||||
name="display-name"
|
name="display-name"
|
||||||
type="text"
|
type="text"
|
||||||
autocomplete="display-name"
|
autocomplete="display-name"
|
||||||
required
|
required
|
||||||
v-model="displayName"
|
|
||||||
placeholder="AwesomeDropGamer771"
|
placeholder="AwesomeDropGamer771"
|
||||||
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -51,15 +51,15 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
id="email"
|
id="email"
|
||||||
|
v-model="email"
|
||||||
name="email"
|
name="email"
|
||||||
type="email"
|
type="email"
|
||||||
autocomplete="email"
|
autocomplete="email"
|
||||||
required
|
required
|
||||||
:disabled="!!invitation.data.value?.email"
|
:disabled="!!invitation.data.value?.email"
|
||||||
v-model="email"
|
|
||||||
placeholder="me@example.com"
|
placeholder="me@example.com"
|
||||||
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -82,15 +82,15 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
id="username"
|
id="username"
|
||||||
|
v-model="username"
|
||||||
name="username"
|
name="username"
|
||||||
type="text"
|
type="text"
|
||||||
autocomplete="username"
|
autocomplete="username"
|
||||||
required
|
required
|
||||||
:disabled="!!invitation.data.value?.username"
|
:disabled="!!invitation.data.value?.username"
|
||||||
v-model="username"
|
|
||||||
placeholder="myUsername"
|
placeholder="myUsername"
|
||||||
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -113,13 +113,13 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
id="password"
|
id="password"
|
||||||
|
v-model="password"
|
||||||
name="password"
|
name="password"
|
||||||
type="password"
|
type="password"
|
||||||
autocomplete="password"
|
autocomplete="password"
|
||||||
required
|
required
|
||||||
v-model="password"
|
|
||||||
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -140,13 +140,13 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
id="confirm-password"
|
id="confirm-password"
|
||||||
|
v-model="confirmPassword"
|
||||||
name="confirm-password"
|
name="confirm-password"
|
||||||
type="password"
|
type="password"
|
||||||
autocomplete="confirm-password"
|
autocomplete="confirm-password"
|
||||||
required
|
required
|
||||||
v-model="confirmPassword"
|
|
||||||
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 py-1.5 px-3 bg-zinc-800 disabled:bg-zinc-900/80 text-zinc-100 disabled:text-zinc-400 shadow-sm ring-1 ring-inset ring-zinc-700 disabled:ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
<div class="mt-10">
|
<div class="mt-10">
|
||||||
<div>
|
<div>
|
||||||
<form @submit.prevent="signin_wrapper" class="space-y-6">
|
<form class="space-y-6" @submit.prevent="signin_wrapper">
|
||||||
<div>
|
<div>
|
||||||
<label
|
<label
|
||||||
for="username"
|
for="username"
|
||||||
@ -28,13 +28,13 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
id="username"
|
id="username"
|
||||||
|
v-model="username"
|
||||||
name="username"
|
name="username"
|
||||||
type="username"
|
type="username"
|
||||||
autocomplete="username"
|
autocomplete="username"
|
||||||
required
|
required
|
||||||
class="block w-full rounded-md border-0 py-1.5 px-3 shadow-sm bg-zinc-950/20 text-zinc-300 ring-1 ring-inset ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 py-1.5 px-3 shadow-sm bg-zinc-950/20 text-zinc-300 ring-1 ring-inset ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
v-model="username"
|
>
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -47,13 +47,13 @@
|
|||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<input
|
<input
|
||||||
id="password"
|
id="password"
|
||||||
|
v-model="password"
|
||||||
name="password"
|
name="password"
|
||||||
type="password"
|
type="password"
|
||||||
autocomplete="current-password"
|
autocomplete="current-password"
|
||||||
v-model="password"
|
|
||||||
required
|
required
|
||||||
class="block w-full rounded-md border-0 py-1.5 px-3 shadow-sm bg-zinc-950/20 text-zinc-300 ring-1 ring-inset ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
class="block w-full rounded-md border-0 py-1.5 px-3 shadow-sm bg-zinc-950/20 text-zinc-300 ring-1 ring-inset ring-zinc-800 placeholder:text-zinc-400 focus:ring-2 focus:ring-inset focus:ring-blue-600 sm:text-sm sm:leading-6"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -61,11 +61,11 @@
|
|||||||
<div class="flex items-center">
|
<div class="flex items-center">
|
||||||
<input
|
<input
|
||||||
id="remember-me"
|
id="remember-me"
|
||||||
|
v-model="rememberMe"
|
||||||
name="remember-me"
|
name="remember-me"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
v-model="rememberMe"
|
|
||||||
class="h-4 w-4 rounded bg-zinc-800 border-zinc-700 text-blue-600 focus:ring-blue-600"
|
class="h-4 w-4 rounded bg-zinc-800 border-zinc-700 text-blue-600 focus:ring-blue-600"
|
||||||
/>
|
>
|
||||||
<label
|
<label
|
||||||
for="remember-me"
|
for="remember-me"
|
||||||
class="ml-3 block text-sm leading-6 text-zinc-400"
|
class="ml-3 block text-sm leading-6 text-zinc-400"
|
||||||
@ -113,7 +113,7 @@
|
|||||||
src="/wallpapers/signin.jpg"
|
src="/wallpapers/signin.jpg"
|
||||||
class="absolute inset-0 h-full w-full object-cover"
|
class="absolute inset-0 h-full w-full object-cover"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
src="/wallpapers/signin.jpg"
|
src="/wallpapers/signin.jpg"
|
||||||
class="absolute inset-0 h-full w-full object-cover"
|
class="absolute inset-0 h-full w-full object-cover"
|
||||||
alt=""
|
alt=""
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div
|
<div
|
||||||
class="min-h-full w-full flex items-center justify-center"
|
|
||||||
v-if="completed"
|
v-if="completed"
|
||||||
|
class="min-h-full w-full flex items-center justify-center"
|
||||||
>
|
>
|
||||||
<div class="flex flex-col items-center">
|
<div class="flex flex-col items-center">
|
||||||
<CheckCircleIcon class="h-12 w-12 text-green-600" aria-hidden="true" />
|
<CheckCircleIcon class="h-12 w-12 text-green-600" aria-hidden="true" />
|
||||||
@ -15,7 +15,7 @@
|
|||||||
window.
|
window.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<Disclosure as="div" class="mt-8" v-slot="{ open }">
|
<Disclosure v-slot="{ open }" as="div" class="mt-8">
|
||||||
<dt>
|
<dt>
|
||||||
<DisclosureButton
|
<DisclosureButton
|
||||||
class="pb-2 flex w-full items-start justify-between text-left text-zinc-400"
|
class="pb-2 flex w-full items-start justify-between text-left text-zinc-400"
|
||||||
@ -66,10 +66,10 @@
|
|||||||
method="post"
|
method="post"
|
||||||
class="mt-10 gap-x-6"
|
class="mt-10 gap-x-6"
|
||||||
>
|
>
|
||||||
<input type="text" class="hidden" name="id" :value="clientId" />
|
<input type="text" class="hidden" name="id" :value="clientId" >
|
||||||
<button
|
<button
|
||||||
@click="() => authorize_wrapper()"
|
|
||||||
class="rounded-md bg-blue-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
class="rounded-md bg-blue-600 px-3.5 py-2.5 text-sm font-semibold text-white shadow-sm hover:bg-blue-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-600"
|
||||||
|
@click="() => authorize_wrapper()"
|
||||||
>
|
>
|
||||||
Authorize
|
Authorize
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -7,7 +7,7 @@
|
|||||||
<img
|
<img
|
||||||
:src="useObject(game.mBannerId)"
|
:src="useObject(game.mBannerId)"
|
||||||
class="w-full h-[24rem] object-cover blur-sm scale-105"
|
class="w-full h-[24rem] object-cover blur-sm scale-105"
|
||||||
/>
|
>
|
||||||
<div
|
<div
|
||||||
class="absolute inset-0 bg-gradient-to-t from-zinc-900 to-transparent opacity-90"
|
class="absolute inset-0 bg-gradient-to-t from-zinc-900 to-transparent opacity-90"
|
||||||
/>
|
/>
|
||||||
@ -50,7 +50,7 @@
|
|||||||
/>
|
/>
|
||||||
</button>
|
</button>
|
||||||
<div class="relative z-50">
|
<div class="relative z-50">
|
||||||
<AddLibraryButton class="font-bold" :gameId="game.id" />
|
<AddLibraryButton class="font-bold" :game-id="game.id" />
|
||||||
</div>
|
</div>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
:to="`/store/${game.id}`"
|
:to="`/store/${game.id}`"
|
||||||
@ -76,7 +76,7 @@
|
|||||||
<img
|
<img
|
||||||
class="w-fit h-48 lg:h-96 rounded"
|
class="w-fit h-48 lg:h-96 rounded"
|
||||||
:src="useObject(image)"
|
:src="useObject(image)"
|
||||||
/>
|
>
|
||||||
</VueSlide>
|
</VueSlide>
|
||||||
<VueSlide v-if="game.mImageCarousel.length == 0">
|
<VueSlide v-if="game.mImageCarousel.length == 0">
|
||||||
<div
|
<div
|
||||||
@ -98,9 +98,9 @@
|
|||||||
<div class="space-y-6">
|
<div class="space-y-6">
|
||||||
<div class="bg-zinc-800/50 rounded-xl p-6 backdrop-blur-sm">
|
<div class="bg-zinc-800/50 rounded-xl p-6 backdrop-blur-sm">
|
||||||
<div
|
<div
|
||||||
v-html="descriptionHTML"
|
|
||||||
class="prose prose-invert prose-blue overflow-y-auto custom-scrollbar max-w-none"
|
class="prose prose-invert prose-blue overflow-y-auto custom-scrollbar max-w-none"
|
||||||
></div>
|
v-html="descriptionHTML"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -34,8 +34,8 @@
|
|||||||
|
|
||||||
<!-- Delete button (only show for non-default collections) -->
|
<!-- Delete button (only show for non-default collections) -->
|
||||||
<button
|
<button
|
||||||
@click="() => (currentlyDeleting = collection)"
|
|
||||||
class="group px-3 ml-[2px] bg-zinc-800/50 hover:bg-zinc-800 group focus:bg-zinc-800 focus:outline-none"
|
class="group px-3 ml-[2px] bg-zinc-800/50 hover:bg-zinc-800 group focus:bg-zinc-800 focus:outline-none"
|
||||||
|
@click="() => (currentlyDeleting = collection)"
|
||||||
>
|
>
|
||||||
<TrashIcon
|
<TrashIcon
|
||||||
class="transition-all size-5 text-zinc-400 group-hover:text-red-400 group-hover:rotate-[8deg]"
|
class="transition-all size-5 text-zinc-400 group-hover:text-red-400 group-hover:rotate-[8deg]"
|
||||||
@ -46,8 +46,8 @@
|
|||||||
<!-- Create new collection button (also wrap in div) -->
|
<!-- Create new collection button (also wrap in div) -->
|
||||||
<div>
|
<div>
|
||||||
<button
|
<button
|
||||||
@click="collectionCreateOpen = true"
|
|
||||||
class="group flex flex-row rounded-lg overflow-hidden transition-all duration-200 text-left w-full hover:scale-105"
|
class="group flex flex-row rounded-lg overflow-hidden transition-all duration-200 text-left w-full hover:scale-105"
|
||||||
|
@click="collectionCreateOpen = true"
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
class="grow p-4 bg-zinc-800/50 hover:bg-zinc-800 border-2 border-dashed border-zinc-700"
|
class="grow p-4 bg-zinc-800/50 hover:bg-zinc-800 border-2 border-dashed border-zinc-700"
|
||||||
@ -93,10 +93,9 @@ import {
|
|||||||
ArrowTopRightOnSquareIcon,
|
ArrowTopRightOnSquareIcon,
|
||||||
ArrowUpRightIcon,
|
ArrowUpRightIcon,
|
||||||
TrashIcon,
|
TrashIcon,
|
||||||
ArrowLeftIcon,
|
ArrowLeftIcon, PlusIcon
|
||||||
} from "@heroicons/vue/20/solid";
|
} from "@heroicons/vue/20/solid";
|
||||||
import { type Collection, type Game, type GameVersion } from "@prisma/client";
|
import type { Collection, Game, GameVersion } from "@prisma/client";
|
||||||
import { PlusIcon } from "@heroicons/vue/20/solid";
|
|
||||||
|
|
||||||
const collections = await useCollections();
|
const collections = await useCollections();
|
||||||
const collectionCreateOpen = ref(false);
|
const collectionCreateOpen = ref(false);
|
||||||
|
|||||||
@ -2,12 +2,12 @@
|
|||||||
<div v-if="article" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
<div v-if="article" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
<!-- Banner header with blurred background -->
|
<!-- Banner header with blurred background -->
|
||||||
<div class="relative w-full h-[300px] mb-8 rounded-lg overflow-hidden">
|
<div class="relative w-full h-[300px] mb-8 rounded-lg overflow-hidden">
|
||||||
<div class="absolute inset-0" v-if="article.image">
|
<div v-if="article.image" class="absolute inset-0">
|
||||||
<img
|
<img
|
||||||
:src="useObject(article.image)"
|
:src="useObject(article.image)"
|
||||||
alt=""
|
alt=""
|
||||||
class="w-full h-full object-cover blur-sm scale-110"
|
class="w-full h-full object-cover blur-sm scale-110"
|
||||||
/>
|
>
|
||||||
<div
|
<div
|
||||||
class="absolute inset-0 bg-gradient-to-b from-transparent to-zinc-950"
|
class="absolute inset-0 bg-gradient-to-b from-transparent to-zinc-950"
|
||||||
/>
|
/>
|
||||||
@ -16,7 +16,7 @@
|
|||||||
<!-- Fallback gradient background when no image -->
|
<!-- Fallback gradient background when no image -->
|
||||||
<div
|
<div
|
||||||
class="absolute inset-0 bg-gradient-to-b from-zinc-800 to-zinc-900"
|
class="absolute inset-0 bg-gradient-to-b from-zinc-800 to-zinc-900"
|
||||||
></div>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="relative h-full flex flex-col justify-end p-8">
|
<div class="relative h-full flex flex-col justify-end p-8">
|
||||||
@ -31,8 +31,8 @@
|
|||||||
|
|
||||||
<button
|
<button
|
||||||
v-if="user?.admin"
|
v-if="user?.admin"
|
||||||
@click="() => (currentlyDeleting = article)"
|
|
||||||
class="px-2 py-1 rounded bg-red-900/50 backdrop-blur-sm transition text-sm/6 font-semibold text-red-400 hover:text-red-100 inline-flex gap-x-2 items-center duration-200 hover:scale-105"
|
class="px-2 py-1 rounded bg-red-900/50 backdrop-blur-sm transition text-sm/6 font-semibold text-red-400 hover:text-red-100 inline-flex gap-x-2 items-center duration-200 hover:scale-105"
|
||||||
|
@click="() => (currentlyDeleting = article)"
|
||||||
>
|
>
|
||||||
<TrashIcon class="h-4 w-4" aria-hidden="true" />
|
<TrashIcon class="h-4 w-4" aria-hidden="true" />
|
||||||
Delete Article
|
Delete Article
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
:src="useObject(article.image)"
|
:src="useObject(article.image)"
|
||||||
alt=""
|
alt=""
|
||||||
class="h-full w-full object-cover object-center transition-all duration-500 group-hover:scale-110 scale-105"
|
class="h-full w-full object-cover object-center transition-all duration-500 group-hover:scale-110 scale-105"
|
||||||
/>
|
>
|
||||||
<div class="absolute top-4 left-4 flex gap-2">
|
<div class="absolute top-4 left-4 flex gap-2">
|
||||||
<span
|
<span
|
||||||
v-for="tag in article.tags"
|
v-for="tag in article.tags"
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
:alt="game.mName"
|
:alt="game.mName"
|
||||||
/>
|
/>
|
||||||
<div class="flex items-center gap-x-2">
|
<div class="flex items-center gap-x-2">
|
||||||
<AddLibraryButton :gameId="game.id" />
|
<AddLibraryButton :game-id="game.id" />
|
||||||
</div>
|
</div>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
v-if="user?.admin"
|
v-if="user?.admin"
|
||||||
@ -138,13 +138,13 @@
|
|||||||
<div>
|
<div>
|
||||||
<div
|
<div
|
||||||
v-if="showPreview"
|
v-if="showPreview"
|
||||||
v-html="previewHTML"
|
|
||||||
class="mt-12 prose prose-invert prose-blue max-w-none"
|
class="mt-12 prose prose-invert prose-blue max-w-none"
|
||||||
|
v-html="previewHTML"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-else
|
v-else
|
||||||
v-html="descriptionHTML"
|
|
||||||
class="mt-12 prose prose-invert prose-blue max-w-none"
|
class="mt-12 prose prose-invert prose-blue max-w-none"
|
||||||
|
v-html="descriptionHTML"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
@ -169,11 +169,11 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ArrowTopRightOnSquareIcon } from "@heroicons/vue/24/outline";
|
import { ArrowTopRightOnSquareIcon } from "@heroicons/vue/24/outline";
|
||||||
import { StarIcon } from "@heroicons/vue/24/solid";
|
import { StarIcon } from "@heroicons/vue/24/solid";
|
||||||
import { type Game, type GameVersion } from "@prisma/client";
|
import type { Game, GameVersion } from "@prisma/client";
|
||||||
import { micromark } from "micromark";
|
import { micromark } from "micromark";
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
import { SerializeObject } from "nitropack";
|
import type { SerializeObject } from "nitropack";
|
||||||
import { PlatformClient } from "~/composables/types";
|
import type { PlatformClient } from "~/composables/types";
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const gameId = route.params.id.toString();
|
const gameId = route.params.id.toString();
|
||||||
|
|||||||
@ -3,11 +3,11 @@
|
|||||||
<!-- Hero section -->
|
<!-- Hero section -->
|
||||||
<VueCarousel
|
<VueCarousel
|
||||||
v-if="recent.length > 0"
|
v-if="recent.length > 0"
|
||||||
:wrapAround="true"
|
:wrap-around="true"
|
||||||
:items-to-show="1"
|
:items-to-show="1"
|
||||||
:autoplay="15 * 1000"
|
:autoplay="15 * 1000"
|
||||||
:transition="500"
|
:transition="500"
|
||||||
:pauseAutoplayOnHover="true"
|
:pause-autoplay-on-hover="true"
|
||||||
class="store-carousel"
|
class="store-carousel"
|
||||||
>
|
>
|
||||||
<VueSlide v-for="game in recent" :key="game.id">
|
<VueSlide v-for="game in recent" :key="game.id">
|
||||||
@ -17,7 +17,7 @@
|
|||||||
:src="useObject(game.mBannerId)"
|
:src="useObject(game.mBannerId)"
|
||||||
alt=""
|
alt=""
|
||||||
class="size-full object-cover object-center"
|
class="size-full object-cover object-center"
|
||||||
/>
|
>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="relative flex items-center justify-center w-full h-full bg-zinc-900/75 px-6 py-32 sm:px-12 sm:py-40 lg:px-16"
|
class="relative flex items-center justify-center w-full h-full bg-zinc-900/75 px-6 py-32 sm:px-12 sm:py-40 lg:px-16"
|
||||||
@ -43,7 +43,7 @@
|
|||||||
class="block w-full rounded-md border border-transparent bg-white px-8 py-3 text-base font-medium text-gray-900 hover:bg-gray-100 sm:w-auto duration-200 hover:scale-105"
|
class="block w-full rounded-md border border-transparent bg-white px-8 py-3 text-base font-medium text-gray-900 hover:bg-gray-100 sm:w-auto duration-200 hover:scale-105"
|
||||||
>Check it out</NuxtLink
|
>Check it out</NuxtLink
|
||||||
>
|
>
|
||||||
<AddLibraryButton :gameId="game.id" />
|
<AddLibraryButton :game-id="game.id" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { AuthMec } from "@prisma/client";
|
import type { AuthMec } from "@prisma/client";
|
||||||
import aclManager from "~/server/internal/acls";
|
import aclManager from "~/server/internal/acls";
|
||||||
import { applicationSettings } from "~/server/internal/config/application-configuration";
|
import { applicationSettings } from "~/server/internal/config/application-configuration";
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import aclManager from "~/server/internal/acls";
|
import aclManager from "~/server/internal/acls";
|
||||||
import libraryManager from "~/server/internal/library";
|
import libraryManager from "~/server/internal/library";
|
||||||
import metadataHandler from "~/server/internal/metadata";
|
import metadataHandler from "~/server/internal/metadata";
|
||||||
import {
|
import type {
|
||||||
GameMetadataSearchResult,
|
GameMetadataSearchResult,
|
||||||
GameMetadataSource,
|
GameMetadataSource,
|
||||||
} from "~/server/internal/metadata/types";
|
} from "~/server/internal/metadata/types";
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { AuthMec } from "@prisma/client";
|
import { AuthMec } from "@prisma/client";
|
||||||
import { JsonArray } from "@prisma/client/runtime/library";
|
import type { JsonArray } from "@prisma/client/runtime/library";
|
||||||
import { type } from "arktype";
|
import { type } from "arktype";
|
||||||
import prisma from "~/server/internal/db/database";
|
import prisma from "~/server/internal/db/database";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
|
import type {
|
||||||
|
InternalClientCapability} from "~/server/internal/clients/capabilities";
|
||||||
import capabilityManager, {
|
import capabilityManager, {
|
||||||
InternalClientCapability,
|
|
||||||
validCapabilities,
|
validCapabilities,
|
||||||
} from "~/server/internal/clients/capabilities";
|
} from "~/server/internal/clients/capabilities";
|
||||||
import { defineClientEventHandler } from "~/server/internal/clients/event-handler";
|
import { defineClientEventHandler } from "~/server/internal/clients/event-handler";
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import session from "~/server/internal/session";
|
import session from "~/server/internal/session";
|
||||||
import taskHandler, { TaskMessage } from "~/server/internal/tasks";
|
import taskHandler, { TaskMessage } from "~/server/internal/tasks";
|
||||||
import { parse as parseCookies } from "cookie-es";
|
import { parse as parseCookies } from "cookie-es";
|
||||||
import { MinimumRequestObject } from "~/server/h3";
|
import type { MinimumRequestObject } from "~/server/h3";
|
||||||
|
|
||||||
// TODO add web socket sessions for horizontal scaling
|
// TODO add web socket sessions for horizontal scaling
|
||||||
// ID to admin
|
// ID to admin
|
||||||
|
|||||||
@ -15,7 +15,7 @@ export default defineEventHandler(async (h3) => {
|
|||||||
|
|
||||||
const deleted = await prisma.aPIToken.delete({
|
const deleted = await prisma.aPIToken.delete({
|
||||||
where: { id: id, userId: userId, mode: APITokenMode.User },
|
where: { id: id, userId: userId, mode: APITokenMode.User },
|
||||||
})!!;
|
})!;
|
||||||
if (!deleted)
|
if (!deleted)
|
||||||
throw createError({ statusCode: 404, statusMessage: "Token not found" });
|
throw createError({ statusCode: 404, statusMessage: "Token not found" });
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { systemACLs, userACLs } from ".";
|
import type { systemACLs, userACLs } from ".";
|
||||||
|
|
||||||
type ObjectFromList<T extends ReadonlyArray<string>, V = string> = {
|
type ObjectFromList<T extends ReadonlyArray<string>, V = string> = {
|
||||||
[K in T extends ReadonlyArray<infer U> ? U : never]: V;
|
[K in T extends ReadonlyArray<infer U> ? U : never]: V;
|
||||||
|
|||||||
@ -2,7 +2,7 @@ import { APITokenMode, User } from "@prisma/client";
|
|||||||
import { H3Context, H3Event } from "h3";
|
import { H3Context, H3Event } from "h3";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
import sessionHandler from "../session";
|
import sessionHandler from "../session";
|
||||||
import { MinimumRequestObject } from "~/server/h3";
|
import type { MinimumRequestObject } from "~/server/h3";
|
||||||
|
|
||||||
export const userACLs = [
|
export const userACLs = [
|
||||||
"read",
|
"read",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import { CertificateBundle } from "./ca";
|
import type { CertificateBundle } from "./ca";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
|
|
||||||
export type CertificateStore = {
|
export type CertificateStore = {
|
||||||
|
|||||||
@ -1,7 +1,8 @@
|
|||||||
import path from "path";
|
import path from "path";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import droplet from "@drop-oss/droplet";
|
import droplet from "@drop-oss/droplet";
|
||||||
import { CertificateStore, fsCertificateStore } from "./ca-store";
|
import type { CertificateStore} from "./ca-store";
|
||||||
|
import { fsCertificateStore } from "./ca-store";
|
||||||
|
|
||||||
export type CertificateBundle = {
|
export type CertificateBundle = {
|
||||||
priv: string;
|
priv: string;
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { EnumDictionary } from "../utils/types";
|
import type { EnumDictionary } from "../utils/types";
|
||||||
import https from "https";
|
import https from "https";
|
||||||
import { useCertificateAuthority } from "~/server/plugins/ca";
|
import { useCertificateAuthority } from "~/server/plugins/ca";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Client, User } from "@prisma/client";
|
import type { Client, User } from "@prisma/client";
|
||||||
import { EventHandlerRequest, H3Event } from "h3";
|
import type { EventHandlerRequest, H3Event } from "h3";
|
||||||
import droplet from "@drop-oss/droplet";
|
import droplet from "@drop-oss/droplet";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
import { useCertificateAuthority } from "~/server/plugins/ca";
|
import { useCertificateAuthority } from "~/server/plugins/ca";
|
||||||
@ -26,7 +26,7 @@ export function defineClientEventHandler<T>(handler: EventHandlerFunction<T>) {
|
|||||||
let clientId: string;
|
let clientId: string;
|
||||||
switch (method) {
|
switch (method) {
|
||||||
case "Debug":
|
case "Debug":
|
||||||
if (!process.dev) throw createError({ statusCode: 403 });
|
if (!import.meta.dev) throw createError({ statusCode: 403 });
|
||||||
const client = await prisma.client.findFirst({ select: { id: true } });
|
const client = await prisma.client.findFirst({ select: { id: true } });
|
||||||
if (!client)
|
if (!client)
|
||||||
throw createError({
|
throw createError({
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { randomUUID } from "node:crypto";
|
import { randomUUID } from "node:crypto";
|
||||||
import { CertificateBundle } from "./ca";
|
import { CertificateBundle } from "./ca";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
import { Platform } from "@prisma/client";
|
import type { Platform } from "@prisma/client";
|
||||||
import { useCertificateAuthority } from "~/server/plugins/ca";
|
import { useCertificateAuthority } from "~/server/plugins/ca";
|
||||||
|
|
||||||
export interface ClientMetadata {
|
export interface ClientMetadata {
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import { ApplicationSettings, AuthMec } from "@prisma/client";
|
import type { ApplicationSettings} from "@prisma/client";
|
||||||
|
import { AuthMec } from "@prisma/client";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
|
|
||||||
class ApplicationConfiguration {
|
class ApplicationConfiguration {
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { GameVersion } from "@prisma/client";
|
import type { GameVersion } from "@prisma/client";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
|
|
||||||
export type DropChunk = {
|
export type DropChunk = {
|
||||||
|
|||||||
@ -8,7 +8,8 @@
|
|||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import path from "path";
|
import path from "path";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
import { GameVersion, Platform } from "@prisma/client";
|
import type { GameVersion} from "@prisma/client";
|
||||||
|
import { Platform } from "@prisma/client";
|
||||||
import { fuzzy } from "fast-fuzzy";
|
import { fuzzy } from "fast-fuzzy";
|
||||||
import { recursivelyReaddir } from "../utils/recursivedirs";
|
import { recursivelyReaddir } from "../utils/recursivedirs";
|
||||||
import taskHandler from "../tasks";
|
import taskHandler from "../tasks";
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import { Developer, MetadataSource, Publisher } from "@prisma/client";
|
import type { Developer, Publisher } from "@prisma/client";
|
||||||
import { MetadataProvider, MissingMetadataProviderConfig } from ".";
|
import { MetadataSource } from "@prisma/client";
|
||||||
import {
|
import type { MetadataProvider} from ".";
|
||||||
|
import { MissingMetadataProviderConfig } from ".";
|
||||||
|
import type {
|
||||||
GameMetadataSearchResult,
|
GameMetadataSearchResult,
|
||||||
_FetchGameMetadataParams,
|
_FetchGameMetadataParams,
|
||||||
GameMetadata,
|
GameMetadata,
|
||||||
@ -9,7 +11,8 @@ import {
|
|||||||
_FetchDeveloperMetadataParams,
|
_FetchDeveloperMetadataParams,
|
||||||
DeveloperMetadata,
|
DeveloperMetadata,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
import axios, { AxiosRequestConfig } from "axios";
|
import type { AxiosRequestConfig } from "axios";
|
||||||
|
import axios from "axios";
|
||||||
import TurndownService from "turndown";
|
import TurndownService from "turndown";
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import { Developer, MetadataSource, Publisher } from "@prisma/client";
|
import type { Developer, Publisher } from "@prisma/client";
|
||||||
import { MetadataProvider, MissingMetadataProviderConfig } from ".";
|
import { MetadataSource } from "@prisma/client";
|
||||||
import {
|
import type { MetadataProvider} from ".";
|
||||||
|
import { MissingMetadataProviderConfig } from ".";
|
||||||
|
import type {
|
||||||
GameMetadataSearchResult,
|
GameMetadataSearchResult,
|
||||||
_FetchGameMetadataParams,
|
_FetchGameMetadataParams,
|
||||||
GameMetadata,
|
GameMetadata,
|
||||||
@ -9,7 +11,8 @@ import {
|
|||||||
_FetchDeveloperMetadataParams,
|
_FetchDeveloperMetadataParams,
|
||||||
DeveloperMetadata,
|
DeveloperMetadata,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
import axios, { AxiosRequestConfig } from "axios";
|
import type { AxiosRequestConfig } from "axios";
|
||||||
|
import axios from "axios";
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
|
|
||||||
type IGDBID = number;
|
type IGDBID = number;
|
||||||
@ -182,7 +185,7 @@ export class IGDBProvider implements MetadataProvider {
|
|||||||
if (this.accessTokenExpiry < futureTime) await this.authWithTwitch();
|
if (this.accessTokenExpiry < futureTime) await this.authWithTwitch();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async request<T extends Object>(
|
private async request<T extends object>(
|
||||||
resource: string,
|
resource: string,
|
||||||
body: string,
|
body: string,
|
||||||
options?: AxiosRequestConfig
|
options?: AxiosRequestConfig
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
import {
|
import type {
|
||||||
Developer,
|
Developer,
|
||||||
|
Publisher} from "@prisma/client";
|
||||||
|
import {
|
||||||
MetadataSource,
|
MetadataSource,
|
||||||
PrismaClient,
|
PrismaClient
|
||||||
Publisher,
|
|
||||||
} from "@prisma/client";
|
} from "@prisma/client";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
import {
|
import type {
|
||||||
_FetchDeveloperMetadataParams,
|
_FetchDeveloperMetadataParams,
|
||||||
_FetchGameMetadataParams,
|
_FetchGameMetadataParams,
|
||||||
_FetchPublisherMetadataParams,
|
_FetchPublisherMetadataParams,
|
||||||
|
|||||||
@ -1,13 +1,14 @@
|
|||||||
import { MetadataSource } from "@prisma/client";
|
import { MetadataSource } from "@prisma/client";
|
||||||
import { MetadataProvider } from ".";
|
import type { MetadataProvider } from ".";
|
||||||
import {
|
import type {
|
||||||
GameMetadataSearchResult,
|
|
||||||
_FetchGameMetadataParams,
|
_FetchGameMetadataParams,
|
||||||
GameMetadata,
|
GameMetadata,
|
||||||
_FetchPublisherMetadataParams,
|
_FetchPublisherMetadataParams,
|
||||||
PublisherMetadata,
|
PublisherMetadata,
|
||||||
_FetchDeveloperMetadataParams,
|
_FetchDeveloperMetadataParams,
|
||||||
DeveloperMetadata,
|
DeveloperMetadata} from "./types";
|
||||||
|
import {
|
||||||
|
GameMetadataSearchResult
|
||||||
} from "./types";
|
} from "./types";
|
||||||
import * as jdenticon from "jdenticon";
|
import * as jdenticon from "jdenticon";
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,8 @@
|
|||||||
import { Developer, MetadataSource, Publisher } from "@prisma/client";
|
import type { Developer, Publisher } from "@prisma/client";
|
||||||
import { MetadataProvider, MissingMetadataProviderConfig } from ".";
|
import { MetadataSource } from "@prisma/client";
|
||||||
import {
|
import type { MetadataProvider} from ".";
|
||||||
|
import { MissingMetadataProviderConfig } from ".";
|
||||||
|
import type {
|
||||||
GameMetadataSearchResult,
|
GameMetadataSearchResult,
|
||||||
_FetchGameMetadataParams,
|
_FetchGameMetadataParams,
|
||||||
GameMetadata,
|
GameMetadata,
|
||||||
@ -9,7 +11,8 @@ import {
|
|||||||
_FetchDeveloperMetadataParams,
|
_FetchDeveloperMetadataParams,
|
||||||
DeveloperMetadata,
|
DeveloperMetadata,
|
||||||
} from "./types";
|
} from "./types";
|
||||||
import axios, { AxiosRequestConfig } from "axios";
|
import type { AxiosRequestConfig } from "axios";
|
||||||
|
import axios from "axios";
|
||||||
import * as jdenticon from "jdenticon";
|
import * as jdenticon from "jdenticon";
|
||||||
import { DateTime } from "luxon";
|
import { DateTime } from "luxon";
|
||||||
|
|
||||||
|
|||||||
9
server/internal/metadata/types.d.ts
vendored
9
server/internal/metadata/types.d.ts
vendored
@ -1,6 +1,7 @@
|
|||||||
import { Developer, Publisher } from "@prisma/client";
|
import type { Developer, Publisher } from "@prisma/client";
|
||||||
import { ObjectTransactionalHandler, TransactionDataType } from "../objects/transactional";
|
import type { TransactionDataType } from "../objects/transactional";
|
||||||
import { ObjectReference } from "../objects/objectHandler";
|
import { ObjectTransactionalHandler } from "../objects/transactional";
|
||||||
|
import type { ObjectReference } from "../objects/objectHandler";
|
||||||
|
|
||||||
export interface GameMetadataSearchResult {
|
export interface GameMetadataSearchResult {
|
||||||
id: string;
|
id: string;
|
||||||
@ -48,7 +49,7 @@ export interface PublisherMetadata {
|
|||||||
|
|
||||||
logo: ObjectReference;
|
logo: ObjectReference;
|
||||||
banner: ObjectReference;
|
banner: ObjectReference;
|
||||||
website: String;
|
website: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DeveloperMetadata = PublisherMetadata;
|
export type DeveloperMetadata = PublisherMetadata;
|
||||||
|
|||||||
@ -6,7 +6,7 @@ Design goals:
|
|||||||
2. Real-time; use websocket listeners to keep clients up-to-date
|
2. Real-time; use websocket listeners to keep clients up-to-date
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { Notification } from "@prisma/client";
|
import type { Notification } from "@prisma/client";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
|
|
||||||
export type NotificationCreateArgs = Pick<
|
export type NotificationCreateArgs = Pick<
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
import {
|
import type { ObjectMetadata, ObjectReference, Source } from "./objectHandler";
|
||||||
ObjectBackend,
|
import { ObjectBackend } from "./objectHandler";
|
||||||
ObjectMetadata,
|
|
||||||
ObjectReference,
|
|
||||||
Source,
|
|
||||||
} from "./objectHandler";
|
|
||||||
|
|
||||||
import { LRUCache } from "lru-cache";
|
import { LRUCache } from "lru-cache";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
|
|||||||
@ -15,7 +15,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { parse as getMimeTypeBuffer } from "file-type-mime";
|
import { parse as getMimeTypeBuffer } from "file-type-mime";
|
||||||
import Stream, { Readable, Writable } from "stream";
|
import type { Writable } from "stream";
|
||||||
|
import Stream, { Readable } from "stream";
|
||||||
import { getMimeType as getMimeTypeStream } from "stream-mime-type";
|
import { getMimeType as getMimeTypeStream } from "stream-mime-type";
|
||||||
|
|
||||||
export type ObjectReference = string;
|
export type ObjectReference = string;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
The purpose of this class is to hold references to remote objects (like images) until they're actually needed
|
The purpose of this class is to hold references to remote objects (like images) until they're actually needed
|
||||||
This is used as a utility in metadata handling, so we only fetch the objects if we're actually creating a database record.
|
This is used as a utility in metadata handling, so we only fetch the objects if we're actually creating a database record.
|
||||||
*/
|
*/
|
||||||
import { Readable } from "stream";
|
import type { Readable } from "stream";
|
||||||
import { randomUUID } from "node:crypto";
|
import { randomUUID } from "node:crypto";
|
||||||
import objectHandler from ".";
|
import objectHandler from ".";
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import prisma from "../db/database";
|
|||||||
import { applicationSettings } from "../config/application-configuration";
|
import { applicationSettings } from "../config/application-configuration";
|
||||||
import objectHandler from "../objects";
|
import objectHandler from "../objects";
|
||||||
import { randomUUID, createHash } from "node:crypto";
|
import { randomUUID, createHash } from "node:crypto";
|
||||||
import { IncomingMessage } from "http";
|
import type { IncomingMessage } from "http";
|
||||||
|
|
||||||
class SaveManager {
|
class SaveManager {
|
||||||
async deleteObjectFromSave(
|
async deleteObjectFromSave(
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
import { LRUCache } from "lru-cache";
|
import { LRUCache } from "lru-cache";
|
||||||
import prisma from "../db/database";
|
import prisma from "../db/database";
|
||||||
import { Session, SessionProvider } from "./types";
|
import type { Session, SessionProvider } from "./types";
|
||||||
import { Prisma } from "@prisma/client";
|
import { Prisma } from "@prisma/client";
|
||||||
|
|
||||||
export default function createDBSessionHandler(): SessionProvider {
|
export default function createDBSessionHandler(): SessionProvider {
|
||||||
|
|||||||
@ -1,11 +1,12 @@
|
|||||||
import { H3Event } from "h3";
|
import type { H3Event } from "h3";
|
||||||
import createMemorySessionProvider from "./memory";
|
import createMemorySessionProvider from "./memory";
|
||||||
import { Session, SessionProvider } from "./types";
|
import type { Session, SessionProvider } from "./types";
|
||||||
import { randomUUID } from "node:crypto";
|
import { randomUUID } from "node:crypto";
|
||||||
import { parse as parseCookies } from "cookie-es";
|
import { parse as parseCookies } from "cookie-es";
|
||||||
import { MinimumRequestObject } from "~/server/h3";
|
import type { MinimumRequestObject } from "~/server/h3";
|
||||||
import createDBSessionHandler from "./db";
|
import createDBSessionHandler from "./db";
|
||||||
import { DateTime, DurationLike } from "luxon";
|
import type { DurationLike } from "luxon";
|
||||||
|
import { DateTime } from "luxon";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This implementation may need work.
|
This implementation may need work.
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { Session, SessionProvider } from "./types";
|
import type { Session, SessionProvider } from "./types";
|
||||||
|
|
||||||
export default function createMemorySessionHandler() {
|
export default function createMemorySessionHandler() {
|
||||||
const sessions: { [key: string]: Session } = {};
|
const sessions: { [key: string]: Session } = {};
|
||||||
@ -21,7 +21,7 @@ export default function createMemorySessionHandler() {
|
|||||||
},
|
},
|
||||||
async cleanupSessions() {
|
async cleanupSessions() {
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
for (let token in sessions) {
|
for (const token in sessions) {
|
||||||
// if expires at time is before now, the session is expired
|
// if expires at time is before now, the session is expired
|
||||||
if (sessions[token].expiresAt < now) await this.removeSession(token);
|
if (sessions[token].expiresAt < now) await this.removeSession(token);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import droplet from "@drop-oss/droplet";
|
import droplet from "@drop-oss/droplet";
|
||||||
import { MinimumRequestObject } from "~/server/h3";
|
import type { MinimumRequestObject } from "~/server/h3";
|
||||||
import aclManager from "../acls";
|
import aclManager from "../acls";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { EventHandlerRequest, H3Event } from "h3";
|
import type { EventHandlerRequest, H3Event } from "h3";
|
||||||
import { Dump, ObjectTransactionalHandler, Pull } from "../objects/transactional";
|
import type { Dump, Pull } from "../objects/transactional";
|
||||||
|
import { ObjectTransactionalHandler } from "../objects/transactional";
|
||||||
|
|
||||||
export async function handleFileUpload(
|
export async function handleFileUpload(
|
||||||
h3: H3Event<EventHandlerRequest>,
|
h3: H3Event<EventHandlerRequest>,
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
import { FilterConditionally } from "./types";
|
import type { FilterConditionally } from "./types";
|
||||||
|
|
||||||
interface PriorityTagged<T> {
|
interface PriorityTagged<T> {
|
||||||
object: T,
|
object: T,
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import { applicationSettings } from "../internal/config/application-configuration";
|
import { applicationSettings } from "../internal/config/application-configuration";
|
||||||
import metadataHandler, { MetadataProvider } from "../internal/metadata";
|
import type { MetadataProvider } from "../internal/metadata";
|
||||||
|
import metadataHandler from "../internal/metadata";
|
||||||
import { GiantBombProvider } from "../internal/metadata/giantbomb";
|
import { GiantBombProvider } from "../internal/metadata/giantbomb";
|
||||||
import { IGDBProvider } from "../internal/metadata/igdb";
|
import { IGDBProvider } from "../internal/metadata/igdb";
|
||||||
import { ManualMetadataProvider } from "../internal/metadata/manual";
|
import { ManualMetadataProvider } from "../internal/metadata/manual";
|
||||||
|
|||||||
Reference in New Issue
Block a user