Skip to content

A self-hosted media server and file management system

UI consistency

aminnausin6c1173557f79
diff --git a/resources/js/components/cards/FolderCard.vue b/resources/js/components/cards/FolderCard.vue
index c22b6653..712c2914 100644
--- a/resources/js/components/cards/FolderCard.vue
+++ b/resources/js/components/cards/FolderCard.vue
@@ -10,7 +10,7 @@
<h2 class="text-xl truncate">{{ folder.attributes.name }}</h2>
</section>
<aside class="flex justify-between items-center w-full pt-1">
- <h3 class="text-lg text-left text-neutral-500 line-clamp-1">{{folder.attributes.file_count}} Episode{{folder.attributes.file_count !== 1 ? 's' : ''}}</h3>
+ <h3 class="text-left text-neutral-500 line-clamp-1">{{folder.attributes.file_count}} Episode{{folder.attributes.file_count !== 1 ? 's' : ''}}</h3>
<button class="hidden group-hover:flex space-x-1 folder-link">
<span class="flex hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2 space-x-1">
Watch
diff --git a/resources/js/components/cards/RecordCard.vue b/resources/js/components/cards/RecordCard.vue
index 61f1ca08..1dd1d803 100644
--- a/resources/js/components/cards/RecordCard.vue
+++ b/resources/js/components/cards/RecordCard.vue
@@ -11,8 +11,8 @@
<h2 class="text-xl text-left truncate">{{ record.relationships.video_name }}</h2>
</section>
<aside class="flex justify-between items-center w-full pt-1">
- <h3 class="text-lg text-left text-neutral-500 truncate">{{ record.relationships.folder_name }}</h3>
- <h3 class="text-lg text-right text-neutral-500 text-nowrap line-clamp-1 truncate">{{ timeSpan }}</h3>
+ <h3 class="text-left text-neutral-500 truncate">{{ record.relationships.folder_name }}</h3>
+ <h3 class="text-right text-neutral-500 text-nowrap line-clamp-1 truncate">{{ timeSpan }}</h3>
<span class="hidden space-x-1">
<button class="hover:bg-orange-500 hover:stroke-none border-orange-500 border-2 rounded shadow px-2">Watch</button>
<svg xmlns="https://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
diff --git a/resources/js/components/cards/VideoCard.vue b/resources/js/components/cards/VideoCard.vue
index fe9dea0a..5ef2b6ff 100644
--- a/resources/js/components/cards/VideoCard.vue
+++ b/resources/js/components/cards/VideoCard.vue
@@ -14,8 +14,8 @@ const handlePlay = () => {
</script>
<template>
- <tr :class="{ 'ring-violet-600/50 ring': (props.currentID === props.video.id) }"
- class="shadow vid-row w-full rounded-md dark:bg-neutral-800 dark:hover:bg-indigo-900 bg-violet-100 hover:bg-violet-300 odd:bg-violet-200 hover:odd:bg-violet-300 dark:odd:bg-zinc-700 dark:hover:odd:bg-indigo-900 p-3 flex ring-inset flex-wrap flex-col sm:flex-row sm:flex-nowrap"
+ <tr :class="{ 'ring-violet-600/70 ring-[0.125rem]': (props.currentID === props.video.id) }"
+ class="shadow vid-row w-full rounded-md dark:bg-neutral-800 dark:hover:bg-indigo-900 bg-gray-100 hover:bg-violet-300 odd:bg-violet-100 hover:odd:bg-violet-300 dark:odd:bg-zinc-700 dark:hover:odd:bg-indigo-900 p-3 flex ring-inset flex-wrap flex-col sm:flex-row sm:flex-nowrap"
:data-id="props.video.id" :data-path="`../${props.video.attributes.path}`" @click="handlePlay">
<td class="flex gap-12 w-full">
<span class="vid-row-title xl:min-w-48 max-w-1/2 line-clamp-1">{{ props.video.attributes.name }}</span>
diff --git a/resources/js/components/inputs/NavButton.vue b/resources/js/components/inputs/NavButton.vue
index 0fb6e765..9c4ff293 100644
--- a/resources/js/components/inputs/NavButton.vue
+++ b/resources/js/components/inputs/NavButton.vue
@@ -1,8 +1,14 @@
<script setup>
- const {label, colour} = defineProps(['label', 'colour']);
+import { ref } from 'vue';
+
+const props = defineProps(['label', 'colour','active'])
+const activeColour = ref(`bg-neutral-200 dark:bg-${props.colour ?? 'violet'}-600/60`) ;
</script>
<template>
- <button :id="'btn-nav-' + label" :class="`flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg dark:text-neutral-200 bg-neutral-300 dark:bg-neutral-700 hover:bg-neutral-200 hover:dark:bg-${colour ?? 'violet'}-600/60`" :aria-label="label">
+ <button :id="'btn-nav-' + props.label"
+ :class="`${props.active ? activeColour : `bg-neutral-300 dark:bg-neutral-700 hover:bg-neutral-200 hover:dark:bg-${props.colour ?? 'violet'}-600/60 `} dark:text-neutral-200 flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg`"
+ :aria-label="props.label">
<slot name="icon"></slot>
+ <span :class="`hidden ${activeColour}`"></span>
</button>
</template>
\ No newline at end of file
diff --git a/resources/js/components/inputs/NavLink.vue b/resources/js/components/inputs/NavLink.vue
index ad157bbc..24866ea9 100644
--- a/resources/js/components/inputs/NavLink.vue
+++ b/resources/js/components/inputs/NavLink.vue
@@ -1,10 +1,11 @@
<script setup>
import { RouterLink } from 'vue-router';
- const {label, colour, URL} = defineProps(['label', 'colour', 'URL']);
+ const props = defineProps(['label', 'colour', 'URL', 'active'])
+ const activeColour = `bg-neutral-300 dark:bg-${props.colour ?? 'violet'}-600/60` ;
</script>
<template>
- <router-link :id="'btn-nav-' + label" :to="URL" :class="`flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg dark:text-neutral-200 bg-neutral-300 dark:bg-neutral-700 hover:bg-neutral-200 hover:dark:bg-${colour ?? 'violet'}-600/60`" :aria-label="label">
+ <router-link :id="'btn-nav-' + props.label" :to="props.URL" :class="`flex justify-center items-center shrink-0 h-8 w-8 rounded-lg shadow-lg dark:text-neutral-200 hover:bg-neutral-200 hover:dark:bg-${props.colour ?? 'violet'}-600/60 ${props.active ? activeColour : 'bg-neutral-300 dark:bg-neutral-700'}`" :aria-label="props.label">
<slot name="icon"></slot>
</router-link>
</template>
diff --git a/resources/js/components/layout/NavBar.vue b/resources/js/components/layout/NavBar.vue
index 00e6eaea..2815e2ed 100644
--- a/resources/js/components/layout/NavBar.vue
+++ b/resources/js/components/layout/NavBar.vue
@@ -17,7 +17,7 @@ import { useAppStore } from '../../stores/AppStore';
const appStore = useAppStore();
const authStore = useAuthStore();
-const { pageTitle } = storeToRefs(appStore);
+const { pageTitle, selectedSideBar } = storeToRefs(appStore);
const { userData } = storeToRefs(authStore);
const { cycleSideBar } = appStore;
const { auth } = authStore;
@@ -73,18 +73,18 @@ watch(userData, handleAuthEvent, { immediate: false });
</section>
<section id="navbar-video" class="flex items-center gap-1 text-slate-900 antialiased">
- <NavButton v-if="username" @click="cycleSideBar('notifications')" :label="'notifications'">
+ <NavButton v-if="username" @click="cycleSideBar('notifications')" :label="'notifications'" class="hidden">
<template #icon>
<CircumInboxIn height="24" width="24" />
</template>
</NavButton>
- <NavButton v-if="$route.name === 'home'" @click="cycleSideBar('folders')" :label="'folders'">
+ <NavButton v-if="$route.name === 'home'" @click="cycleSideBar('folders')" :label="'folders'" :active="selectedSideBar === 'folders'">
<template #icon>
<CircumFolderOn height="24" width="24" />
</template>
</NavButton>
<NavButton v-if="username && $route.name === 'home'" @click="cycleSideBar('history')"
- :label="'history'">
+ :label="'history'" :active="selectedSideBar === 'history'">
<template #icon>
<MaterialSymbolsLightHistory height="24" width="24" />
</template>
diff --git a/resources/js/views/VideoView.vue b/resources/js/views/VideoView.vue
index d41cf0ee..f0d9d065 100644
--- a/resources/js/views/VideoView.vue
+++ b/resources/js/views/VideoView.vue
@@ -113,10 +113,10 @@ watch(() => selectedSideBar.value, cycleSideBar, { immediate: false });
role="group">
<section class="flex gap-2">
<button
- class="p-2 bg-button-100 dark:bg-button-900 rounded-lg ring-violet-500 hover:ring-violet-800 hover:bg-violet-400/50 ring-[0.125rem] ring-inset">Edit
+ class="p-2 bg-button-100 dark:bg-button-900 rounded-lg dark:ring-neutral-700 hover:ring-violet-700 hover:bg-violet-400/50 ring-[0.125rem] ring-inset">Edit
Details</button>
<button
- class="p-2 bg-button-100 dark:bg-button-900 rounded-lg hover:ring-violet-500 hover:bg-violet-400/50 hover:ring-[0.125rem] ring-inset">
+ class="p-2 bg-button-100 dark:bg-button-900 rounded-lg dark:ring-neutral-700 hover:ring-violet-700 hover:bg-violet-400/50 dark:ring-[0.125rem] hover:ring-[0.125rem] ring-inset">
<CircumShare1 height="24" width="24"/>
</button>
</section>