Skip to content

Commit 1341e93

Browse files
committed
feat(web): parametrise full-height to allow override
1 parent 9e0baf6 commit 1341e93

13 files changed

+49
-18
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@dvcol/base-http-client": "^1.10.0",
5555
"@dvcol/common-utils": "^1.4.0",
5656
"@dvcol/tmdb-http-client": "^1.2.3",
57-
"@dvcol/trakt-http-client": "^1.4.1",
57+
"@dvcol/trakt-http-client": "^1.4.3",
5858
"@dvcol/tvdb-http-client": "^1.1.3",
5959
"@dvcol/web-extension-utils": "^3.0.1",
6060
"@vue/devtools": "^7.0.15",

pnpm-lock.yaml

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/AppComponent.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ main {
162162
flex-direction: column;
163163
align-items: center;
164164
justify-content: center;
165-
min-height: calc(100dvh - #{layout.$header-navbar-height});
165+
min-height: calc(var(--full-height) - #{layout.$header-navbar-height});
166166
margin-top: layout.$header-navbar-height;
167167
}
168168

src/components/common/list/ListScroll.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ const onLoadMore = (payload: { page: number; pageCount: number; pageSize: number
215215
@include animation.fade-in;
216216
217217
.list-scroll {
218-
height: calc(100dvh - 8px);
218+
height: calc(var(--full-height) - 8px);
219219
margin-top: -#{layout.$header-navbar-height};
220220
margin-bottom: 8px;
221221

src/components/container/ContainerComponent.ce.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const root = ref<HTMLElement>();
9090
display: flex;
9191
flex: 1 1 auto;
9292
flex-direction: column;
93-
height: 100vh;
93+
height: var(--full-height);
9494
overflow: auto;
9595
color: var(--color-text);
9696
font-weight: normal;

src/components/views/about/AboutComponent.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const openRelease = (url?: string) => {
127127
128128
.container {
129129
width: 100%;
130-
height: calc(100dvh - #{layout.$header-navbar-height});
130+
height: calc(var(--full-height) - #{layout.$header-navbar-height});
131131
background: transparent;
132132
133133
.card {

src/components/views/login/LoginComponent.vue

+12-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,15 @@ import {
1616
NText,
1717
} from 'naive-ui';
1818
19-
import { computed, onDeactivated, onMounted, ref, Transition, watch } from 'vue';
19+
import {
20+
computed,
21+
onActivated,
22+
onDeactivated,
23+
onMounted,
24+
ref,
25+
Transition,
26+
watch,
27+
} from 'vue';
2028
2129
import { useRoute, useRouter } from 'vue-router';
2230
@@ -133,6 +141,9 @@ const onClick = () => {
133141
return onSignIn();
134142
};
135143
144+
onActivated(() => {
145+
if (useCode.value) getCodes();
146+
});
136147
onDeactivated(() => onCancel());
137148
</script>
138149

src/components/views/panel/MoviePanel.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,12 @@ onMounted(() => {
274274
>
275275
{{ title }}
276276
</TitleLink>
277-
<NSkeleton v-else class="show-title-skeleton" style="width: 50dvh" round />
277+
<NSkeleton
278+
v-else
279+
class="show-title-skeleton"
280+
style="width: var(--half-height)"
281+
round
282+
/>
278283

279284
<PanelPoster :tmdb="movie?.ids.tmdb" mode="movie" />
280285

src/components/views/panel/PanelOverview.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const { openTab } = useLinksStore();
3838
>
3939
{{ title }}
4040
</TitleLink>
41-
<NSkeleton v-else class="title-skeleton" style="width: 40dvh" round />
41+
<NSkeleton v-else class="title-skeleton" style="width: var(--height-40-dvh)" round />
4242

4343
<div v-if="overview">{{ overview }}</div>
4444
<NSkeleton v-else style="width: 100%" :repeat="3" :sharp="false" />

src/components/views/panel/PersonPanel.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,12 @@ const { openTab } = useLinksStore();
7777
>
7878
{{ title }}
7979
</TitleLink>
80-
<NSkeleton v-else class="show-title-skeleton" style="width: 50dvh" round />
80+
<NSkeleton
81+
v-else
82+
class="show-title-skeleton"
83+
style="width: var(--half-height)"
84+
round
85+
/>
8186

8287
<PanelPoster :tmdb="person?.ids.tmdb" mode="person" portait />
8388

src/components/views/panel/ShowPanel.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,12 @@ const { openTab } = useLinksStore();
380380
>
381381
{{ title }}
382382
</TitleLink>
383-
<NSkeleton v-else class="show-title-skeleton" style="width: 50dvh" round />
383+
<NSkeleton
384+
v-else
385+
class="show-title-skeleton"
386+
style="width: var(--half-height)"
387+
round
388+
/>
384389

385390
<PanelPoster
386391
:tmdb="show?.ids.tmdb"

src/components/views/settings/SettingsComponent.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ onDeactivated(() => {
115115
116116
.container {
117117
width: 100%;
118-
height: 100dvh;
118+
height: var(--full-height);
119119
margin-top: -#{layout.$header-navbar-height};
120120
background: transparent;
121121
@@ -142,12 +142,12 @@ onDeactivated(() => {
142142
.menu {
143143
@include mixin.hover-background;
144144
145-
height: calc(100dvh - #{layout.$header-navbar-height});
145+
height: calc(var(--full-height) - #{layout.$header-navbar-height});
146146
padding: 0.5rem;
147147
}
148148
149149
.content {
150-
height: 100dvh;
150+
height: var(--full-height);
151151
background: transparent;
152152
}
153153

src/styles/base.scss

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
/* color palette from <https://github.com/vuejs/theme> */
22
:host {
3+
/* height */
4+
--full-height: 100dvh;
5+
--half-height: 50dvh;
6+
--height-40-dvh: 40dvh;
7+
38
/* font variables */
49
--font-size-xxs: 0.625rem;
510
--font-size-xs: 0.75rem;

0 commit comments

Comments
 (0)