Browse Source

refactor(gui-v2): move account menu item to end

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/3242/head
Pranav C 2 years ago
parent
commit
d089e7cca3
  1. 68
      packages/nc-gui-v2/pages/[projectType]/[projectId]/index.vue

68
packages/nc-gui-v2/pages/[projectType]/[projectId]/index.vue

@ -238,12 +238,12 @@ definePageMeta({
<a-menu-divider /> <a-menu-divider />
<template v-if="signedIn && !isSharedBase"> <a-sub-menu v-if="isUIAllowed('previewAs')" key="preview-as" v-t="['c:navdraw:preview-as']">
<a-sub-menu v-if="isUIAllowed('previewAs')" key="account">
<template #title> <template #title>
<div class="nc-project-menu-item group"> <div class="nc-project-menu-item group">
<MdiAccount class="group-hover:text-pink-500 nc-project-preview" /> <MdiFileEyeOutline class="group-hover:text-pink-500 nc-project-preview" />
Account Preview Project As
<div class="flex-1" /> <div class="flex-1" />
<MaterialSymbolsChevronRightRounded <MaterialSymbolsChevronRightRounded
@ -254,34 +254,14 @@ definePageMeta({
<template #expandIcon></template> <template #expandIcon></template>
<a-menu class="!py-0 dark:(!bg-gray-800) leading-8 !rounded"> <GeneralPreviewAs />
<a-menu-item key="0" class="!rounded-t">
<nuxt-link v-t="['c:navbar:user:email']" class="nc-project-menu-item group no-underline" to="/user">
<MdiAt class="mt-1 group-hover:text-pink-500" />&nbsp;
<span class="prose">{{ email }}</span>
</nuxt-link>
</a-menu-item>
<a-menu-item key="1" class="!rounded-b">
<div v-t="['a:navbar:user:sign-out']" class="nc-project-menu-item group" @click="logout">
<MdiLogout class="group-hover:(!text-pink-500)" />&nbsp;
<span class="prose">
{{ $t('general.signOut') }}
</span>
</div>
</a-menu-item>
</a-menu>
</a-sub-menu> </a-sub-menu>
</template>
<a-sub-menu v-if="isUIAllowed('previewAs')" key="preview-as" v-t="['c:navdraw:preview-as']"> <a-sub-menu v-if="isUIAllowed('previewAs')" key="language">
<template #title> <template #title>
<div class="nc-project-menu-item group"> <div class="nc-project-menu-item group">
<MdiFileEyeOutline class="group-hover:text-pink-500 nc-project-preview" /> <MaterialSymbolsTranslate class="group-hover:text-pink-500 nc-language" />
Preview Project As Language
<div class="flex-1" /> <div class="flex-1" />
<MaterialSymbolsChevronRightRounded <MaterialSymbolsChevronRightRounded
@ -291,15 +271,15 @@ definePageMeta({
</template> </template>
<template #expandIcon></template> <template #expandIcon></template>
<GeneralLanguage sub-menu />
<GeneralPreviewAs />
</a-sub-menu> </a-sub-menu>
<a-sub-menu v-if="isUIAllowed('previewAs')" key="language"> <template v-if="signedIn && !isSharedBase">
<a-sub-menu v-if="isUIAllowed('previewAs')" key="account">
<template #title> <template #title>
<div class="nc-project-menu-item group"> <div class="nc-project-menu-item group">
<MaterialSymbolsTranslate class="group-hover:text-pink-500 nc-language" /> <MdiAccount class="group-hover:text-pink-500 nc-project-preview" />
Language Account
<div class="flex-1" /> <div class="flex-1" />
<MaterialSymbolsChevronRightRounded <MaterialSymbolsChevronRightRounded
@ -309,8 +289,28 @@ definePageMeta({
</template> </template>
<template #expandIcon></template> <template #expandIcon></template>
<GeneralLanguage sub-menu />
<a-menu class="!py-0 dark:(!bg-gray-800) leading-8 !rounded">
<a-menu-item key="0" class="!rounded-t">
<nuxt-link v-t="['c:navbar:user:email']" class="nc-project-menu-item group no-underline" to="/user">
<MdiAt class="mt-1 group-hover:text-pink-500" />&nbsp;
<span class="prose">{{ email }}</span>
</nuxt-link>
</a-menu-item>
<a-menu-item key="1" class="!rounded-b">
<div v-t="['a:navbar:user:sign-out']" class="nc-project-menu-item group" @click="logout">
<MdiLogout class="group-hover:(!text-pink-500)" />&nbsp;
<span class="prose">
{{ $t('general.signOut') }}
</span>
</div>
</a-menu-item>
</a-menu>
</a-sub-menu> </a-sub-menu>
</template>
</a-menu-item-group> </a-menu-item-group>
</a-menu> </a-menu>
</template> </template>

Loading…
Cancel
Save