implementing snapshots

This commit is contained in:
Emily
2024-07-30 15:18:25 +02:00
parent f72bc33871
commit 4bede171fa
7 changed files with 22 additions and 18 deletions

View File

@@ -13,7 +13,7 @@ const { showDialog, closeDialog, dialogComponent, dialogParams, dialogStyle, dia
<template> <template>
<div class="w-dvw h-dvh bg-[#151517] relative"> <div class="w-dvw h-dvh bg-lyx-background-light relative">
<div class="fixed top-4 right-8 z-[999] flex flex-col gap-2" v-if="alerts.length > 0"> <div class="fixed top-4 right-8 z-[999] flex flex-col gap-2" v-if="alerts.length > 0">
<div v-for="alert of alerts" <div v-for="alert of alerts"

View File

@@ -50,7 +50,8 @@ function openSnapshotDialog() {
</script> </script>
<template> <template>
<div class="CVerticalNavigation h-full w-[20rem] bg-[#111111] flex shadow-[1px_0_10px_#000000] rounded-r-lg" :class="{ <div class="CVerticalNavigation h-full w-[20rem] bg-lyx-background flex shadow-[1px_0_10px_#000000] rounded-r-lg"
:class="{
'absolute top-0 w-full md:w-[20rem] z-[45] open': isOpen, 'absolute top-0 w-full md:w-[20rem] z-[45] open': isOpen,
'hidden lg:flex': !isOpen 'hidden lg:flex': !isOpen
}"> }">
@@ -117,9 +118,10 @@ function openSnapshotDialog() {
<div v-for="entry of section.entries"> <div v-for="entry of section.entries">
<div v-if="(!entry.adminOnly || (isAdmin && !isAdminHidden))" <div v-if="(!entry.adminOnly || (isAdmin && !isAdminHidden))"
class="bg-[#111111] text-gray-300 hover:bg-[#1b1b1b] py-2 px-4 rounded-lg" :class="{ class="bg-lyx-background text-gray-300 py-2 px-4 rounded-lg" :class="{
'text-gray-700 pointer-events-none': entry.disabled, 'text-gray-700 pointer-events-none': entry.disabled,
'bg-[#1b1b1b]': route.path == (entry.to || '#') 'bg-lyx-background-lighter': route.path == (entry.to || '#'),
'hover:bg-lyx-background-light': route.path != (entry.to || '#')
}"> }">
<NuxtLink @click="close() && entry.action?.()" :target="entry.external ? '_blank' : ''" <NuxtLink @click="close() && entry.action?.()" :target="entry.external ? '_blank' : ''"

View File

@@ -5,7 +5,7 @@ const props = defineProps<{ title: string, sub?: string }>();
</script> </script>
<template> <template>
<Card> <LyxUiCard>
<div class="flex flex-col gap-4"> <div class="flex flex-col gap-4">
<div class="flex items-center"> <div class="flex items-center">
<div class="flex flex-col grow"> <div class="flex flex-col grow">
@@ -23,5 +23,5 @@ const props = defineProps<{ title: string, sub?: string }>();
<slot></slot> <slot></slot>
</div> </div>
</div> </div>
</Card> </LyxUiCard>
</template> </template>

View File

@@ -16,7 +16,7 @@ const props = defineProps<{
<template> <template>
<Card class="flex flex-col overflow-hidden relative max-h-[12rem] aspect-[2/1] w-full"> <LyxUiCard class="flex !p-0 flex-col overflow-hidden relative max-h-[12rem] aspect-[2/1] w-full">
<div v-if="ready" class="flex p-4 items-start"> <div v-if="ready" class="flex p-4 items-start">
<div class="flex items-center mt-2 mr-4"> <div class="flex items-center mt-2 mr-4">
<i :style="`color: ${props.color}`" :class="icon" class="text-[1.6rem] 2xl:text-[2rem]"></i> <i :style="`color: ${props.color}`" :class="icon" class="text-[1.6rem] 2xl:text-[2rem]"></i>
@@ -49,7 +49,7 @@ const props = defineProps<{
<div v-if="!ready" class="flex justify-center items-center w-full h-full"> <div v-if="!ready" class="flex justify-center items-center w-full h-full">
<i class="fas fa-spinner text-[2rem] text-accent animate-[spin_1s_linear_infinite] duration-500"></i> <i class="fas fa-spinner text-[2rem] text-accent animate-[spin_1s_linear_infinite] duration-500"></i>
</div> </div>
</Card> </LyxUiCard>
</template> </template>

View File

@@ -22,23 +22,23 @@ function copyProjectId() {
<div class="flex gap-2 items-center text-text/90 justify-center md:justify-start"> <div class="flex gap-2 items-center text-text/90 justify-center md:justify-start">
<div class="animate-pulse w-[1rem] h-[1rem] bg-green-400 rounded-full"> </div> <div class="animate-pulse w-[1rem] h-[1rem] bg-green-400 rounded-full"> </div>
<div> {{ onlineUsers }} Online users</div> <div class="poppins font-medium text-[1.2rem]"> {{ onlineUsers }} Online users</div>
</div> </div>
<div class="grow"></div> <div class="grow"></div>
<div class="flex md:gap-2 items-center md:justify-start flex-col md:flex-row"> <div class="flex md:gap-2 items-center md:justify-start flex-col md:flex-row">
<div>Project:</div> <div class="poppins font-medium text-lyx-text-darker text-[1.2rem]">Project:</div>
<div class="text-text/90"> {{ activeProject?.name || 'Loading...' }} </div> <div class="text-lyx-text poppins font-medium text-[1.2rem]"> {{ activeProject?.name || 'Loading...' }} </div>
</div> </div>
<div class="flex flex-col md:flex-row md:gap-2 items-center md:justify-start"> <div class="flex flex-col md:flex-row md:gap-2 items-center md:justify-start">
<div>Project id:</div> <div class="poppins font-medium text-lyx-text-darker text-[1.2rem]">Project id:</div>
<div class="flex gap-2"> <div class="flex gap-2">
<div class="text-text/90 text-[.9rem] lg:text-2xl"> <div class="text-lyx-text poppins font-medium text-[1.2rem]">
{{ activeProject?._id || 'Loading...' }} {{ activeProject?._id || 'Loading...' }}
</div> </div>
<div class="flex items-center ml-3"> <div class="flex items-center ml-3">
<i @click="copyProjectId()" class="far fa-copy hover:text-text cursor-pointer text-[1.2rem]"></i> <i @click="copyProjectId()" class="far fa-copy text-lyx-text hover:text-lyx-primary cursor-pointer text-[1.2rem]"></i>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -92,7 +92,7 @@ const { isOpen, close, open } = useMenu();
</CVerticalNavigation> </CVerticalNavigation>
<div class="overflow-hidden w-full bg-bg relative h-full"> <div class="overflow-hidden w-full bg-lyx-background-light relative h-full">
<div v-if="showDialog" class="barrier w-full h-full z-[34] absolute bg-black/50 backdrop-blur-[2px]"> <div v-if="showDialog" class="barrier w-full h-full z-[34] absolute bg-black/50 backdrop-blur-[2px]">
<i <i

View File

@@ -64,4 +64,6 @@ export default defineNuxtConfig({
devServer: { devServer: {
host: '0.0.0.0', host: '0.0.0.0',
}, },
components: true,
extends: ['../lyx-ui']
}) })