This commit is contained in:
Emily
2024-06-05 17:32:22 +02:00
parent 8ae0aa5d2a
commit f465108ab0
8 changed files with 71 additions and 43 deletions

View File

@@ -87,7 +87,7 @@ function showDetails(id: string) {
</div>
<div class="flex flex-col gap-1">
<div v-if="props.data.length > 0" class="flex justify-between" v-for="element of props.data">
<div v-if="props.data.length > 0" class="flex justify-between items-center" v-for="element of props.data">
<div class="w-10/12 relative" @click="showDetails(element._id)"
:class="{ 'cursor-pointer line-active': interactive }">
<div class="absolute rounded-sm w-full h-full bg-[#92abcf38]"
@@ -105,7 +105,7 @@ function showDetails(id: string) {
</span>
</div>
</div>
<div class="text-text font-semibold manrope"> {{ formatNumberK(element.count) }} </div>
<div class="text-text font-semibold text-[.9rem] md:text-[1rem] manrope"> {{ formatNumberK(element.count) }} </div>
</div>
<div v-if="props.data.length == 0"
class="flex justify-center text-text-sub font-bold text-[1.1rem]">

View File

@@ -2,7 +2,7 @@
const activeProject = useActiveProject();
const { onlineUsers, stopWatching, startWatching } = useOnlineUsers();
onMounted(()=> startWatching());
onMounted(() => startWatching());
onUnmounted(() => stopWatching());
@@ -18,24 +18,26 @@ function copyProjectId() {
<div
class="w-full px-6 py-2 lg:py-6 font-bold text-text-sub/40 flex flex-col xl:flex-row text-lg lg:text-2xl gap-2 xl:gap-12">
<div class="flex gap-2 items-center text-text/90">
<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> {{ onlineUsers }} Online users</div>
</div>
<div class="grow"></div>
<div class="flex gap-2">
<div class="flex md:gap-2 items-center md:justify-start flex-col md:flex-row">
<div>Project:</div>
<div class="text-text/90"> {{ activeProject?.name || 'Loading...' }} </div>
</div>
<div class="flex gap-2">
<div class="flex flex-col md:flex-row md:gap-2 items-center md:justify-start">
<div>Project id:</div>
<div class="text-text/90 text-[.9rem] lg:text-2xl">
{{ activeProject?._id || 'Loading...' }}
</div>
<div class="flex items-center ml-3">
<i @click="copyProjectId()" class="far fa-copy hover:text-text cursor-pointer text-[1.2rem]"></i>
<div class="flex gap-2">
<div class="text-text/90 text-[.9rem] lg:text-2xl">
{{ activeProject?._id || 'Loading...' }}
</div>
<div class="flex items-center ml-3">
<i @click="copyProjectId()" class="far fa-copy hover:text-text cursor-pointer text-[1.2rem]"></i>
</div>
</div>
</div>
</div>