Skip to content

Commit d16a742

Browse files
committed
fix(panel): adjust margin and loading indicators
1 parent 670d7c0 commit d16a742

11 files changed

+70
-63
lines changed

src/components/common/buttons/TitleLink.vue

+5-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const onTitleClick = (e: MouseEvent) => {
2626

2727
<template>
2828
<a class="anchor-link" @click="onTitleClick">
29-
<component :is="component" :class="{ 'hover-link': !!$attrs.href }">
29+
<component :is="component" class="content" :class="{ 'hover-link': !!$attrs.href }">
3030
<slot />
3131
</component>
3232
</a>
@@ -39,6 +39,10 @@ const onTitleClick = (e: MouseEvent) => {
3939
z-index: layers.$in-front;
4040
color: inherit;
4141
text-decoration: none;
42+
43+
.content {
44+
margin: 0;
45+
}
4246
}
4347
4448
.hover-link {

src/components/views/panel/MoviePanel.vue

-5
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ const { openTab } = useExtensionSettingsStore();
7979
</template>
8080

8181
<style lang="scss" scoped>
82-
.show-title:deep(h2),
83-
.show-title-skeleton {
84-
margin-bottom: 1rem;
85-
}
86-
8782
.show-title-skeleton {
8883
height: 1.5rem;
8984
margin-top: 0.625rem;

src/components/views/panel/MoviePanelDetails.vue

+18-12
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,17 @@ const genres = computed(() => {
4040
4141
const year = computed(() => {
4242
if (!movie?.value) return;
43-
return movie.value?.year ?? '-';
43+
return movie.value?.year || '-';
4444
});
4545
4646
const status = computed(() => {
4747
if (!movie?.value) return;
48-
return capitalizeEachWord(movie.value?.status) ?? '-';
48+
return capitalizeEachWord(movie.value?.status) || '-';
4949
});
5050
5151
const country = computed(() => {
5252
if (!movie?.value) return;
53-
return movie.value?.country ?? '-';
53+
return movie.value?.country || '-';
5454
});
5555
</script>
5656

@@ -91,16 +91,18 @@ const country = computed(() => {
9191
/>
9292
</NFlex>
9393

94-
<!-- Genres -->
95-
<PanelDetail
96-
:label="i18n('genres')"
97-
:values="genres"
98-
:skeleton="{ width: '3rem' }"
99-
array
100-
/>
94+
<NFlex class="lists" vertical size="large">
95+
<!-- Genres -->
96+
<PanelDetail
97+
:label="i18n('genres')"
98+
:values="genres"
99+
:skeleton="{ width: '3rem' }"
100+
array
101+
/>
101102

102-
<!-- links -->
103-
<PanelLinks :ids="movie?.ids" mode="movie" />
103+
<!-- links -->
104+
<PanelLinks :ids="movie?.ids" mode="movie" />
105+
</NFlex>
104106
</NFlex>
105107
</template>
106108

@@ -110,4 +112,8 @@ const country = computed(() => {
110112
flex: 1 1 auto;
111113
width: 100%;
112114
}
115+
116+
.lists {
117+
margin: 1.25rem 0 1rem;
118+
}
113119
</style>

src/components/views/panel/MoviePanelOverview.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const title = computed(() => {
2323
2424
const overview = computed(() => {
2525
if (!movie?.value) return;
26-
return movie?.value?.overview ?? '-';
26+
return movie?.value?.overview || '-';
2727
});
2828
</script>
2929

src/components/views/panel/PanelPoster.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const key = computed(() => {
9595
}
9696
9797
position: relative;
98-
margin-bottom: 1.25rem;
98+
margin: 1.75rem 0;
9999
border: 1px solid var(--border-white);
100100
box-shadow: var(--image-box-shadow);
101101
}

src/components/views/panel/PersonPanel.vue

-5
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,6 @@ const { openTab } = useExtensionSettingsStore();
7979
</template>
8080

8181
<style lang="scss" scoped>
82-
.show-title:deep(h2),
83-
.show-title-skeleton {
84-
margin-bottom: 1rem;
85-
}
86-
8782
.show-title-skeleton {
8883
height: 1.5rem;
8984
margin-top: 0.625rem;

src/components/views/panel/PersonPanelDetails.vue

+16-10
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const knownFor = computed(() => {
5656
5757
const birthplace = computed(() => {
5858
if (!person?.value) return;
59-
return person.value?.birthplace ?? '-';
59+
return person.value?.birthplace || '-';
6060
});
6161
6262
const socials = computed(() => {
@@ -139,16 +139,18 @@ const socials = computed(() => {
139139
/>
140140
</NFlex>
141141

142-
<!-- socials -->
143-
<PanelDetail
144-
:label="i18n('socials')"
145-
:values="socials"
146-
:skeleton="{ width: '3rem' }"
147-
array
148-
/>
142+
<NFlex class="lists" vertical size="large">
143+
<!-- socials -->
144+
<PanelDetail
145+
:label="i18n('socials')"
146+
:values="socials"
147+
:skeleton="{ width: '3rem' }"
148+
array
149+
/>
149150

150-
<!-- links -->
151-
<PanelLinks :ids="person?.ids" mode="person" />
151+
<!-- links -->
152+
<PanelLinks :ids="person?.ids" mode="person" />
153+
</NFlex>
152154
</NFlex>
153155
</template>
154156

@@ -158,4 +160,8 @@ const socials = computed(() => {
158160
flex: 1 1 auto;
159161
width: 100%;
160162
}
163+
164+
.lists {
165+
margin: 1.5rem 0 0.5rem;
166+
}
161167
</style>

src/components/views/panel/PersonPanelOverview.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const { person } = toRefs(props);
1616
1717
const biography = computed(() => {
1818
if (!person?.value) return;
19-
return person?.value?.biography ?? '-';
19+
return person?.value?.biography || '-';
2020
});
2121
</script>
2222

src/components/views/panel/ShowPanel.vue

-5
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,6 @@ const { openTab } = useExtensionSettingsStore();
178178
</template>
179179

180180
<style lang="scss" scoped>
181-
.show-title:deep(h2),
182-
.show-title-skeleton {
183-
margin-bottom: 1rem;
184-
}
185-
186181
.show-title-skeleton {
187182
height: 1.5rem;
188183
margin-top: 0.625rem;

src/components/views/panel/ShowPanelDetails.vue

+25-19
Original file line numberDiff line numberDiff line change
@@ -70,12 +70,12 @@ const genres = computed(() => {
7070
7171
const year = computed(() => {
7272
if (!show?.value) return;
73-
return show.value?.year ?? '-';
73+
return show.value?.year || '-';
7474
});
7575
7676
const status = computed(() => {
7777
if (!show?.value) return;
78-
return capitalizeEachWord(show.value?.status) ?? '-';
78+
return capitalizeEachWord(show.value?.status) || '-';
7979
});
8080
8181
const airedEpisodes = computed(() => {
@@ -92,12 +92,12 @@ const episodeType = computed(() => {
9292
9393
const network = computed(() => {
9494
if (!show?.value && !season?.value) return;
95-
return show?.value?.network ?? season?.value?.network ?? '-';
95+
return (show?.value?.network ?? season?.value?.network) || '-';
9696
});
9797
9898
const country = computed(() => {
9999
if (!show?.value) return;
100-
return show.value?.country ?? '-';
100+
return show.value?.country || '-';
101101
});
102102
103103
const ids = computed(() => {
@@ -183,21 +183,23 @@ const ids = computed(() => {
183183
/>
184184
</NFlex>
185185

186-
<!-- Genres -->
187-
<PanelDetail
188-
:label="i18n('genres')"
189-
:values="genres"
190-
:skeleton="{ width: '3rem' }"
191-
array
192-
/>
193-
194-
<!-- links -->
195-
<PanelLinks
196-
:ids="ids"
197-
:mode="mode"
198-
:season="episode?.season ?? season?.number"
199-
:episode="episode?.number"
200-
/>
186+
<NFlex class="lists" vertical size="large">
187+
<!-- Genres -->
188+
<PanelDetail
189+
:label="i18n('genres')"
190+
:values="genres"
191+
:skeleton="{ width: '3rem' }"
192+
array
193+
/>
194+
195+
<!-- links -->
196+
<PanelLinks
197+
:ids="ids"
198+
:mode="mode"
199+
:season="episode?.season ?? season?.number"
200+
:episode="episode?.number"
201+
/>
202+
</NFlex>
201203
</NFlex>
202204
</template>
203205

@@ -207,4 +209,8 @@ const ids = computed(() => {
207209
flex: 1 1 auto;
208210
width: 100%;
209211
}
212+
213+
.lists {
214+
margin: 0.25rem 0 0.5rem;
215+
}
210216
</style>

src/components/views/panel/ShowPanelOverview.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ const url = computed(() => {
7777
const overview = computed(() => {
7878
if (mode.value === 'show') {
7979
if (!show?.value) return;
80-
return show?.value?.overview ?? '-';
80+
return show?.value?.overview || '-';
8181
}
8282
if (mode.value === 'season') {
8383
if (!season?.value) return;
84-
return season?.value?.overview ?? show?.value?.overview ?? '-';
84+
return (season?.value?.overview ?? show?.value?.overview) || '-';
8585
}
8686
if (!episode?.value) return;
87-
return episode?.value?.overview ?? '-';
87+
return episode?.value?.overview || '-';
8888
});
8989
</script>
9090

0 commit comments

Comments
 (0)