2021-12-09 14:18:38 +01:00
|
|
|
<template>
|
|
|
|
|
<div class="app-nav theme-dark" :class="{'is-compact': compact }">
|
|
|
|
|
<div class="app-nav-boxed">
|
|
|
|
|
<h1 class="app-nav-headline">
|
|
|
|
|
<span class="app-nav-logo-circle"></span>
|
|
|
|
|
<img src="/Assets/zero.svg" class="show-light" v-localize:alt="'@zero.name'" />
|
|
|
|
|
<img src="/Assets/zero-dark.svg" class="show-dark" v-localize:alt="'@zero.name'" />
|
|
|
|
|
</h1>
|
|
|
|
|
|
2021-12-09 16:02:39 +01:00
|
|
|
<!--<ui-button icon="fth-search" :stroke="2.5" type="blank" class="app-nav-search" @click="openSearch" />-->
|
2021-12-09 14:18:38 +01:00
|
|
|
</div>
|
|
|
|
|
|
2021-12-21 15:51:26 +01:00
|
|
|
<ui-dropdown v-if="currentApplication && appStore.applications.length > 0" class="app-nav-switch">
|
2021-12-09 14:18:38 +01:00
|
|
|
<template v-slot:button>
|
|
|
|
|
<ui-button type="light block" :label="currentApplication.name" caret="right" />
|
|
|
|
|
</template>
|
2021-12-21 15:51:26 +01:00
|
|
|
<ui-dropdown-button v-for="app in appStore.applications" :value="app" :key="app.id" :label="app.name" :selected="app.id === appId" @click="applicationChanged" :prevent="true" />
|
2021-12-09 14:18:38 +01:00
|
|
|
<ui-dropdown-separator />
|
2021-12-09 16:02:39 +01:00
|
|
|
<!--<ui-dropdown-button label="Add new application" icon="fth-plus" @click="addApplication" />-->
|
2022-01-11 13:18:03 +01:00
|
|
|
<ui-dropdown-button :disabled="true" label="Manage apps" icon="fth-edit-2" @click="manageApplications" />
|
2021-12-09 14:18:38 +01:00
|
|
|
</ui-dropdown>
|
|
|
|
|
<div v-else class="app-nav-switch is-fake"></div>
|
|
|
|
|
|
|
|
|
|
<nav class="app-nav-inner">
|
|
|
|
|
<template v-for="section in ui.sections">
|
2022-01-11 13:18:03 +01:00
|
|
|
<ui-link :to="section.url" :disabled="sectionDisabled(section)" class="app-nav-item" :alias="section.alias" :class="{ 'has-children': hasChildren(section) }">
|
2021-12-09 14:18:38 +01:00
|
|
|
<ui-icon :symbol="section.icon" class="app-nav-item-icon" :size="18" />
|
|
|
|
|
<span class="app-nav-item-text" v-localize="section.name"></span>
|
|
|
|
|
<ui-icon v-if="hasChildren(section)" symbol="fth-chevron-down" class="app-nav-item-arrow" />
|
2021-12-23 14:39:00 +01:00
|
|
|
</ui-link>
|
2021-12-09 14:18:38 +01:00
|
|
|
<transition name="app-nav-children">
|
|
|
|
|
<div class="app-nav-children" v-if="hasChildren(section) && $route.path.indexOf('/' + section.alias) === 0">
|
2022-01-07 11:11:06 +01:00
|
|
|
<ui-link v-for="child in section.children" v-bind:key="child.alias" :alias="child.alias" :to="child.url" class="app-nav-child">
|
2021-12-09 14:18:38 +01:00
|
|
|
<span class="app-nav-child-text" v-localize="child.name"></span>
|
2022-01-07 11:11:06 +01:00
|
|
|
<span class="app-nav-child-count" v-if="child.count > 0">{{child.count}}</span>
|
2021-12-23 14:39:00 +01:00
|
|
|
</ui-link>
|
2021-12-09 14:18:38 +01:00
|
|
|
</div>
|
|
|
|
|
</transition>
|
|
|
|
|
</template>
|
|
|
|
|
</nav>
|
|
|
|
|
|
|
|
|
|
<ui-dropdown class="app-nav-account" v-if="account.user" align="left bottom">
|
|
|
|
|
<template v-slot:button>
|
|
|
|
|
<button type="button" class="app-nav-account-button">
|
2021-12-09 14:36:30 +01:00
|
|
|
<ui-thumbnail class="-image" :media="account.user.avatarId" :alt="account.user.name">
|
|
|
|
|
<ui-icon symbol="fth-user"></ui-icon>
|
|
|
|
|
</ui-thumbnail>
|
2021-12-09 14:18:38 +01:00
|
|
|
<p class="-text"><strong>{{account.user.name}}</strong></p>
|
|
|
|
|
<ui-icon symbol="fth-more-horizontal" class="-arrow" />
|
|
|
|
|
</button>
|
|
|
|
|
</template>
|
2022-01-11 13:18:03 +01:00
|
|
|
<ui-dropdown-button :disabled="true" label="Edit" icon="fth-edit-2" @click="editUser" />
|
|
|
|
|
<ui-dropdown-button :disabled="true" label="Change password" icon="fth-lock" @click="changePassword" />
|
2021-12-09 14:18:38 +01:00
|
|
|
<!--<ui-dropdown-button label="Toggle sidebar" icon="fth-minimize-2" @click="toggleSidebar" />-->
|
2021-12-16 20:01:43 +01:00
|
|
|
<ui-dropdown-button label="Dark theme" v-if="ui.preferences.theme !== 'dark'" icon="fth-moon" @click="ui.setTheme('dark')" />
|
|
|
|
|
<ui-dropdown-button label="Light theme" v-else icon="fth-sun" @click="ui.setTheme('light')" />
|
2021-12-09 14:18:38 +01:00
|
|
|
<ui-dropdown-button label="Logout" icon="fth-log-out" @click="logout" />
|
|
|
|
|
</ui-dropdown>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { defineComponent } from 'vue';
|
|
|
|
|
import { useAccountStore } from '../account/store';
|
|
|
|
|
import { useUiStore } from '../ui/store';
|
2021-12-21 15:51:26 +01:00
|
|
|
import { useAppStore } from '../modules/applications/store';
|
2021-12-14 12:16:27 +01:00
|
|
|
import accountApi from '../account/api';
|
2021-12-09 14:18:38 +01:00
|
|
|
import EventHub from '../services/eventhub';
|
|
|
|
|
|
|
|
|
|
//const compactCacheKey = 'zero.navigation.compact';
|
|
|
|
|
const themeCacheKey = 'zero.theme';
|
|
|
|
|
|
|
|
|
|
export default defineComponent({
|
|
|
|
|
name: 'app-navigation',
|
|
|
|
|
|
|
|
|
|
data: () => ({
|
|
|
|
|
account: null,
|
|
|
|
|
ui: null,
|
2021-12-21 15:51:26 +01:00
|
|
|
appStore: null,
|
2021-12-09 14:18:38 +01:00
|
|
|
appId: null,
|
|
|
|
|
applications: [],
|
|
|
|
|
sections: [],
|
|
|
|
|
compact: false,
|
|
|
|
|
darkTheme: false,
|
|
|
|
|
currentApplication: null,
|
|
|
|
|
themeSwitchTimeout: null
|
|
|
|
|
}),
|
|
|
|
|
|
2021-12-21 15:51:26 +01:00
|
|
|
created()
|
2021-12-09 14:18:38 +01:00
|
|
|
{
|
|
|
|
|
this.ui = useUiStore();
|
|
|
|
|
this.account = useAccountStore();
|
2021-12-21 15:51:26 +01:00
|
|
|
this.appStore = useAppStore();
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mounted()
|
|
|
|
|
{
|
|
|
|
|
this.currentApplication = this.appStore.applications[0];
|
2021-12-09 14:18:38 +01:00
|
|
|
this.appId = this.currentApplication.id;
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
|
|
hasChildren(section)
|
|
|
|
|
{
|
|
|
|
|
return section.children && section.children.length > 0;
|
|
|
|
|
},
|
|
|
|
|
|
2022-01-11 13:18:03 +01:00
|
|
|
sectionDisabled(section)
|
|
|
|
|
{
|
2022-01-13 15:04:00 +01:00
|
|
|
return section.alias == 'dashboard';
|
2022-01-12 11:39:32 +01:00
|
|
|
//return section.alias == 'pages' || section.alias == 'spaces';
|
2022-01-11 13:18:03 +01:00
|
|
|
},
|
|
|
|
|
|
2021-12-09 14:18:38 +01:00
|
|
|
editUser(item, opts)
|
|
|
|
|
{
|
|
|
|
|
opts.hide();
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: 'users-edit',
|
|
|
|
|
params: { id: this.user.id }
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
changePassword(item, opts)
|
|
|
|
|
{
|
|
|
|
|
AuthApi.openPasswordOverlay();
|
|
|
|
|
opts.hide();
|
|
|
|
|
},
|
|
|
|
|
|
2021-12-14 12:16:27 +01:00
|
|
|
async logout(item, opts)
|
2021-12-09 14:18:38 +01:00
|
|
|
{
|
2021-12-14 12:16:27 +01:00
|
|
|
await accountApi.logout();
|
2021-12-09 14:18:38 +01:00
|
|
|
opts.hide();
|
2022-01-13 14:41:44 +01:00
|
|
|
this.zero.events.emit('zero.authenticate');
|
2021-12-09 14:18:38 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
addApplication(item, opts)
|
|
|
|
|
{
|
|
|
|
|
opts.hide();
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: 'applications-create'
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
manageApplications(item, opts)
|
|
|
|
|
{
|
|
|
|
|
opts.hide();
|
|
|
|
|
this.$router.push({
|
|
|
|
|
name: 'applications'
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
applicationChanged(item, opts)
|
|
|
|
|
{
|
|
|
|
|
//opts.loading(true);
|
|
|
|
|
|
2022-01-11 13:18:03 +01:00
|
|
|
//AuthApi.switchApp(item.id).then(success =>
|
|
|
|
|
//{
|
|
|
|
|
// //opts.loading(false);
|
|
|
|
|
// //opts.hide();
|
|
|
|
|
//});
|
2021-12-09 14:18:38 +01:00
|
|
|
},
|
|
|
|
|
|
|
|
|
|
toggleSidebar()
|
|
|
|
|
{
|
|
|
|
|
this.compact = !this.compact;
|
|
|
|
|
localStorage.setItem(compactCacheKey, this.compact.toString());
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
openSearch()
|
|
|
|
|
{
|
|
|
|
|
//EventHub.$emit('app.search.open');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
.app-nav-apps
|
|
|
|
|
{
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 100%;
|
|
|
|
|
top: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
width: 360px;
|
|
|
|
|
background: var(--color-bg-shade-3);
|
|
|
|
|
z-index: -1;
|
|
|
|
|
margin-left: 0;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
display: none; // TODO
|
|
|
|
|
|
|
|
|
|
.ui-header-bar
|
|
|
|
|
{
|
|
|
|
|
height: 92px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-app
|
|
|
|
|
{
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: auto minmax(auto, 1fr) auto;
|
|
|
|
|
grid-gap: var(--padding-s);
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin: 0 var(--padding-m);
|
|
|
|
|
padding: var(--padding-s) var(--padding-s);
|
|
|
|
|
border-radius: var(--radius);
|
|
|
|
|
|
|
|
|
|
&.is-active
|
|
|
|
|
{
|
|
|
|
|
background: var(--color-bg-shade-4);
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-app-icon
|
|
|
|
|
{
|
|
|
|
|
height: 32px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-app-selected
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav
|
|
|
|
|
{
|
|
|
|
|
position: relative;
|
|
|
|
|
background: var(--color-box);
|
|
|
|
|
width: 260px;
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
height: 100vh;
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-rows: auto auto 1fr auto;
|
|
|
|
|
box-shadow: var(--shadow-short);
|
|
|
|
|
margin-right: 1px;
|
|
|
|
|
z-index: 5;
|
|
|
|
|
|
|
|
|
|
.theme-rounded &
|
|
|
|
|
{
|
|
|
|
|
height: calc(100vh - 20px);
|
|
|
|
|
margin: 10px;
|
|
|
|
|
margin-right: 0;
|
|
|
|
|
border-radius: var(--radius);
|
|
|
|
|
box-shadow: var(--shadow-short);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.theme-dark
|
|
|
|
|
{
|
|
|
|
|
//background-image: radial-gradient(rgba(255,255,255,.1) 1px,transparent 0),radial-gradient(rgba(255,255,255,.1) 1px,transparent 0);
|
|
|
|
|
//background-size: 40px 40px;
|
|
|
|
|
//background-position: 0 0,20px 20px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-boxed
|
|
|
|
|
{
|
|
|
|
|
height: 90px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
padding: 0 var(--padding-xs) 0 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-inner
|
|
|
|
|
{
|
|
|
|
|
overflow-y: auto;
|
|
|
|
|
overflow-x: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-headline
|
|
|
|
|
{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: 0 var(--padding-m);
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
|
|
.theme-rounded &
|
|
|
|
|
{
|
|
|
|
|
margin: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
img
|
|
|
|
|
{
|
|
|
|
|
//height: 24px;
|
|
|
|
|
height: 15px;
|
|
|
|
|
//margin-top: 9px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-logo-circle
|
|
|
|
|
{
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: 22px;
|
|
|
|
|
height: 22px;
|
|
|
|
|
border-radius: 20px;
|
|
|
|
|
border: 4px solid var(--color-accent);
|
|
|
|
|
margin-right: 12px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-search
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-switch
|
|
|
|
|
{
|
|
|
|
|
margin-bottom: var(--padding-s);
|
|
|
|
|
//border-bottom: 1px solid var(--color-line-onbg);
|
|
|
|
|
background: var(--color-bg-shade-3);
|
|
|
|
|
//background: var(--color-accent);
|
|
|
|
|
|
|
|
|
|
.ui-button.type-light
|
|
|
|
|
{
|
|
|
|
|
padding: 0 24px;
|
|
|
|
|
height: 70px;
|
|
|
|
|
background: transparent;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
font-size: var(--font-size-m);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.ui-dropdown-button-icon
|
|
|
|
|
{
|
|
|
|
|
max-height: 20px;
|
|
|
|
|
max-width: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.is-fake
|
|
|
|
|
{
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
height: 0;
|
|
|
|
|
background: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a.app-nav-item, button.app-nav-item
|
|
|
|
|
{
|
|
|
|
|
display: grid;
|
|
|
|
|
grid-template-columns: 28px 1fr auto;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: var(--font-size);
|
|
|
|
|
padding: 0 var(--padding-m);
|
|
|
|
|
height: 50px;
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
& + .app-nav-item
|
|
|
|
|
{
|
|
|
|
|
margin-top: 1px;
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-11 13:18:03 +01:00
|
|
|
&[aria-disabled]
|
|
|
|
|
{
|
|
|
|
|
opacity: .7;
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-09 14:18:38 +01:00
|
|
|
&:hover
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
background: var(--color-tree-selected);
|
|
|
|
|
|
|
|
|
|
.app-nav-item-icon
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.is-active:not([alias="dashboard"]), &.is-active-exact
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
background: var(--color-tree-selected);
|
|
|
|
|
font-weight: 700;
|
2022-01-05 13:28:09 +01:00
|
|
|
//border-right: 3px solid var(--color-accent);
|
2021-12-09 14:18:38 +01:00
|
|
|
|
|
|
|
|
.app-nav-item-icon
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-item-arrow
|
|
|
|
|
{
|
|
|
|
|
transform: rotate(180deg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-item-text
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:before
|
|
|
|
|
{
|
|
|
|
|
content: '';
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
bottom: 0;
|
|
|
|
|
//width: 3px;
|
|
|
|
|
display: inline-block;
|
|
|
|
|
background: var(--color-tree-selected-line);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-item-text
|
|
|
|
|
{
|
|
|
|
|
transition: color 0.2s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-item-icon
|
|
|
|
|
{
|
|
|
|
|
font-size: 18px;
|
|
|
|
|
line-height: 1;
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
position: relative;
|
|
|
|
|
top: -1px;
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
transition: color 0.2s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-item-arrow
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text-dim);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-children
|
|
|
|
|
{
|
|
|
|
|
padding: 5px 0 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a.app-nav-child
|
|
|
|
|
{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: var(--font-size);
|
|
|
|
|
padding: 0 var(--padding) 0 calc(var(--padding) + 26px);
|
|
|
|
|
height: 36px;
|
|
|
|
|
color: var(--color-text-dim);
|
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
|
|
&:hover, &.is-active
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.is-active
|
|
|
|
|
{
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.is-active:before
|
|
|
|
|
{
|
|
|
|
|
content: '';
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: 4px;
|
|
|
|
|
height: 4px;
|
|
|
|
|
border-radius: 4px;
|
|
|
|
|
background: var(--color-accent);
|
|
|
|
|
position: absolute;
|
|
|
|
|
margin-left: -14px;
|
|
|
|
|
margin-top: -3px;
|
|
|
|
|
top: 50%;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-01-07 11:11:06 +01:00
|
|
|
.app-nav-child-count
|
|
|
|
|
{
|
|
|
|
|
display: inline-block;
|
|
|
|
|
font-size: 10px;
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
text-transform: uppercase;
|
|
|
|
|
background: var(--color-bg-shade-3);
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
height: 20px;
|
|
|
|
|
line-height: 20px;
|
|
|
|
|
padding: 0 8px;
|
|
|
|
|
border-radius: 16px;
|
|
|
|
|
letter-spacing: 0.5px;
|
|
|
|
|
font-style: normal;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
position: relative;
|
|
|
|
|
top: 1px;
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-09 14:18:38 +01:00
|
|
|
|
|
|
|
|
.app-nav-children-enter-active
|
|
|
|
|
{
|
|
|
|
|
transition: all .3s ease;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-children-leave-active
|
|
|
|
|
{
|
|
|
|
|
transition: all 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-children-enter, .app-nav-children-leave-to
|
|
|
|
|
{
|
|
|
|
|
transform: translateX(-10px);
|
|
|
|
|
opacity: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// account
|
|
|
|
|
|
|
|
|
|
.app-nav-account
|
|
|
|
|
{
|
|
|
|
|
border-top: 1px solid var(--color-line-onbg);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-account-button
|
|
|
|
|
{
|
|
|
|
|
display: grid;
|
|
|
|
|
width: 100%;
|
|
|
|
|
grid-template-columns: auto minmax(auto, 1fr) auto;
|
|
|
|
|
gap: 16px;
|
|
|
|
|
color: var(--color-text-dim);
|
|
|
|
|
align-items: center;
|
|
|
|
|
padding: var(--padding-m);
|
|
|
|
|
border-bottom-left-radius: var(--radius);
|
|
|
|
|
border-bottom-right-radius: var(--radius);
|
|
|
|
|
|
|
|
|
|
&:hover
|
|
|
|
|
{
|
|
|
|
|
background: var(--color-bg-shade-2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.-image
|
|
|
|
|
{
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
height: 32px;
|
|
|
|
|
width: 32px;
|
|
|
|
|
border-radius: 18px;
|
|
|
|
|
position: relative;
|
|
|
|
|
top: -1px;
|
|
|
|
|
background: var(--color-bg-shade-3);
|
|
|
|
|
text-align: center;
|
|
|
|
|
font-size: 16px;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.-text
|
|
|
|
|
{
|
|
|
|
|
font-weight: 400;
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
|
|
strong
|
|
|
|
|
{
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* COMPACT MODE */
|
|
|
|
|
|
|
|
|
|
.app-nav.is-compact
|
|
|
|
|
{
|
|
|
|
|
width: 82px;
|
|
|
|
|
|
|
|
|
|
.app-nav-headline
|
|
|
|
|
{
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
padding-left: 0;
|
|
|
|
|
padding-right: 0;
|
|
|
|
|
|
|
|
|
|
img
|
|
|
|
|
{
|
|
|
|
|
margin-left: 29px;
|
|
|
|
|
clip-path: circle(23.78% at 13px 14px);
|
|
|
|
|
min-width: 118px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-boxed
|
|
|
|
|
{
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-switch
|
|
|
|
|
{
|
|
|
|
|
visibility: hidden;
|
|
|
|
|
pointer-events: none;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
padding: 16px 0 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a.app-nav-item, button.app-nav-item
|
|
|
|
|
{
|
|
|
|
|
display: flex;
|
|
|
|
|
padding-left: var(--padding);
|
|
|
|
|
width: 100%;
|
|
|
|
|
//height: 60px;
|
|
|
|
|
|
|
|
|
|
&:hover + .app-nav-children
|
|
|
|
|
{
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&:before
|
|
|
|
|
{
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-item-text, .app-nav-item-arrow
|
|
|
|
|
{
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-children
|
|
|
|
|
{
|
|
|
|
|
display: none;
|
|
|
|
|
position: absolute;
|
|
|
|
|
z-index: 8;
|
|
|
|
|
min-width: 240px;
|
|
|
|
|
min-height: 20px;
|
|
|
|
|
background: var(--color-dropdown);
|
|
|
|
|
border-radius: var(--radius);
|
|
|
|
|
border-top-left-radius: 0;
|
|
|
|
|
border-bottom-left-radius: 0;
|
|
|
|
|
border: 1px solid var(--color-dropdown-border);
|
|
|
|
|
box-shadow: 6px 1px 8px rgba(0, 0, 0, 0.02);
|
|
|
|
|
padding: 5px;
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
margin-left: 82px;
|
|
|
|
|
margin-top: -55px;
|
|
|
|
|
|
|
|
|
|
&:hover
|
|
|
|
|
{
|
|
|
|
|
display: block;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a.app-nav-child
|
|
|
|
|
{
|
|
|
|
|
padding: 0 var(--padding);
|
|
|
|
|
display: grid;
|
|
|
|
|
width: 100%;
|
|
|
|
|
grid-template-columns: minmax(0, 1fr) auto;
|
|
|
|
|
gap: 6px;
|
|
|
|
|
align-items: center;
|
|
|
|
|
font-size: var(--font-size);
|
|
|
|
|
padding: 0 16px;
|
|
|
|
|
height: 48px;
|
|
|
|
|
color: var(--color-text-dim);
|
|
|
|
|
border-radius: var(--radius);
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
max-width: 100%;
|
|
|
|
|
|
|
|
|
|
&:not([disabled]):hover, &:focus
|
|
|
|
|
{
|
|
|
|
|
background: var(--color-dropdown-selected);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
&.is-active
|
|
|
|
|
{
|
|
|
|
|
color: var(--color-text);
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-account
|
|
|
|
|
{
|
|
|
|
|
padding: 0;
|
|
|
|
|
margin-bottom: var(--padding);
|
|
|
|
|
margin-left: 25px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.app-nav-account-button
|
|
|
|
|
{
|
|
|
|
|
display: block;
|
|
|
|
|
width: 32px;
|
|
|
|
|
|
|
|
|
|
.-text, .-arrow
|
|
|
|
|
{
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|