fix and refactor code
This commit is contained in:
@@ -34,7 +34,7 @@
|
||||
to="/dashboard"
|
||||
class="flex items-center rounded-lg hover:bg-gray-100 transition-colors group"
|
||||
:class="[
|
||||
$route.path === '/dashboard' ? 'bg-primary-50 text-primary-700' : 'text-gray-700',
|
||||
route.path === '/dashboard' ? 'bg-primary-50 text-primary-700' : 'text-gray-700',
|
||||
sidebarCollapsed ? 'justify-center p-2' : 'px-4 py-3 space-x-3'
|
||||
]"
|
||||
:title="sidebarCollapsed ? t('app.dashboard') : ''"
|
||||
@@ -50,7 +50,7 @@
|
||||
to="/users"
|
||||
class="flex items-center rounded-lg hover:bg-gray-100 transition-colors group"
|
||||
:class="[
|
||||
$route.path === '/users' ? 'bg-primary-50 text-primary-700' : 'text-gray-700',
|
||||
route.path === '/users' ? 'bg-primary-50 text-primary-700' : 'text-gray-700',
|
||||
sidebarCollapsed ? 'justify-center p-2' : 'px-4 py-3 space-x-3'
|
||||
]"
|
||||
:title="sidebarCollapsed ? t('app.users') : ''"
|
||||
@@ -65,7 +65,7 @@
|
||||
to="/restaurants"
|
||||
class="flex items-center rounded-lg hover:bg-gray-100 transition-colors group"
|
||||
:class="[
|
||||
$route.path === '/restaurants' ? 'bg-primary-50 text-primary-700' : 'text-gray-700',
|
||||
route.path === '/restaurants' ? 'bg-primary-50 text-primary-700' : 'text-gray-700',
|
||||
sidebarCollapsed ? 'justify-center p-2' : 'px-4 py-3 space-x-3'
|
||||
]"
|
||||
:title="sidebarCollapsed ? t('app.restaurants') : ''"
|
||||
@@ -81,7 +81,7 @@
|
||||
to="/settings"
|
||||
class="flex items-center rounded-lg hover:bg-gray-100 transition-colors group"
|
||||
:class="[
|
||||
$route.path === '/settings' ? 'bg-primary-50 text-primary-700' : 'text-gray-700',
|
||||
route.path === '/settings' ? 'bg-primary-50 text-primary-700' : 'text-gray-700',
|
||||
sidebarCollapsed ? 'justify-center p-2' : 'px-4 py-3 space-x-3'
|
||||
]"
|
||||
:title="sidebarCollapsed ? t('app.settings') : ''"
|
||||
@@ -101,7 +101,7 @@
|
||||
class="flex items-center rounded-lg hover:bg-gray-100 transition-colors no-router-link"
|
||||
:class="[
|
||||
sidebarCollapsed ? 'justify-center p-2' : 'px-4 py-3 space-x-3',
|
||||
$route.path === '/phpmyadmin' ? 'bg-primary-50 text-primary-700' : 'text-gray-700'
|
||||
route.path === '/phpmyadmin' ? 'bg-primary-50 text-primary-700' : 'text-gray-700'
|
||||
]"
|
||||
:title="sidebarCollapsed ? t('app.database') : ''"
|
||||
>
|
||||
@@ -209,12 +209,12 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, onMounted } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import { useSettingsStore } from '../../stores/settings'
|
||||
import { useUserStore } from '../../stores/user'
|
||||
import { useSettingsStore } from '@/stores/settings'
|
||||
import { useUserStore } from '@/stores/user'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { useNotification } from '../../composables/useNotification'
|
||||
import { useNotification } from '@/composables/useNotification'
|
||||
|
||||
const { notification } = useNotification()
|
||||
const { notification, showNotification } = useNotification()
|
||||
const settings = useSettingsStore()
|
||||
const userStore = useUserStore()
|
||||
const route = useRoute()
|
||||
|
||||
Reference in New Issue
Block a user