|
6 | 6 | <div v-if="!item.children || item.children.length === 0"> |
7 | 7 | <Link |
8 | 8 | :href="buildLinkClass(item.route)" |
9 | | - class="group flex items-center px-3 py-2.5 text-sm font-medium rounded-lg transition-all duration-200" |
| 9 | + class="btn btn-ghost justify-start h-auto py-3 px-3 text-sm font-medium normal-case" |
10 | 10 | :class="isActive(item.route) |
11 | | - ? 'bg-gradient-to-r from-blue-500 to-purple-600 text-white shadow-lg' |
12 | | - : 'text-slate-700 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800 hover:text-slate-900 dark:hover:text-slate-100'" |
| 11 | + ? 'btn-primary text-primary-content shadow-lg' |
| 12 | + : 'text-base-content hover:bg-base-200'" |
13 | 13 | > |
14 | 14 | <div |
15 | 15 | class="w-6 h-6 mr-3 flex items-center justify-center" |
16 | 16 | v-html="item.icon" |
17 | 17 | ></div> |
18 | | - <span class="flex-1">{{ item.menu_label }}</span> |
| 18 | + <span class="flex-1 text-left">{{ item.menu_label }}</span> |
19 | 19 | <div |
20 | 20 | v-if="item.badge" |
21 | | - class="ml-2 px-2 py-0.5 text-xs font-semibold rounded-full" |
| 21 | + class="badge badge-sm ml-2" |
22 | 22 | :class="isActive(item.route) |
23 | | - ? 'bg-white/20 text-white' |
24 | | - : 'bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400'" |
| 23 | + ? 'badge-neutral badge-outline' |
| 24 | + : 'badge-primary'" |
25 | 25 | > |
26 | 26 | {{ item.badge }} |
27 | 27 | </div> |
|
32 | 32 | <div v-else> |
33 | 33 | <button |
34 | 34 | @click="toggleSubmenu(index)" |
35 | | - class="w-full group flex items-center px-3 py-2.5 text-sm font-medium rounded-lg transition-all duration-200" |
| 35 | + class="btn btn-ghost w-full justify-start h-auto py-3 px-3 text-sm font-medium normal-case" |
36 | 36 | :class="isSubmenuOpen(index) |
37 | | - ? 'bg-slate-100 dark:bg-slate-800 text-slate-900 dark:text-slate-100' |
38 | | - : 'text-slate-700 dark:text-slate-300 hover:bg-slate-100 dark:hover:bg-slate-800 hover:text-slate-900 dark:hover:text-slate-100'" |
| 37 | + ? 'bg-base-200 text-base-content' |
| 38 | + : 'text-base-content hover:bg-base-200'" |
39 | 39 | > |
40 | 40 | <div |
41 | 41 | class="w-6 h-6 mr-3 flex items-center justify-center" |
|
56 | 56 | <!-- Submenu --> |
57 | 57 | <div |
58 | 58 | v-if="isSubmenuOpen(index)" |
59 | | - class="mt-1 ml-6 space-y-1 border-l-2 border-slate-200 dark:border-slate-700 pl-4" |
| 59 | + class="collapse collapse-open" |
60 | 60 | > |
61 | | - <Link |
62 | | - v-for="(child, childIndex) in item.children" |
63 | | - :key="childIndex" |
64 | | - :href="buildLinkClass(child.route)" |
65 | | - class="group flex items-center px-3 py-2 text-sm font-medium rounded-lg transition-all duration-200" |
66 | | - :class="isActive(child.route) |
67 | | - ? 'bg-gradient-to-r from-blue-500 to-purple-600 text-white shadow-lg' |
68 | | - : 'text-slate-600 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800 hover:text-slate-900 dark:hover:text-slate-100'" |
69 | | - > |
70 | | - <div |
71 | | - class="w-5 h-5 mr-3 flex items-center justify-center" |
72 | | - v-html="child.icon" |
73 | | - ></div> |
74 | | - <span class="flex-1">{{ child.menu_label }}</span> |
75 | | - <div |
76 | | - v-if="child.badge" |
77 | | - class="ml-2 px-2 py-0.5 text-xs font-semibold rounded-full" |
78 | | - :class="isActive(child.route) |
79 | | - ? 'bg-white/20 text-white' |
80 | | - : 'bg-blue-100 text-blue-600 dark:bg-blue-900/30 dark:text-blue-400'" |
81 | | - > |
82 | | - {{ child.badge }} |
| 61 | + <div class="collapse-content pt-1 pb-0 pl-6 pr-0"> |
| 62 | + <div class="border-l-2 border-base-300 pl-4 space-y-1"> |
| 63 | + <Link |
| 64 | + v-for="(child, childIndex) in item.children" |
| 65 | + :key="childIndex" |
| 66 | + :href="buildLinkClass(child.route)" |
| 67 | + class="btn btn-ghost btn-sm justify-start h-auto py-2 px-3 text-sm font-medium normal-case w-full" |
| 68 | + :class="isActive(child.route) |
| 69 | + ? 'btn-primary text-primary-content shadow-lg' |
| 70 | + : 'text-base-content/80 hover:bg-base-200 hover:text-base-content'" |
| 71 | + > |
| 72 | + <div |
| 73 | + class="w-5 h-5 mr-3 flex items-center justify-center" |
| 74 | + v-html="child.icon" |
| 75 | + ></div> |
| 76 | + <span class="flex-1 text-left">{{ child.menu_label }}</span> |
| 77 | + <div |
| 78 | + v-if="child.badge" |
| 79 | + class="badge badge-xs ml-2" |
| 80 | + :class="isActive(child.route) |
| 81 | + ? 'badge-neutral badge-outline' |
| 82 | + : 'badge-primary'" |
| 83 | + > |
| 84 | + {{ child.badge }} |
| 85 | + </div> |
| 86 | + </Link> |
83 | 87 | </div> |
84 | | - </Link> |
| 88 | + </div> |
85 | 89 | </div> |
86 | 90 | </div> |
87 | 91 | </div> |
88 | 92 |
|
89 | 93 | <!-- Quick Actions Section --> |
90 | | - <div class="pt-6 mt-6 border-t border-slate-200 dark:border-slate-700"> |
91 | | - <h3 class="px-3 text-xs font-semibold text-slate-500 dark:text-slate-400 uppercase tracking-wider mb-3"> |
| 94 | + <div class="divider divider-start"> |
| 95 | + <span class="text-xs font-semibold text-base-content/60 uppercase tracking-wider"> |
92 | 96 | Quick Actions |
93 | | - </h3> |
94 | | - <div class="space-y-2"> |
95 | | - <button class="w-full group flex items-center px-3 py-2 text-sm font-medium text-slate-600 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800 hover:text-slate-900 dark:hover:text-slate-100 rounded-lg transition-all duration-200"> |
96 | | - <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
97 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"/> |
98 | | - </svg> |
99 | | - Create New |
100 | | - </button> |
101 | | - <button class="w-full group flex items-center px-3 py-2 text-sm font-medium text-slate-600 dark:text-slate-400 hover:bg-slate-100 dark:hover:bg-slate-800 hover:text-slate-900 dark:hover:text-slate-100 rounded-lg transition-all duration-200"> |
102 | | - <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
103 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/> |
104 | | - </svg> |
105 | | - Analytics |
106 | | - </button> |
107 | | - </div> |
| 97 | + </span> |
| 98 | + </div> |
| 99 | + |
| 100 | + <div class="space-y-2"> |
| 101 | + <button class="btn btn-ghost justify-start h-auto py-2 px-3 text-sm font-medium normal-case w-full text-base-content/80 hover:bg-base-200 hover:text-base-content"> |
| 102 | + <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 103 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 6v6m0 0v6m0-6h6m-6 0H6"/> |
| 104 | + </svg> |
| 105 | + <span class="flex-1 text-left">Create New</span> |
| 106 | + </button> |
| 107 | + |
| 108 | + <button class="btn btn-ghost justify-start h-auto py-2 px-3 text-sm font-medium normal-case w-full text-base-content/80 hover:bg-base-200 hover:text-base-content"> |
| 109 | + <svg class="w-5 h-5 mr-3" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 110 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"/> |
| 111 | + </svg> |
| 112 | + <span class="flex-1 text-left">Analytics</span> |
| 113 | + </button> |
108 | 114 | </div> |
109 | 115 | </nav> |
110 | 116 | </template> |
|
0 commit comments