add walcome page
This commit is contained in:
@ -33,13 +33,35 @@
|
||||
<ComboboxOption as="template" v-for="menu in query === '' ? recent : filteredMenus"
|
||||
:key="menu.path" v-slot="{ active }">
|
||||
<li @click="openMenu(menu)"
|
||||
:class="['flex cursor-pointer select-none items-center rounded-md px-3 py-2', active && 'bg-gray-900 bg-opacity-5 text-gray-900']">
|
||||
<DocumentTextIcon
|
||||
:class="['flex flex-row cursor-pointer select-none items-center rounded-md px-3 py-2', active && 'bg-gray-900 bg-opacity-5 text-gray-900']">
|
||||
<img v-if="menu.path.includes('/gangguan/')" :src="navigationIcon[0]"
|
||||
alt="icon"
|
||||
:class="['h-6 w-6 flex-none', active ? 'opacity-100' : 'opacity-40']" />
|
||||
<img v-else-if="menu.path.includes('/keluhan/')" :src="navigationIcon[1]"
|
||||
alt="icon"
|
||||
:class="['h-6 w-6 flex-none', active ? 'opacity-100' : 'opacity-40']" />
|
||||
<img v-else-if="menu.path.includes('/monalisa/')" :src="navigationIcon[2]"
|
||||
alt="icon"
|
||||
:class="['h-6 w-6 flex-none', active ? 'opacity-100' : 'opacity-40']" />
|
||||
<img v-else-if="menu.path.includes('/check-in-out/')"
|
||||
:src="navigationIcon[3]" alt="icon"
|
||||
:class="['h-6 w-6 flex-none', active ? 'opacity-100' : 'opacity-40']" />
|
||||
<img v-else-if="menu.path.includes('/anomali-pengaduan/')"
|
||||
:src="navigationIcon[4]" alt="icon"
|
||||
:class="['h-6 w-6 flex-none', active ? 'opacity-100' : 'opacity-40']" />
|
||||
<img v-else :src="navigationIcon[5]" alt="icon"
|
||||
:class="['h-6 w-6 flex-none', active ? 'opacity-100' : 'opacity-40']" />
|
||||
<!-- <DocumentTextIcon
|
||||
:class="['h-6 w-6 flex-none text-gray-900 text-opacity-40', active && 'text-opacity-100']"
|
||||
aria-hidden="true" />
|
||||
<span class="flex-auto ml-3 truncate">
|
||||
{{ menu.name }}
|
||||
</span>
|
||||
aria-hidden="true" /> -->
|
||||
<div class="flex flex-col flex-auto ml-3 space-y-1">
|
||||
<span class="text-sm font-medium text-gray-800 truncate">
|
||||
{{ menu.name }}
|
||||
</span>
|
||||
<span class="text-xs text-gray-500 ">
|
||||
{{ menu.path.replace('/home/', '') }}
|
||||
</span>
|
||||
</div>
|
||||
<span v-if="active" class="flex-none ml-3 text-gray-500">
|
||||
Buka
|
||||
</span>
|
||||
@ -84,6 +106,7 @@ import {
|
||||
import { useRouter, type RouteRecordRaw } from 'vue-router'
|
||||
import { routes, extractLeafRoutes } from '@/router'
|
||||
import { useCommandPalattesStore } from '@/stores/command'
|
||||
import { navigationIcon } from '@/utils/route'
|
||||
|
||||
const command = useCommandPalattesStore()
|
||||
const searchRoutesByName = (routes: RouteRecordRaw[], query: string): RouteRecordRaw[] => {
|
||||
|
Reference in New Issue
Block a user