A self-hosted media server and file management system
Vue ffmpegfile-serverjellyfinlaravelmediamedia-playermedia-servermediabrowsermediaservermusicmusic-librarymusic-playermusicplayerself-hostedvuejs
fix: code consistency
aminnausin6a0aecfee056
diff --git a/resources/js/components/panels/DropdownMenuItems.ts b/resources/js/components/panels/DropdownMenuItems.tsindex 7b34d5bd..92f50d03 100644--- a/resources/js/components/panels/DropdownMenuItems.ts+++ b/resources/js/components/panels/DropdownMenuItems.ts@@ -31,8 +31,8 @@ export function useDropdownMenuItems() {const defaults = { external: false, disabled: false };const { taskWaitTimes, isLoadingWaitTimes } = storeToRefs(useAppStore());- const { userData, isAdmin } = useAuth();const { stateDirectory } = storeToRefs(useContentStore());+ const { isAdmin } = useAuth();const taskIcons = computed(() => {const loadingIcon = h(ProiconsSpinner, { class: 'animate-spin' });@@ -83,13 +83,20 @@ export function useDropdownMenuItems() {url: '/dashboard/overview',text: 'Analytics',icon: ProiconsGraph,- hidden: FLAGS.USE_SHORT_NAV_FOR_USERS && userData.value?.id !== 1,+ hidden: FLAGS.USE_SHORT_NAV_FOR_USERS && !isAdmin.value,+ },+ {+ ...defaults,+ name: 'overview',+ url: '/dashboard/overview',+ text: 'Dashboard',+ icon: LucideLayoutDashboard,+ hidden: FLAGS.USE_SHORT_NAV_FOR_USERS && isAdmin.value,},- { ...defaults, name: 'overview', url: '/dashboard/overview', text: 'Dashboard', icon: LucideLayoutDashboard, hidden: isAdmin.value },{ ...defaults, name: 'libraries', url: '/dashboard/libraries', text: 'Libraries', icon: ProiconsLibrary },- { ...defaults, name: 'users', url: '/dashboard/users', text: 'Users', icon: LucideUsers, hidden: FLAGS.USE_SHORT_NAV_FOR_USERS && userData.value?.id !== 1 },- { ...defaults, name: 'tasks', url: '/dashboard/tasks', text: 'Tasks', icon: ProiconsTaskList, hidden: FLAGS.USE_SHORT_NAV_FOR_USERS && userData.value?.id !== 1 },- { ...defaults, name: 'logs', url: '/log-viewer', text: 'Logs', icon: ProiconsScript, hidden: userData.value?.id !== 1, external: true },+ { ...defaults, name: 'users', url: '/dashboard/users', text: 'Users', icon: LucideUsers, hidden: FLAGS.USE_SHORT_NAV_FOR_USERS && !isAdmin.value },+ { ...defaults, name: 'tasks', url: '/dashboard/tasks', text: 'Tasks', icon: ProiconsTaskList, hidden: FLAGS.USE_SHORT_NAV_FOR_USERS && !isAdmin.value },+ { ...defaults, name: 'logs', url: '/log-viewer', text: 'Logs', icon: ProiconsScript, hidden: !isAdmin.value, external: true },],[{diff --git a/resources/js/components/video/VideoInfoPanel.vue b/resources/js/components/video/VideoInfoPanel.vueindex 54ca04aa..cdfdb537 100755--- a/resources/js/components/video/VideoInfoPanel.vue+++ b/resources/js/components/video/VideoInfoPanel.vue@@ -66,7 +66,7 @@ const popoverItems = computed(() => {icon: TablerDownload,text: 'Download',action: () => {- if (stateDirectory.value.downloads_require_auth && !isAuthenticated) {+ if (stateDirectory.value.downloads_require_auth && !isAuthenticated.value) {toast.error('Error', { description: 'This download requires you to login.' });return;}@@ -147,7 +147,7 @@ watch(isExpanded.value = false;}- if (!isAuthenticated || !stateVideo.value.metadata) {+ if (!isAuthenticated.value || !stateVideo.value.metadata) {personalViewCount.value = null;return;}@@ -163,7 +163,7 @@ watch(watch(() => userData.value,() => {- if (!isAuthenticated) personalViewCount.value = null;+ if (!isAuthenticated.value) personalViewCount.value = null;},);