Skip to content

Commit 7129f7a

Browse files
committed
fix(login): fix blank header in login page
1 parent 0f20096 commit 7129f7a

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

src/components/AppComponent.vue

+8-3
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ const onBack = () => {
7878
</RouterView>
7979
</header>
8080
<RouterView v-slot="{ Component }">
81-
<main ref="mainRef">
81+
<main ref="mainRef" :class="{ 'full-height': !isAuthenticated }">
8282
<GridBackground v-if="!Component" :size="20" />
8383
<Transition name="scale" mode="out-in">
8484
<KeepAlive>
@@ -102,7 +102,7 @@ const onBack = () => {
102102
:on-after-leave="onAfterLeave"
103103
:on-after-enter="onAfterEnter"
104104
>
105-
<NDrawerContent :native-scrollbar="false">
105+
<NDrawerContent v-if="isAuthenticated" :native-scrollbar="false">
106106
<!-- Header -->
107107
<NFlex justify="space-between" class="panel-header">
108108
<NButton circle quaternary @click="onBack">
@@ -134,7 +134,7 @@ const onBack = () => {
134134
@mouseenter="footerOpen = true"
135135
@mouseleave="footerOpen = false"
136136
>
137-
<CheckinComponent :parent-element="footerRef" />
137+
<CheckinComponent v-if="isAuthenticated" :parent-element="footerRef" />
138138
</footer>
139139
<DebugProvider />
140140
</RouterView>
@@ -179,6 +179,11 @@ main {
179179
justify-content: center;
180180
min-height: calc(var(--full-height) - #{layout.$header-navbar-height});
181181
margin-top: layout.$header-navbar-height;
182+
183+
&.full-height {
184+
min-height: var(--full-height);
185+
margin-top: 0;
186+
}
182187
}
183188
184189
footer {

src/components/views/login/LoginCard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ onMounted(() => {
110110
:class="{ progress, interval }"
111111
prefix="bar"
112112
:style="{
113-
minWidth: minWidth ?? `${ _message?.length }ch`,
113+
minWidth,
114114
'--progress': `${ _progress }%`,
115115
'--interval': `${interval}ms`,
116116
}"

src/components/views/login/LoginComponent.vue

+6-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ onDeactivated(() => onCancel());
154154
</script>
155155

156156
<template>
157-
<NFlex vertical justify="space-around" align="center">
157+
<NFlex class="login-container" vertical justify="space-around" align="center">
158158
<GridBackground :size="20" />
159159

160160
<Transition name="scale" mode="in-out">
@@ -222,9 +222,14 @@ onDeactivated(() => onCancel());
222222
</template>
223223

224224
<style lang="scss" scoped>
225+
@use '~/styles/layout' as layout;
225226
@use '~/styles/transition' as transition;
226227
@include transition.scale(0.9);
227228
229+
.login-container {
230+
margin-top: layout.$header-navbar-height;
231+
}
232+
228233
.checkboxes {
229234
align-self: center;
230235
width: fit-content;

0 commit comments

Comments
 (0)