From 1b1311c3438547680e194beec0d9a8ef1b229d65 Mon Sep 17 00:00:00 2001 From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com> Date: Tue, 27 Jan 2026 11:47:15 +0000 Subject: [PATCH] fix: version deployments modal refactor --- .../components/dlg/ManagedApp/Index.vue | 9 +- .../dlg/ManagedApp/VersionDeployments.vue | 492 +++++++++++++ .../dlg/ManagedApp/VersionHistory.vue | 344 +++++++++ .../smartsheet/topbar/ManagedAppModal.vue | 654 ------------------ .../topbar/ManagedAppStatus/index.vue | 36 +- .../ManagedAppVersionDeploymentsModal.vue | 513 -------------- 6 files changed, 849 insertions(+), 1199 deletions(-) create mode 100644 packages/nc-gui/components/dlg/ManagedApp/VersionDeployments.vue create mode 100644 packages/nc-gui/components/dlg/ManagedApp/VersionHistory.vue delete mode 100644 packages/nc-gui/components/smartsheet/topbar/ManagedAppModal.vue delete mode 100644 packages/nc-gui/components/smartsheet/topbar/ManagedAppVersionDeploymentsModal.vue diff --git a/packages/nc-gui/components/dlg/ManagedApp/Index.vue b/packages/nc-gui/components/dlg/ManagedApp/Index.vue index cbaa578717..faf9542d3b 100644 --- a/packages/nc-gui/components/dlg/ManagedApp/Index.vue +++ b/packages/nc-gui/components/dlg/ManagedApp/Index.vue @@ -4,7 +4,7 @@ interface Props { modalSize: 'small' | 'medium' | 'large' | keyof typeof modalSizes title?: string subTitle?: string - variant?: 'draftOrPublish' + variant?: 'draftOrPublish' | 'versionHistory' contentClass?: string maskClosable?: boolean } @@ -33,10 +33,13 @@ const { modalSize, variant } = toRefs(props) + - - diff --git a/packages/nc-gui/components/dlg/ManagedApp/VersionHistory.vue b/packages/nc-gui/components/dlg/ManagedApp/VersionHistory.vue new file mode 100644 index 0000000000..b8a12eae12 --- /dev/null +++ b/packages/nc-gui/components/dlg/ManagedApp/VersionHistory.vue @@ -0,0 +1,344 @@ + + + + + diff --git a/packages/nc-gui/components/smartsheet/topbar/ManagedAppModal.vue b/packages/nc-gui/components/smartsheet/topbar/ManagedAppModal.vue deleted file mode 100644 index 86efb99fc2..0000000000 --- a/packages/nc-gui/components/smartsheet/topbar/ManagedAppModal.vue +++ /dev/null @@ -1,654 +0,0 @@ - - - - - - - diff --git a/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue b/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue index a8a9012194..6c9d223036 100644 --- a/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue +++ b/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue @@ -10,16 +10,16 @@ const { base, isManagedAppMaster, isManagedAppInstaller, managedApp, currentVers const isModalVisible = ref(false) -const initialTab = ref<'publish' | 'fork' | 'deployments' | undefined>(undefined) +const modalVariant = ref<'draftOrPublish' | 'versionHistory' | undefined>(undefined) const isOpenDropdown = ref(false) const isDraft = computed(() => managedAppVersionsInfo.value.current?.status === 'draft') -const openModal = (tab?: 'publish' | 'fork' | 'deployments') => { +const openModal = (variant?: 'draftOrPublish' | 'versionHistory') => { isOpenDropdown.value = false - initialTab.value = tab + modalVariant.value = variant nextTick(() => { isModalVisible.value = true @@ -31,14 +31,6 @@ const loadManagedAppAndCurrentVersion = async () => { await loadCurrentVersion() } -const handlePublished = async () => { - await loadManagedAppAndCurrentVersion() -} - -const handleForked = async () => { - await loadManagedAppAndCurrentVersion() -} - watch( () => (base.value as any)?.managed_app_id, async (managedAppId) => { @@ -158,7 +150,7 @@ const badgeConfig = computed(() => { managedAppVersionsInfo.published.version || '1.0.0', )} to make changes`" icon-wrapper-class="bg-nc-bg-gray-light dakr:bg-nc-bg-gray-light/75" - @click="openModal('fork')" + @click="openModal('draftOrPublish')" >