Skip to content

Commit a4fb08c

Browse files
committed
fix(css): adjust blur gradient for panels & navbar
1 parent e9733d4 commit a4fb08c

File tree

4 files changed

+21
-6
lines changed

4 files changed

+21
-6
lines changed

src/components/AppComponent.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ const onBack = () => {
4747
<template>
4848
<header :class="{ open: panel }">
4949
<RouterView v-slot="{ Component }" name="navbar">
50-
<NavbarComponent v-if="isAuthenticated">
50+
<NavbarComponent v-if="isAuthenticated" :disabled="panel">
5151
<template v-if="Component" #drawer="{ parentElement }">
5252
<Transition name="scale" mode="out-in">
5353
<KeepAlive>
@@ -130,7 +130,7 @@ header {
130130
}
131131
132132
&.open > :first-child {
133-
background: var(--bg-color-hover);
133+
background: var(--bg-gradient-60-90);
134134
backdrop-filter: blur(var(--bg-blur-20));
135135
}
136136
}

src/components/common/navbar/NavbarComponent.vue

+12-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts" setup>
22
import { NTab, NTabs } from 'naive-ui';
3-
import { computed, ref, useSlots } from 'vue';
3+
import { computed, ref, toRefs, useSlots } from 'vue';
44
import { useRoute, useRouter } from 'vue-router';
55
66
import NavbarSettingsDropdown from '~/components/common/navbar/NavbarSettingsDopdown.vue';
@@ -9,6 +9,16 @@ import { Route } from '~/router';
99
import { NavbarService } from '~/services/navbar.service';
1010
import { useI18n } from '~/utils';
1111
12+
const props = defineProps({
13+
disabled: {
14+
type: Boolean,
15+
required: false,
16+
default: false,
17+
},
18+
});
19+
20+
const { disabled } = toRefs(props);
21+
1222
const i18n = useI18n('route');
1323
const route = useRoute();
1424
const router = useRouter();
@@ -44,7 +54,7 @@ const hasDrawer = computed(() => {
4454
});
4555
4656
const showDrawer = computed(() => {
47-
const show = hasDrawer.value && (isHover.value || isFocus.value);
57+
const show = !disabled.value && hasDrawer.value && (isHover.value || isFocus.value);
4858
NavbarService.open.value = show;
4959
return show;
5060
});

src/components/container/ContainerComponent.ce.vue

+6-2
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,15 @@ const root = ref<HTMLElement>();
164164
}
165165
}
166166
167-
.n-drawer {
168-
background: linear-gradient(to right, var(--bg-color-60) 5%, var(--bg-color-90));
167+
.n-drawer-mask {
168+
background: var(--bg-gradient-60-90);
169169
backdrop-filter: blur(var(--bg-blur-20));
170170
}
171171
172+
.n-drawer {
173+
background: transparent;
174+
}
175+
172176
.n-message-wrapper .n-message,
173177
.n-notification-container .n-notification,
174178
.n-tooltip.n-tooltip,

src/styles/base.scss

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
--bg-black-70: rgba(0 0 0 / 70%);
2828
--bg-black-80: rgba(0 0 0 / 80%);
2929
--bg-black-90: rgba(0 0 0 / 90%);
30+
--bg-gradient-60-90: linear-gradient(to right, var(--bg-color-60) 5%, var(--bg-color-90));
3031
--bg-red: rgba(255 222 223);
3132
--bg-red-20: rgba(255 222 223 / 20%);
3233
--bg-red-30: rgba(255 222 223 / 30%);

0 commit comments

Comments
 (0)