Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: update version history and deployment cards

Ramesh Maned8cb64b87b1e
diff --git a/packages/nc-gui/components/dlg/ManagedApp/Header.vue b/packages/nc-gui/components/dlg/ManagedApp/Header.vue
index a55de64a1b..3c14a7cf11 100644
--- a/packages/nc-gui/components/dlg/ManagedApp/Header.vue
+++ b/packages/nc-gui/components/dlg/ManagedApp/Header.vue
@@ -29,7 +29,7 @@ const vVisible = useVModel(props, 'visible', emits)
</slot>
</div>
<div class="flex-1">
- <div class="font-semibold text-lg text-nc-content-gray-emphasis" :class="titleClass">
+ <div class="font-semibold text-lg text-nc-content-gray" :class="titleClass">
<slot name="title">
{{ title }}
</slot>
diff --git a/packages/nc-gui/components/dlg/ManagedApp/VersionDeployments.vue b/packages/nc-gui/components/dlg/ManagedApp/VersionDeployments.vue
index 4230911b83..5fe131618d 100644
--- a/packages/nc-gui/components/dlg/ManagedApp/VersionDeployments.vue
+++ b/packages/nc-gui/components/dlg/ManagedApp/VersionDeployments.vue
@@ -112,11 +112,12 @@ const getDeploymentTypeLabel = (type: string) => {
const getStatusColor = (status: string) => {
const colors = {
- [DeploymentStatus.SUCCESS]: 'text-nc-content-green-dark bg-nc-bg-green-light',
- [DeploymentStatus.FAILED]: 'text-nc-content-red-dark bg-nc-bg-red-light',
- [DeploymentStatus.PENDING]: 'text-nc-content-orange-dark bg-nc-bg-orange-light',
- [DeploymentStatus.IN_PROGRESS]: 'text-nc-content-blue-dark bg-nc-bg-blue-light',
+ [DeploymentStatus.SUCCESS]: 'text-green-600 bg-nc-green-50 dark:bg-nc-green-20',
+ [DeploymentStatus.FAILED]: 'text-red-600 bg-nc-red-50 dark:bg-nc-red-20',
+ [DeploymentStatus.PENDING]: 'text-orange-600 bg-nc-orange-20 dark:bg-nc-orange-20',
+ [DeploymentStatus.IN_PROGRESS]: 'text-blue-600 bg-nc-blue-50 dark:bg-nc-blue-20',
}
+
return colors[status as keyof typeof colors] || 'text-nc-content-gray bg-nc-bg-gray-light'
}
@@ -239,10 +240,10 @@ watch(
</div>
<span class="font-mono font-semibold text-nc-content-brand">v{{ log.toVersion?.version }}</span>
</div>
- <span class="nc-log-divider">β€’</span>
+ <span class="nc-log-divider flex-1"></span>
<div class="nc-log-time">
<GeneralIcon icon="ncClock" class="w-3.5 h-3.5 opacity-60" />
- <span>{{ formatDate(log.createdAt) }}</span>
+ <span>{{ timeAgo(log.createdAt) }}</span>
</div>
</div>
@@ -363,7 +364,7 @@ watch(
}
.nc-deployment-title {
- @apply font-semibold text-sm text-nc-content-gray-emphasis truncate mb-1;
+ @apply font-semibold text-sm text-nc-content-gray truncate mb-1;
}
.nc-deployment-date {
@@ -387,7 +388,7 @@ watch(
}
.nc-logs-header {
- @apply flex items-center gap-2 text-xs font-semibold text-nc-content-gray-emphasis mb-3;
+ @apply flex items-center gap-2 text-xs font-semibold text-nc-content-gray mb-3;
@apply uppercase tracking-wide;
}
@@ -426,7 +427,7 @@ watch(
.nc-log-type {
@apply inline-flex items-center gap-1 px-2 py-0.5 rounded;
- @apply bg-nc-bg-gray-light text-nc-content-gray text-xs font-medium;
+ @apply bg-nc-bg-gray-light dark:bg-nc-bg-gray-extralight text-nc-content-gray-subtle2 text-xs font-medium;
}
.nc-log-meta {
diff --git a/packages/nc-gui/components/dlg/ManagedApp/VersionHistory.vue b/packages/nc-gui/components/dlg/ManagedApp/VersionHistory.vue
index b8a12eae12..070cd1a7d7 100644
--- a/packages/nc-gui/components/dlg/ManagedApp/VersionHistory.vue
+++ b/packages/nc-gui/components/dlg/ManagedApp/VersionHistory.vue
@@ -13,7 +13,7 @@ const { $api } = useNuxtApp()
const baseStore = useBase()
-const { base, managedApp } = storeToRefs(baseStore)
+const { base, managedApp, managedAppVersionsInfo } = storeToRefs(baseStore)
const isLoadingDeployments = ref(true)
@@ -115,7 +115,8 @@ watch(
<div v-if="deploymentStats.versionStats && deploymentStats.versionStats.length > 0" class="nc-version-list-wrapper">
<div class="nc-version-list-header">
<div>
- <h3 class="text-sm font-semibold text-nc-content-gray-emphasis">Version History</h3>
+ <h3 class="text-sm font-semibold text-nc-content-gray">Version History</h3>
+
<p class="text-xs text-nc-content-gray-subtle2 mt-0.5 mb-0">
{{ deploymentStats.versionStats.length }}
{{ deploymentStats.versionStats.length === 1 ? 'version' : 'versions' }}
@@ -139,12 +140,21 @@ watch(
<div class="nc-version-details">
<div class="nc-version-title">
<span class="nc-version-number">v{{ versionStat.version }}</span>
- <div v-if="index === 0 && versionStat.status === 'published'" class="nc-version-badge">
- <GeneralIcon icon="check" class="w-3 h-3" />
- <span>Current</span>
+ <div v-if="managedAppVersionsInfo.published?.id === versionStat.versionId" class="nc-version-badge">
+ {{ $t('labels.live') }}
+ </div>
+ <div
+ v-else-if="managedAppVersionsInfo.current?.id === versionStat.versionId && versionStat.status === 'draft'"
+ class="nc-version-badge nc-version-badge-draft"
+ >
+ {{ $t('labels.draft') }}
</div>
</div>
- <div class="nc-version-date">Published {{ formatDate(versionStat.publishedAt) }}</div>
+ <div class="nc-version-date">
+ <GeneralIcon icon="calendar" class="w-3.5 h-3.5 opacity-60" />
+
+ <span>Published {{ formatDate(versionStat.publishedAt) }}</span>
+ </div>
</div>
</div>
@@ -152,14 +162,11 @@ watch(
<div class="nc-installs-count">
<GeneralIcon icon="download" class="w-4 h-4 text-nc-content-gray-subtle2" />
<span class="font-bold">{{ versionStat.deploymentCount }}</span>
- <span class="text-nc-content-gray-muted">{{
- versionStat.deploymentCount === 1 ? 'install' : 'installs'
- }}</span>
</div>
<GeneralIcon
v-if="versionStat.deploymentCount > 0"
icon="chevronRight"
- class="w-4 h-4 text-nc-content-gray-subtle2 nc-chevron-icon"
+ class="w-4 h-4 text-nc-content-gray-subtle2"
/>
</div>
</div>
@@ -194,7 +201,7 @@ watch(
</div>
</div>
- <DlgManagedApp v-model:visible="showVersionDeploymentsModal" modal-size="md">
+ <DlgManagedApp v-model:visible="showVersionDeploymentsModal" modal-size="sm">
<DlgManagedAppVersionDeployments v-model:visible="showVersionDeploymentsModal" :version="selectedVersion" />
</DlgManagedApp>
</div>
@@ -302,17 +309,23 @@ watch(
}
.nc-version-number {
- @apply font-mono font-bold text-base text-nc-content-gray-emphasis;
+ @apply font-mono font-bold text-base text-nc-content-gray;
}
.nc-version-badge {
- @apply inline-flex items-center gap-1 px-2 py-0.5 rounded-full;
- @apply bg-nc-bg-green-light text-nc-content-green-dark;
- @apply text-xs font-semibold;
+ @apply inline-flex items-center gap-1 px-2 py-0.5 rounded-full text-xs font-semibold;
+
+ &.nc-version-badge-draft {
+ @apply bg-nc-orange-20 dark:bg-nc-orange-20 text-orange-600;
+ }
+
+ &:not(.nc-version-badge-draft) {
+ @apply bg-nc-green-50 dark:bg-nc-green-20 text-green-600;
+ }
}
.nc-version-date {
- @apply text-xs text-nc-content-gray-subtle2;
+ @apply text-xs text-nc-content-gray-subtle2 flex items-center gap-1.5;
}
.nc-version-installs {
diff --git a/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue b/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue
index 44955660f9..14f5902950 100644
--- a/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue
+++ b/packages/nc-gui/components/smartsheet/topbar/ManagedAppStatus/index.vue
@@ -50,7 +50,7 @@ const colors = {
orange: {
bg: 'bg-nc-orange-20 dark:bg-nc-orange-20',
border: 'border-nc-orange-200 dark:border-orange-600/40',
- text: 'text-orange-600 text-orange-600',
+ text: 'text-orange-600',
},
brand: {
bg: 'bg-nc-brand-50 dark:bg-nc-brand-20/40',
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json
index 74014d9cd8..30be3eb899 100644
--- a/packages/nc-gui/lang/en.json
+++ b/packages/nc-gui/lang/en.json
@@ -1185,6 +1185,7 @@
"updateDetails": "Update Details",
"published": "Published",
"draft": "Draft",
+ "live": "Live",
"upToDate": "Up to date",
"updateAvailable": "Update available",
"managedAppTitle": "Title",