Skip to content

Commit ba185bc

Browse files
committed
fix(checkin): adds watching offset in about and settings
1 parent 171dbd2 commit ba185bc

File tree

3 files changed

+35
-8
lines changed

3 files changed

+35
-8
lines changed

src/components/views/about/AboutComponent.vue

+17-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import IconGithub from '~/components/icons/IconGithub.vue';
1010
import IconStar from '~/components/icons/IconStar.vue';
1111
import { ExternaLinks, ResolveExternalLinks } from '~/settings/external.links';
1212
import { useAppStateStoreRefs } from '~/stores/app-state.store';
13+
import { useWatchingStoreRefs } from '~/stores/data/watching.store';
1314
import { useLinksStore } from '~/stores/settings/links.store';
1415
import { useI18n } from '~/utils/i18n.utils';
1516
@@ -22,6 +23,7 @@ const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
2223
const { openTab } = useLinksStore();
2324
2425
const { floating, reverse } = useAppStateStoreRefs();
26+
const { watching } = useWatchingStoreRefs();
2527
2628
const openRelease = (url?: string) => {
2729
if (!url) return;
@@ -32,7 +34,7 @@ const openRelease = (url?: string) => {
3234
<template>
3335
<NLayout
3436
class="container"
35-
:class="{ floating, reverse }"
37+
:class="{ floating, reverse, watching }"
3638
:content-style="{
3739
padding: '0.75rem 1rem',
3840
}"
@@ -135,19 +137,29 @@ const openRelease = (url?: string) => {
135137
background: transparent;
136138
transition: padding 0.5s var(--n-bezier);
137139
138-
&.floating {
139-
height: layout.$floating-content-height;
140-
padding-top: layout.$floating-navbar-height;
140+
&.watching {
141+
padding-bottom: layout.$safe-watching-height;
141142
}
142143
143144
&.reverse {
144-
padding-bottom: layout.$header-navbar-height;
145+
margin-bottom: layout.$header-navbar-height;
146+
147+
&.watching {
148+
padding-top: layout.$top-safe-watching-height;
149+
padding-bottom: 0;
150+
}
145151
}
146152
147153
.card {
148154
@include mixin.hover-background($from: var(--bg-black-50), $to: var(--bg-color-80));
149155
}
150156
157+
&.floating {
158+
.card {
159+
margin-top: layout.$floating-navbar-height;
160+
}
161+
}
162+
151163
.link {
152164
:deep(.label) {
153165
padding: 0.15rem;

src/components/views/checkin/CheckinComponent.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -412,8 +412,8 @@ const onClick = () => {
412412
}
413413
414414
&.reverse {
415-
height: layout.$watching-height;
416-
padding-top: calc(#{layout.$safe-area-inset-top / 1.5});
415+
height: layout.$top-safe-watching-height;
416+
padding-top: calc(#{layout.$safe-area-inset-top} / 1.5);
417417
418418
&:active,
419419
&:focus-within,

src/components/views/settings/SettingsComponent.vue

+16-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import type { Component, Ref } from 'vue';
88
import PageLoading from '~/components/common/loading/PageLoading.vue';
99
import { useAppStateStoreRefs } from '~/stores/app-state.store';
1010
import { useSimklStoreRefs } from '~/stores/data/simkl.store';
11+
import { useWatchingStoreRefs } from '~/stores/data/watching.store';
1112
import { useI18n } from '~/utils/i18n.utils';
1213
import lazyComponent from '~/utils/lazy.utils';
1314
import { watchMedia } from '~/utils/window.utils';
@@ -104,6 +105,7 @@ const onLeave = (section: Section) => {
104105
const isCompact = watchMedia('(max-width: 600px)');
105106
106107
const { floating, reverse } = useAppStateStoreRefs();
108+
const { isWatching } = useWatchingStoreRefs();
107109
108110
onDeactivated(() => {
109111
target.value = undefined;
@@ -112,7 +114,11 @@ onDeactivated(() => {
112114
</script>
113115

114116
<template>
115-
<NLayout class="container" :class="{ floating, reverse }" has-sider>
117+
<NLayout
118+
class="container"
119+
:class="{ floating, reverse, watching: isWatching }"
120+
has-sider
121+
>
116122
<NLayoutSider
117123
class="menu"
118124
bordered
@@ -226,6 +232,10 @@ onDeactivated(() => {
226232
margin-top: layout.$safe-navbar-height;
227233
}
228234
235+
&.watching {
236+
padding-bottom: layout.$safe-watching-height;
237+
}
238+
229239
&.reverse {
230240
margin-top: 0;
231241
@@ -240,6 +250,11 @@ onDeactivated(() => {
240250
margin-top: calc(#{layout.$safe-area-inset-top / 2});
241251
}
242252
}
253+
254+
&.watching {
255+
padding-top: layout.$top-safe-watching-height;
256+
padding-bottom: 0;
257+
}
243258
}
244259
245260
&.floating {

0 commit comments

Comments
 (0)