Browse Source

chore(gui-v2): remove transition from header

pull/3252/head
braks 2 years ago
parent
commit
cabb3e9d06
  1. 114
      packages/nc-gui-v2/layouts/base.vue
  2. 10
      packages/nc-gui-v2/layouts/default.vue

114
packages/nc-gui-v2/layouts/base.vue

@ -21,74 +21,70 @@ const logout = () => {
<div id="nc-sidebar-left" /> <div id="nc-sidebar-left" />
<a-layout class="!flex-col"> <a-layout class="!flex-col">
<Transition name="layout"> <a-layout-header
<a-layout-header v-if="!route.meta.public && signedIn && !route.meta.hideHeader"
v-if="!route.meta.public && signedIn && !route.meta.hideHeader" class="flex !bg-primary items-center text-white pl-4 pr-5 shadow-lg"
class="flex !bg-primary items-center text-white pl-4 pr-5 shadow-lg" >
<div
v-if="route.name === 'index' || route.name === 'project-index-create' || route.name === 'project-index-create-external'"
class="transition-all duration-200 p-2 cursor-pointer transform hover:scale-105 nc-noco-brand-icon"
@click="navigateTo('/')"
> >
<div <img width="35" alt="NocoDB" src="~/assets/img/icons/512x512-trans.png" />
v-if=" </div>
route.name === 'index' || route.name === 'project-index-create' || route.name === 'project-index-create-external'
"
class="transition-all duration-200 p-2 cursor-pointer transform hover:scale-105 nc-noco-brand-icon"
@click="navigateTo('/')"
>
<img width="35" alt="NocoDB" src="~/assets/img/icons/512x512-trans.png" />
</div>
<div class="!text-white flex justify-center"> <div class="!text-white 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" />
<GeneralReleaseInfo />
<GeneralShareBaseButton v-if="!isSharedBase" />
<a-tooltip placement="bottom" :mouse-enter-delay="1">
<template #title> Switch language</template>
<div class="flex pr-4 items-center text-white"> <GeneralReleaseInfo />
<GeneralLanguage class="cursor-pointer text-2xl hover:text-accent" />
</div>
</a-tooltip>
<template v-if="signedIn && !isSharedBase"> <GeneralShareBaseButton v-if="!isSharedBase" />
<a-dropdown :trigger="['click']">
<MdiDotsVertical class="md:text-xl cursor-pointer hover:text-accent nc-menu-accounts text-white" @click.prevent />
<template #overlay> <a-tooltip placement="bottom" :mouse-enter-delay="1">
<a-menu class="!py-0 leading-8 !rounded"> <template #title> Switch language</template>
<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-accent" />&nbsp;
<span class="prose group-hover:text-primary"> {{ email }}</span> <div class="flex pr-4 items-center text-white">
</nuxt-link> <GeneralLanguage class="cursor-pointer text-2xl hover:text-accent" />
</a-menu-item> </div>
</a-tooltip>
<a-menu-divider class="!m-0" />
<template v-if="signedIn && !isSharedBase">
<a-menu-item key="1" class="!rounded-b group"> <a-dropdown :trigger="['click']">
<div v-t="['a:navbar:user:sign-out']" class="nc-project-menu-item group" @click="logout"> <MdiDotsVertical class="md:text-xl cursor-pointer hover:text-accent nc-menu-accounts text-white" @click.prevent />
<MdiLogout class="group-hover:text-accent" />&nbsp;
<template #overlay>
<span class="prose group-hover:text-primary"> <a-menu class="!py-0 leading-8 !rounded">
{{ $t('general.signOut') }} <a-menu-item key="0" class="!rounded-t">
</span> <nuxt-link v-t="['c:navbar:user:email']" class="nc-project-menu-item group !no-underline" to="/user">
</div> <MdiAt class="mt-1 group-hover:text-accent" />&nbsp;
</a-menu-item>
</a-menu> <span class="prose group-hover:text-primary"> {{ email }}</span>
</template> </nuxt-link>
</a-dropdown> </a-menu-item>
</template>
</a-layout-header> <a-menu-divider class="!m-0" />
</Transition>
<a-menu-item key="1" class="!rounded-b group">
<div v-t="['a:navbar:user:sign-out']" class="nc-project-menu-item group" @click="logout">
<MdiLogout class="group-hover:text-accent" />&nbsp;
<span class="prose group-hover:text-primary">
{{ $t('general.signOut') }}
</span>
</div>
</a-menu-item>
</a-menu>
</template>
</a-dropdown>
</template>
</a-layout-header>
<a-tooltip placement="bottom"> <a-tooltip placement="bottom">
<template #title> Switch language</template> <template #title> Switch language</template>

10
packages/nc-gui-v2/layouts/default.vue

@ -13,15 +13,17 @@ useHead({
<script lang="ts"> <script lang="ts">
export default { export default {
name: 'Default', name: 'DefaultLayout',
} }
</script> </script>
<template> <template>
<div class="w-full h-full"> <div class="w-full h-full">
<teleport v-if="$slots.sidebar" to="#nc-sidebar-left"> <Transition duration="5000" name="page">
<slot name="sidebar" /> <Teleport to="#nc-sidebar-left">
</teleport> <slot name="sidebar" />
</Teleport>
</Transition>
<a-layout-content> <a-layout-content>
<slot /> <slot />

Loading…
Cancel
Save