Skip to content

Commit e576b73

Browse files
committed
fix: lint errors
Some of them weren't solved previously because it was needed to be verified that the lifecycle of the logout process was correct Signed-off-by: Fernando Fernández <[email protected]>
1 parent ae2e53a commit e576b73

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

frontend/src/components/Layout/MainView.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</template>
2929

3030
<script lang="ts">
31-
import { onErrorCaptured, shallowRef, type Component, watch, computed, provide, useId, ref, type WatchOptions, inject } from 'vue';
31+
import { onErrorCaptured, shallowRef, type Component, watch, computed, provide, useId, ref, inject } from 'vue';
3232
import type { RouteLocationNormalizedGeneric, RouteMeta } from 'vue-router';
3333
import { isNil } from '@jellyfin-vue/shared/validation';
3434
import { usePausableEffect } from '@jellyfin-vue/ui-toolkit/composables/use-pausable-effect.ts';
@@ -57,15 +57,14 @@ function getLayoutComponent(layout: RouteMeta['layout']['name']): Component {
5757
5858
const defaultTransition = 'slide-x-reverse';
5959
const defaultTransitionMode = 'out-in';
60-
const watchOps = { flush: 'sync' } satisfies WatchOptions;
6160
const apploaded = shallowRef(false);
6261
const isRouting = shallowRef(false);
6362
const _resolveStatus = ref<Record<string, boolean>>({});
6463
const allResolved = computed(() => Object.values(_resolveStatus.value).every(Boolean));
6564
const mustBePaused = computed(() => !allResolved.value || isRouting.value);
6665
67-
watch(() => router.currentRoute.value.name, () => isRouting.value = true, watchOps);
68-
watch(allResolved, () => isRouting.value = false, watchOps);
66+
watch(() => router.currentRoute.value.name, () => isRouting.value = true);
67+
watch(allResolved, () => isRouting.value = false);
6968
</script>
7069

7170
<script setup lang="ts">
@@ -93,7 +92,8 @@ const resolved = computed({
9392
if (root) {
9493
provide(JView_isRouting, mustBePaused);
9594
usePausableEffect(mustBePaused);
96-
onErrorCaptured(() => {
95+
onErrorCaptured((e, instance, info) => {
96+
console.error('[Jellyfin] Error captured in MainView:', e, instance, info);
9797
resolved.value = true;
9898
isRouting.value = false;
9999
});

frontend/src/layouts/default.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ const navDrawer = ref(!display.mobile.value);
2929
const { views } = await fetchIndexPage();
3030
3131
const drawerItems = computed<DrawerItem[]>(() => {
32-
return (views.value ?? []).map((view: BaseItemDto) => {
32+
return views.value.map((view: BaseItemDto) => {
3333
return {
3434
icon: getLibraryIcon(view.CollectionType),
3535
title: view.Name ?? '',
36-
to: `/library/${String(view.Id)}`
36+
to: `/library/${view.Id}`
3737
};
3838
});
3939
});

frontend/src/pages/playback/music.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<VSpacer />
1010
<AppBarButtonLayout @click="isVisualizing = !isVisualizing">
1111
<template #icon>
12-
<JIcon :class="isVisualizing ? 'i-dashicons:album' : 'mdi:chart-bar'" />
12+
<JIcon :class="isVisualizing ? 'i-dashicons:album' : 'i-mdi:chart-bar'" />
1313
</template>
1414
</AppBarButtonLayout>
1515
</VAppBar>

frontend/src/pages/search.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ const [{ loading: itemLoading, data: itemSearch }, { loading: peopleLoading, dat
121121
122122
const serverSearchIds = computed(() => {
123123
if (!peopleLoading.value && !itemLoading.value) {
124-
return [...(itemSearch.value ?? []), ...(peopleSearch.value ?? [])].map(i => i.Id!);
124+
return [...itemSearch.value, ...peopleSearch.value].map(i => i.Id!);
125125
}
126126
127127
return [];

0 commit comments

Comments
 (0)