From 40aeec53a47940ba4559ff4cc505aa9473441e7f Mon Sep 17 00:00:00 2001 From: Pranav C Date: Wed, 31 May 2023 12:05:35 +0530 Subject: [PATCH] fix: disable expand form in public shared gallery Signed-off-by: Pranav C --- packages/nc-gui/components/smartsheet/Gallery.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/nc-gui/components/smartsheet/Gallery.vue b/packages/nc-gui/components/smartsheet/Gallery.vue index f4f4a160f4..4f94e91973 100644 --- a/packages/nc-gui/components/smartsheet/Gallery.vue +++ b/packages/nc-gui/components/smartsheet/Gallery.vue @@ -7,6 +7,7 @@ import { IsFormInj, IsGalleryInj, IsGridInj, + IsPublicInj, MetaInj, NavigateDir, OpenNewRecordFormHookInj, @@ -62,6 +63,8 @@ provide(IsGridInj, ref(false)) provide(PaginationDataInj, paginationData) provide(ChangePageInj, changePage) +const isPublic = inject(IsPublicInj, ref(false)) + const fields = inject(FieldsInj, ref([])) const route = useRoute() @@ -125,6 +128,10 @@ const attachments = (record: any): Attachment[] => { } const expandForm = (row: RowType, state?: Record) => { + if (isPublic.value) { + return + } + const rowId = extractPkFromRow(row.row, meta.value!.columns!) if (rowId) {