Selaa lähdekoodia

fix: updated styles, added border radius variables, and adjusted the styles of the sidebar menu and user panel

nian 1 kuukausi sitten
vanhempi
commit
8a169cd927

+ 2 - 0
src/assets/base.css

@@ -25,5 +25,7 @@
 @theme inline {
   --color-primary: var(--primary-color);
   --color-naive-border: var(--border-color);
+  --radius-naive: var(--border-radius);
+  --radius-naive-sm: calc(var(--border-radius-small));
   --color-naive-card: var(--card-color);
 }

+ 1 - 0
src/layout/aside/component/SidebarMenu.vue

@@ -47,6 +47,7 @@ watch(
       :render-icon="renderIcon"
       :dropdown-props="{
         size: 'medium',
+        trigger: 'click',
       }"
     />
   </NScrollbar>

+ 1 - 1
src/layout/aside/component/SidebarUserPanel.vue

@@ -19,7 +19,7 @@ const handleUserCardClick = () => {
     class="flex cursor-pointer items-center transition-[background-color,border-radius,margin,padding] hover:bg-neutral-200/90 dark:hover:bg-neutral-750/65"
     :class="
       preferencesStore.preferences.sidebarMenu.collapsed
-        ? 'mx-2 rounded'
+        ? 'mx-2 rounded-naive'
         : 'mx-4 rounded-xl bg-neutral-150 py-3.5 pr-2.5 pl-3.5 dark:bg-neutral-800'
     "
     @click="handleUserCardClick"

+ 2 - 2
src/layout/header/HorizontalMenu.vue

@@ -51,7 +51,7 @@ watch(
       <div
         v-if="!type && isEmpty(children)"
         :data-key="key"
-        class="relative flex items-center rounded-[var(--border-radius)] px-2.5 py-2 transition-[background-color,color]"
+        class="relative flex items-center rounded-naive px-2.5 py-2 transition-[background-color,color]"
         :class="[
           disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer',
           menuActiveKey === key
@@ -79,7 +79,7 @@ watch(
       >
         <div
           :data-key="key"
-          class="flex items-center rounded-[var(--border-radius)] py-2 pr-2 pl-2.5 transition-[background-color,color]"
+          class="flex items-center rounded-naive py-2 pr-2 pl-2.5 transition-[background-color,color]"
           :class="[
             disabled ? 'cursor-not-allowed opacity-50' : 'cursor-pointer',
             hasActiveChild(children)