|
|
@ -6,7 +6,7 @@ import { computed, useBreakpoints, useGlobal, useProject, useRoute } from '#impo |
|
|
|
/** get current breakpoints (for enabling sidebar) */ |
|
|
|
/** get current breakpoints (for enabling sidebar) */ |
|
|
|
const breakpoints = useBreakpoints(breakpointsTailwind) |
|
|
|
const breakpoints = useBreakpoints(breakpointsTailwind) |
|
|
|
|
|
|
|
|
|
|
|
const { signOut, isLoading, user } = useGlobal() |
|
|
|
const { signOut, signedIn, isLoading, user } = useGlobal() |
|
|
|
|
|
|
|
|
|
|
|
const { project } = useProject() |
|
|
|
const { project } = useProject() |
|
|
|
|
|
|
|
|
|
|
@ -21,31 +21,62 @@ const logout = () => { |
|
|
|
</script> |
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<a-layout> |
|
|
|
<a-layout id="nc-app" has-sider> |
|
|
|
<slot name="sidebar" /> |
|
|
|
<div id="nc-sidebar-left" /> |
|
|
|
|
|
|
|
|
|
|
|
<a-layout class="!flex-col"> |
|
|
|
<a-layout class="!flex-col"> |
|
|
|
<a-layout-header class="flex !bg-primary items-center text-white !px-[1px] shadow-lg"> |
|
|
|
<a-layout-header class="flex !bg-primary items-center text-white pl-1 pr-4 shadow-lg"> |
|
|
|
<slot name="header-start" /> |
|
|
|
<div class="transition-all duration-200 p-2 cursor-pointer transform hover:scale-105" @click="navigateTo('/')"> |
|
|
|
|
|
|
|
<img width="35" alt="NocoDB" src="~/assets/img/icons/512x512-trans.png" /> |
|
|
|
<div id="header-start" class="w-[250px] flex items-center px-1 h-full" /> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="hidden flex justify-center"> |
|
|
|
<div class="flex justify-center"> |
|
|
|
<div v-show="isLoading" class="flex items-center gap-2 ml-3"> |
|
|
|
<div v-show="isLoading" class="flex items-center gap-2 ml-3"> |
|
|
|
{{ $t('general.loading') }} |
|
|
|
{{ $t('general.loading') }} |
|
|
|
|
|
|
|
|
|
|
|
<MdiReload :class="{ 'animate-infinite animate-spin': isLoading }" /> |
|
|
|
<MdiReload :class="{ 'animate-infinite animate-spin': isLoading }" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex-1" /> |
|
|
|
<div class="flex-1" /> |
|
|
|
|
|
|
|
|
|
|
|
<a-tooltip placement="right"> |
|
|
|
<a-tooltip placement="left"> |
|
|
|
<template #title> Switch language </template> |
|
|
|
<template #title> Switch language </template> |
|
|
|
|
|
|
|
|
|
|
|
<div class="flex pr-4 items-center"> |
|
|
|
<div class="flex pr-4 items-center"> |
|
|
|
<GeneralLanguage class="cursor-pointer text-2xl" /> |
|
|
|
<GeneralLanguage class="cursor-pointer text-2xl" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</a-tooltip> |
|
|
|
</a-tooltip> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template v-if="signedIn"> |
|
|
|
|
|
|
|
<a-dropdown :trigger="['click']"> |
|
|
|
|
|
|
|
<MdiDotsVertical class="md:text-xl cursor-pointer nc-user-menu" @click.prevent /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<template #overlay> |
|
|
|
|
|
|
|
<a-menu class="!py-0 nc-user-menu min-w-32 dark:(!bg-gray-800) leading-8 !rounded"> |
|
|
|
|
|
|
|
<a-menu-item key="0" class="!rounded-t"> |
|
|
|
|
|
|
|
<nuxt-link v-t="['c:navbar:user:email']" class="group flex items-center no-underline py-2" to="/user"> |
|
|
|
|
|
|
|
<MdiAt class="mt-1 group-hover:text-success" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="prose group-hover:text-black nc-user-menu-email">{{ email }}</span> |
|
|
|
|
|
|
|
</nuxt-link> |
|
|
|
|
|
|
|
</a-menu-item> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a-menu-divider class="!m-0" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a-menu-item key="1" class="!rounded-b"> |
|
|
|
|
|
|
|
<div v-t="['a:navbar:user:sign-out']" class="group flex items-center py-2" @click="signOut"> |
|
|
|
|
|
|
|
<MdiLogout class="dark:text-white group-hover:(!text-red-500)" /> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span class="prose font-semibold text-gray-500 group-hover:text-black nc-user-menu-signout"> |
|
|
|
|
|
|
|
{{ $t('general.signOut') }} |
|
|
|
|
|
|
|
</span> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</a-menu-item> |
|
|
|
|
|
|
|
</a-menu> |
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
</a-dropdown> |
|
|
|
|
|
|
|
</template> |
|
|
|
</a-layout-header> |
|
|
|
</a-layout-header> |
|
|
|
|
|
|
|
|
|
|
|
<div class="w-full h-full"> |
|
|
|
<div class="w-full h-full"> |
|
|
|