From 40bf26a0f3bbd7264c0a2b8b2ceeedb535bf85f6 Mon Sep 17 00:00:00 2001 From: Arman Date: Mon, 25 Nov 2024 11:27:59 +0100 Subject: [PATCH] fix: ghost column on selfhosted --- .../project-[project]/databases/store.ts | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/routes/(console)/project-[project]/databases/store.ts b/src/routes/(console)/project-[project]/databases/store.ts index b07f880c1..a931b52c6 100644 --- a/src/routes/(console)/project-[project]/databases/store.ts +++ b/src/routes/(console)/project-[project]/databases/store.ts @@ -2,10 +2,19 @@ import type { Column } from '$lib/helpers/types'; import { isCloud } from '$lib/system'; import { writable } from 'svelte/store'; -export const columns = writable([ - { id: '$id', title: 'Database ID', type: 'string', show: true, width: 150 }, - { id: 'name', title: 'Name', type: 'string', show: true, width: 120 }, - isCloud && { id: 'backup', title: 'Backups', type: 'string', show: true, width: 120 }, - { id: '$createdAt', title: 'Created', type: 'datetime', show: true, width: 120 }, - { id: '$updatedAt', title: 'Updated', type: 'datetime', show: true, width: 120 } -]); +export const columns = writable( + isCloud + ? [ + { id: '$id', title: 'Database ID', type: 'string', show: true, width: 150 }, + { id: 'name', title: 'Name', type: 'string', show: true, width: 120 }, + { id: 'backup', title: 'Backups', type: 'string', show: true, width: 120 }, + { id: '$createdAt', title: 'Created', type: 'datetime', show: true, width: 120 }, + { id: '$updatedAt', title: 'Updated', type: 'datetime', show: true, width: 120 } + ] + : [ + { id: '$id', title: 'Database ID', type: 'string', show: true, width: 150 }, + { id: 'name', title: 'Name', type: 'string', show: true, width: 120 }, + { id: '$createdAt', title: 'Created', type: 'datetime', show: true, width: 120 }, + { id: '$updatedAt', title: 'Updated', type: 'datetime', show: true, width: 120 } + ] +);