Merge branch 'main' of https://github.com/defuj/eis into development
This commit is contained in:
@ -4,12 +4,7 @@ import { NotificationProvider } from '@/components/Notification'
|
||||
import { useDialogStore } from '@/stores/dialog'
|
||||
import ActionDialog from '@/components/Dialogs/ActionDialog.vue'
|
||||
import CommandPalettes from '@/components/CommandPalettes.vue'
|
||||
import { onMounted } from 'vue'
|
||||
const dialog = useDialogStore()
|
||||
|
||||
onMounted(() => {
|
||||
// remove all local storage
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -1860,15 +1860,6 @@ select {
|
||||
background-color: rgb(204 204 0 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-gray-200 {
|
||||
--tw-bg-opacity: 1;
|
||||
background-color: rgb(229 231 235 / var(--tw-bg-opacity));
|
||||
}
|
||||
|
||||
.bg-opacity-100 {
|
||||
--tw-bg-opacity: 1;
|
||||
}
|
||||
|
||||
.bg-opacity-25 {
|
||||
--tw-bg-opacity: 0.25;
|
||||
}
|
||||
@ -1889,8 +1880,8 @@ select {
|
||||
--tw-bg-opacity: 0.8;
|
||||
}
|
||||
|
||||
.bg-none {
|
||||
background-image: none;
|
||||
.bg-opacity-100 {
|
||||
--tw-bg-opacity: 1;
|
||||
}
|
||||
|
||||
.fill-gray-500 {
|
||||
|
@ -130,7 +130,6 @@
|
||||
</ComboboxOptions>
|
||||
|
||||
<div v-if="query !== '' && filteredMenus.length === 0" class="px-6 text-center py-14 sm:px-14">
|
||||
<!-- <FolderIcon class="w-6 h-6 mx-auto text-gray-900 text-opacity-40" aria-hidden="true" /> -->
|
||||
<h2 class="font-semibold text-slate-900">Tidak ada hasil</h2>
|
||||
|
||||
<p class="mt-2 text-sm leading-6 text-slate-600">
|
||||
|
@ -33,8 +33,7 @@ const isMenuSelected = computed(() => {
|
||||
|
||||
<template>
|
||||
<div :class="[isChildren ? 'ml-2 mt-1 bg-primary-100 rounded-xl' : '']">
|
||||
<Disclosure :defaultOpen="item.expanded" as="dev">
|
||||
<!-- Nested item with children -->
|
||||
<Disclosure :defaultOpen="item.expanded">
|
||||
<DisclosureButton @click="menu.toggleSidebarMenu(item.path, !item.expanded)"
|
||||
:class="[(isMenuSelected || item.expanded || isChildren) ? 'bg-primary-100 font-bold' : 'font-semibold text-aside hover:bg-primary-100 hover:text-primary-500', isMenuSelected ? 'text-primary-500' : 'text-gray-600', isChildren ? 'pl-1 pr-2' : 'px-2', 'group w-full flex items-center py-2 text-left text-xs rounded-lg focus:outline-none focus:ring-0']">
|
||||
<component v-if="isChildren" :is="IconDotOutline"
|
||||
|
@ -13,11 +13,7 @@ export const useCommandPalattesStore = defineStore('command_palettes', () => {
|
||||
const keyFStatus = ref(false)
|
||||
|
||||
const showCommandPalettes = () => {
|
||||
open.value = true;
|
||||
}
|
||||
|
||||
const handleOnDismissCommandPalettes = () => {
|
||||
open.value = false;
|
||||
open.value = true
|
||||
}
|
||||
|
||||
const onKeyPressed = (event: KeyboardEvent) => {
|
||||
@ -100,7 +96,6 @@ export const useCommandPalattesStore = defineStore('command_palettes', () => {
|
||||
return {
|
||||
open,
|
||||
showCommandPalettes,
|
||||
handleOnDismissCommandPalettes,
|
||||
onKeyPressed,
|
||||
onKeyUp,
|
||||
addRecent,
|
||||
|
@ -39,19 +39,14 @@ export const useMenuStore = defineStore('menu', () => {
|
||||
toggleItemExpanded(navigation.value)
|
||||
}
|
||||
const toggleSidebarDesktop = () => (sidebarShowed.value = !sidebarShowed.value)
|
||||
|
||||
watch(router, (value) => {
|
||||
if (value.currentRoute.value.fullPath === '/' || value.currentRoute.value.fullPath === '/home') {
|
||||
for (const item of navigation.value) {
|
||||
item.expanded = false
|
||||
}
|
||||
const collapseAllMenu = (): void => {
|
||||
for (const item of navigation.value) {
|
||||
item.expanded = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
watch(menuSelected, (value) => {
|
||||
if (value !== '/login' && value !== '/404' && value !== '/home' && value !== '/') {
|
||||
console.log('current route', value);
|
||||
|
||||
const result = command.searchRoutesPath(routes, value)
|
||||
if (result.length > 0) {
|
||||
const route = result.find((item) => item.path === value)
|
||||
@ -59,7 +54,8 @@ export const useMenuStore = defineStore('menu', () => {
|
||||
command.addRecent(route)
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
collapseAllMenu()
|
||||
}
|
||||
})
|
||||
|
||||
@ -80,6 +76,7 @@ export const useMenuStore = defineStore('menu', () => {
|
||||
}
|
||||
|
||||
return {
|
||||
collapseAllMenu,
|
||||
expandCurrentActiveMenu,
|
||||
navigation,
|
||||
toggleSidebar,
|
||||
|
Reference in New Issue
Block a user