Browse Source

fix: missing scrollbar in shared view

closes #6276

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/6400/head
Pranav C 10 months ago
parent
commit
74dd4a5aec
  1. 2
      packages/nc-gui/layouts/shared-view.vue
  2. 11
      packages/nc-gui/pages/index.vue
  3. 2
      packages/nc-gui/pages/index/[typeOrId].vue
  4. 2
      packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index.vue

2
packages/nc-gui/layouts/shared-view.vue

@ -79,7 +79,7 @@ export default {
<div class="flex-1" />
</a-layout-header>
<div class="w-full overflow-hidden" style="height: calc(100vh)">
<div class="w-full overflow-hidden" style="height: calc(100vh - var(--topbar-height))">
<slot />
</div>
</a-layout>

11
packages/nc-gui/pages/index.vue

@ -40,6 +40,12 @@ const isSharedView = computed(() => {
return !routeName.startsWith('index-typeOrId-projectId-') && !['index', 'index-typeOrId'].includes(routeName)
})
const isSharedFormView = computed(() => {
const routeName = (route.value.name as string) || ''
// check route is shared form view route
return routeName.startsWith('index-typeOrId-form-viewId')
})
async function handleRouteTypeIdChange() {
// avoid loading projects for shared views
if (isSharedView.value) {
@ -91,7 +97,10 @@ provide(ToggleDialogInj, toggleDialog)
<template>
<div>
<NuxtLayout v-if="isSharedView" name="shared-view">
<NuxtLayout v-if="isSharedFormView">
<NuxtPage />
</NuxtLayout>
<NuxtLayout v-else-if="isSharedView" name="shared-view">
<NuxtPage />
</NuxtLayout>
<NuxtLayout v-else name="dashboard">

2
packages/nc-gui/pages/index/[typeOrId].vue

@ -5,7 +5,7 @@ const route = router.currentRoute
</script>
<template>
<div>
<div class="h-full">
<NuxtPage :transition="false" :page-key="route.params.typeOrId" />
</div>
</template>

2
packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index.vue

@ -38,7 +38,7 @@ router.afterEach((to) => shouldRedirect(to.name as string))
<template>
<div
class="scrollbar-thin-dull overflow-y-auto overflow-x-hidden flex flex-col color-transition nc-form-view relative bg-primary bg-opacity-10 dark:(bg-slate-900) h-[100vh] min-h-[600px]"
class="scrollbar-thin-dull overflow-y-auto overflow-x-hidden flex flex-col color-transition nc-form-view relative bg-primary bg-opacity-10 dark:(bg-slate-900) h-[100vh] min-h-[600px] py-4"
>
<NuxtPage />

Loading…
Cancel
Save