Browse Source

fix/added shared view layout

pull/3083/head
Muhammed Mustafa 2 years ago
parent
commit
287c145bb0
  1. 4
      packages/nc-gui-v2/components/shared-view/Grid.vue
  2. 37
      packages/nc-gui-v2/layouts/shared-view.vue
  3. 3
      packages/nc-gui-v2/pages/[projectType]/view/[viewId].vue

4
packages/nc-gui-v2/components/shared-view/Grid.vue

@ -18,9 +18,9 @@ useProvideSmartsheetStore(sharedView as Ref<TableType>, meta)
</script> </script>
<template> <template>
<div class="nc-container flex flex-col h-full mt-2 px-6"> <div class="nc-container flex flex-col h-full mt-4 px-6">
<SmartsheetToolbar /> <SmartsheetToolbar />
<SmartsheetGrid /> <SmartsheetGrid class="px-3" />
</div> </div>
</template> </template>

37
packages/nc-gui-v2/layouts/shared-view.vue

@ -0,0 +1,37 @@
<script lang="ts" setup>
import { navigateTo } from '#app'
</script>
<script lang="ts">
export default {
name: 'SharedView',
}
</script>
<template>
<a-layout id="nc-app">
<a-layout class="!flex-col">
<a-layout-header class="flex !bg-primary items-center text-white pl-3 pr-4 shadow-lg">
<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>
<div class="flex-1" />
</a-layout-header>
<div class="w-full overflow-hidden" style="height: calc(100% - var(--header-height))">
<slot />
</div>
</a-layout>
</a-layout>
</template>
<style lang="scss" scoped>
:deep(.ant-dropdown-menu-item-group-title) {
@apply border-b-1;
}
:deep(.ant-dropdown-menu-item-group-list) {
@apply m-0;
}
</style>

3
packages/nc-gui-v2/pages/[projectType]/view/[viewId].vue

@ -4,6 +4,7 @@ import { ReadonlyInj, ReloadViewDataHookInj } from '~/context'
import { useRoute } from '#imports' import { useRoute } from '#imports'
definePageMeta({ definePageMeta({
requiresAuth: false, requiresAuth: false,
layout: 'shared-view',
}) })
const route = useRoute() const route = useRoute()
@ -23,7 +24,7 @@ try {
</script> </script>
<template> <template>
<NuxtLayout id="content" class="flex"> <NuxtLayout id="content" class="flex" name="shared-view">
<div v-if="showPassword"> <div v-if="showPassword">
<SharedViewAskPassword v-model="showPassword" /> <SharedViewAskPassword v-model="showPassword" />
</div> </div>

Loading…
Cancel
Save