diff --git a/dashboard/src/components/Sidebar.vue b/dashboard/src/components/Sidebar.vue index 2514c267a..e9a382932 100644 --- a/dashboard/src/components/Sidebar.vue +++ b/dashboard/src/components/Sidebar.vue @@ -15,8 +15,16 @@ function onClose() { isOpen.value = false; } +const activeGroup = ref(''); +function onToggleGroup(group) { + activeGroup.value = activeGroup.value === group ? '' : group; +} + function onHashChange() { active.value = window.location.hash.slice(2); + + if (active.value.indexOf('email') === 0) activeGroup.value = 'email'; + else activeGroup.value = ''; } onMounted(() => { @@ -45,9 +53,14 @@ onUnmounted(() => { {{ $t('backups.title') }} {{ $t('branding.title') }} {{ $t('domains.title') }} - {{ $t('emails.title') }} - {{ $t('email.incoming.mailboxes.title') }} - {{ $t('email.incoming.mailinglists.title') }} + + + + {{ $t('eventlog.title') }} {{ $t('network.title') }} {{ $t('services.title') }} @@ -160,4 +173,24 @@ onUnmounted(() => { opacity: 1; } +.sidebar-item-group { + padding-left: 20px; + height: auto; + overflow: hidden; + /* we need height to auto so we animate max-height. needs to be bigger than we need */ + max-height: 300px; +} + +.sidebar-item-group-animation-enter-active, +.sidebar-item-group-animation-leave-active { + transition: all 0.2s linear; +} + +.sidebar-item-group-animation-leave-to, +.sidebar-item-group-animation-enter-from { + transform: translateX(-100px); + opacity: 0; + max-height: 0; +} +