PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
FIX (backups): Fix light theme for banner
Rostislav Dugin3a5a53c92da0
diff --git a/frontend/src/features/backups/ui/BackupsBillingBannerComponent.tsx b/frontend/src/features/backups/ui/BackupsBillingBannerComponent.tsxindex 203517d9..8c91290b 100644--- a/frontend/src/features/backups/ui/BackupsBillingBannerComponent.tsx+++ b/frontend/src/features/backups/ui/BackupsBillingBannerComponent.tsx@@ -48,16 +48,16 @@ export const BackupsBillingBannerComponent = ({className={`mt-3 rounded-lg px-4 py-3 text-sm ${subscription.status === SubscriptionStatus.Canceled ||subscription.status === SubscriptionStatus.Expired- ? 'border border-red-600/30 bg-red-900/20'- : 'border border-yellow-600/30 bg-yellow-900/20'- }`}+ ? 'border border-red-300/50 bg-red-50 dark:border-red-600/30 dark:bg-red-900/20'+ : 'border border-yellow-300/50 bg-yellow-50 dark:border-yellow-600/30 dark:bg-yellow-900/20'+ } max-w-[500px]`}><pclassName={subscription.status === SubscriptionStatus.Canceled ||subscription.status === SubscriptionStatus.Expired- ? 'text-red-400'- : 'text-yellow-400'+ ? 'text-red-700 dark:text-red-400'+ : 'text-yellow-700 dark:text-yellow-400'}>{subscription.status === SubscriptionStatus.Trial && (diff --git a/frontend/src/features/billing/models/purchaseUtils.ts b/frontend/src/features/billing/models/purchaseUtils.tsindex cdcc8d8f..fa4f7922 100644--- a/frontend/src/features/billing/models/purchaseUtils.ts+++ b/frontend/src/features/billing/models/purchaseUtils.ts@@ -59,7 +59,7 @@ function formatSize(gb: number): string {function sliderBackground(pos: number, max: number): React.CSSProperties {const pct = (pos / max) * 100;return {- background: `linear-gradient(to right, #155dfc ${pct}%, #1f2937 ${pct}%)`,+ background: `linear-gradient(to right, #155dfc ${pct}%, var(--slider-track) ${pct}%)`,};}diff --git a/frontend/src/features/billing/ui/BackupRetentionSection.tsx b/frontend/src/features/billing/ui/BackupRetentionSection.tsxindex 0f78f29d..a97d24e4 100644--- a/frontend/src/features/billing/ui/BackupRetentionSection.tsx+++ b/frontend/src/features/billing/ui/BackupRetentionSection.tsx@@ -14,18 +14,18 @@ export function BackupRetentionSection({ backupsFit, gfs }: Props) {return (<div><div className="space-y-1.5">- <div className="rounded-lg border border-[#ffffff20] bg-[#1f2937]/50 px-3 py-2 text-center">+ <div className="rounded-lg border border-gray-200 bg-gray-100 px-3 py-2 text-center dark:border-gray-700 dark:bg-gray-800/50"><p className="text-gray-500">Total backups</p>- <p className="text-lg font-bold text-gray-200">{backupsFit}</p>+ <p className="text-lg font-bold text-gray-900 dark:text-gray-200">{backupsFit}</p></div><div className="my-1 flex items-center gap-3">- <div className="h-px flex-1 bg-[#ffffff20]" />+ <div className="h-px flex-1 bg-gray-200 dark:bg-gray-700" /><span className="text-sm text-gray-500">or</span>- <div className="h-px flex-1 bg-[#ffffff20]" />+ <div className="h-px flex-1 bg-gray-200 dark:bg-gray-700" /></div>- <p className="mb-2 text-sm text-gray-400">+ <p className="mb-2 text-sm text-gray-500 dark:text-gray-400">Keeps recent backups frequently, older ones less often — broad time at the lowest cost. Itis enough to keep the following amount of backups in GFS:</p>@@ -41,16 +41,16 @@ export function BackupRetentionSection({ backupsFit, gfs }: Props) {).map(([label, value]) => (<divkey={label}- className="rounded-lg border border-[#ffffff20] bg-[#1f2937]/50 px-2 py-1.5 text-center"+ className="rounded-lg border border-gray-200 bg-gray-100 px-2 py-1.5 text-center dark:border-gray-700 dark:bg-gray-800/50"><p className="text-xs text-gray-500">{label}</p>- <p className="text-base font-bold text-gray-200">{value}</p>+ <p className="text-base font-bold text-gray-900 dark:text-gray-200">{value}</p></div>))}</div></div>- <p className="mt-2 text-sm text-gray-400">+ <p className="mt-2 text-sm text-gray-500 dark:text-gray-400">You can fine-tune retention values (change daily count, keep only monthly, keep N latest,etc.)</p>diff --git a/frontend/src/features/billing/ui/DbSizeCommands.tsx b/frontend/src/features/billing/ui/DbSizeCommands.tsxindex 01e5b786..7a04a4ca 100644--- a/frontend/src/features/billing/ui/DbSizeCommands.tsx+++ b/frontend/src/features/billing/ui/DbSizeCommands.tsx@@ -14,7 +14,7 @@ export function DbSizeCommands({ commands }: Props) {return (<details className="group mb-2">- <summary className="flex cursor-pointer list-none items-center gap-1.5 text-gray-500 transition-colors hover:text-gray-400">+ <summary className="flex cursor-pointer list-none items-center gap-1.5 text-gray-500 transition-colors hover:text-gray-600 dark:hover:text-gray-400"><svgwidth="12"height="12"@@ -34,10 +34,12 @@ export function DbSizeCommands({ commands }: Props) {<div className="mt-2 space-y-1.5">{commands.map((cmd, index) => (<div key={index}>- <p className="mb-1 text-xs text-gray-400">{cmd.label}</p>+ <p className="mb-1 text-xs text-gray-500 dark:text-gray-400">{cmd.label}</p><div className="relative">- <pre className="overflow-x-auto rounded-lg border border-[#ffffff20] bg-[#1f2937] px-2.5 py-1.5 pr-16 text-xs">- <code className="block whitespace-pre text-gray-300">{cmd.code}</code>+ <pre className="overflow-x-auto rounded-lg border border-gray-200 bg-gray-100 px-2.5 py-1.5 pr-16 text-xs dark:border-gray-700 dark:bg-gray-800">+ <code className="block whitespace-pre text-gray-700 dark:text-gray-300">+ {cmd.code}+ </code></pre><buttononClick={async () => {@@ -49,7 +51,7 @@ export function DbSizeCommands({ commands }: Props) {/* ignore */}}}- className={`absolute top-2 right-2 rounded border border-[#ffffff20] px-2 py-0.5 text-white transition-colors ${+ className={`absolute top-2 right-2 rounded border border-gray-300 px-2 py-0.5 text-white transition-colors dark:border-gray-600 ${copiedIndex === index ? 'bg-green-500' : 'bg-blue-600 hover:bg-blue-700'}`}>diff --git a/frontend/src/features/billing/ui/PriceActionBar.tsx b/frontend/src/features/billing/ui/PriceActionBar.tsxindex dfc3a7a9..656ebc54 100644--- a/frontend/src/features/billing/ui/PriceActionBar.tsx+++ b/frontend/src/features/billing/ui/PriceActionBar.tsx@@ -30,15 +30,17 @@ export function PriceActionBar({onChangeStorage,}: Props) {return (- <div className="mt-4 flex items-center gap-4 border-t border-[#ffffff20] pt-4">+ <div className="mt-4 flex items-center gap-4 border-t border-gray-200 pt-4 dark:border-gray-700"><div className="flex-1"><p className="text-2xl font-bold">${(monthlyPrice / 100).toFixed(2)}- <span className="text-base font-medium text-gray-400">/mo</span>+ <span className="text-base font-medium text-gray-500 dark:text-gray-400">/mo</span></p>{isChangeFlow && !isSameStorage && (- <p className="text-xs text-gray-400">Currently ${(currentPrice / 100).toFixed(2)}/mo</p>+ <p className="text-xs text-gray-500 dark:text-gray-400">+ Currently ${(currentPrice / 100).toFixed(2)}/mo+ </p>)}</div>diff --git a/frontend/src/features/billing/ui/PurchaseComponent.module.css b/frontend/src/features/billing/ui/PurchaseComponent.module.cssindex dcbf4140..236bc7d6 100644--- a/frontend/src/features/billing/ui/PurchaseComponent.module.css+++ b/frontend/src/features/billing/ui/PurchaseComponent.module.css@@ -6,6 +6,11 @@border-radius: 3px;outline: none;cursor: pointer;+ --slider-track: #e5e7eb;+}++:global(.dark) .calcSlider {+ --slider-track: #1f2937;}.calcSlider::-webkit-slider-thumb {@@ -38,7 +43,7 @@.calcSlider::-moz-range-track {height: 6px;border-radius: 3px;- background: #1f2937;+ background: var(--slider-track);}.calcSlider::-moz-range-progress {diff --git a/frontend/src/features/billing/ui/PurchaseComponent.tsx b/frontend/src/features/billing/ui/PurchaseComponent.tsxindex f6960b37..7ddd06f3 100644--- a/frontend/src/features/billing/ui/PurchaseComponent.tsx+++ b/frontend/src/features/billing/ui/PurchaseComponent.tsx@@ -99,7 +99,7 @@ export function PurchaseComponent({ databaseId, onSubscriptionChanged, onClose }{flow.isWaitingForPayment && (<div className="flex flex-col items-center gap-4 py-10"><Spin size="large" />- <p className="text-gray-400">Confirming your payment...</p>+ <p className="text-gray-500 dark:text-gray-400">Confirming your payment...</p></div>)}@@ -142,14 +142,16 @@ export function PurchaseComponent({ databaseId, onSubscriptionChanged, onClose }{flow.isWaitingForUpgrade && !flow.isUpgradeTimedOut && (<div className="flex flex-col items-center gap-4 py-10"><Spin size="large" />- <p className="text-gray-400">Waiting for storage upgrade confirmation...</p>+ <p className="text-gray-500 dark:text-gray-400">+ Waiting for storage upgrade confirmation...+ </p></div>)}{isShowingForm && (<div>{isChangeFlow && subscription.pendingStorageGb !== undefined && (- <div className="mb-4 rounded-lg border border-yellow-600/30 bg-yellow-900/20 px-4 py-3 text-sm text-yellow-400">+ <div className="mb-4 rounded-lg border border-yellow-300/50 bg-yellow-50 px-4 py-3 text-sm text-yellow-700 dark:border-yellow-600/30 dark:bg-yellow-900/20 dark:text-yellow-400">Pending storage change to {formatSize(subscription.pendingStorageGb)} from nextbilling cycle</div>diff --git a/frontend/src/features/billing/ui/StorageSlidersSection.tsx b/frontend/src/features/billing/ui/StorageSlidersSection.tsxindex aa118972..078b9ba6 100644--- a/frontend/src/features/billing/ui/StorageSlidersSection.tsx+++ b/frontend/src/features/billing/ui/StorageSlidersSection.tsx@@ -60,7 +60,7 @@ export function StorageSlidersSection({<span className="font-bold text-blue-500">{formatSize(singleBackupSizeGb)}</span></div>- <p className="mb-2 flex items-center text-gray-400">+ <p className="mb-2 flex items-center text-gray-500 dark:text-gray-400"><span className="flex min-w-[185px] items-center gap-1">Then approximate DB size{' '}<span className="group relative inline-block">@@ -78,13 +78,15 @@ export function StorageSlidersSection({<circle cx="12" cy="12" r="10" /><path d="M12 16v-4M12 8h.01" /></svg>- <span className="pointer-events-none absolute bottom-full left-1/2 mb-2 w-52 -translate-x-1/2 rounded-lg border border-[#ffffff20] bg-[#1f2937] px-3 py-2 text-gray-300 opacity-0 transition-opacity group-hover:opacity-100">+ <span className="pointer-events-none absolute bottom-full left-1/2 mb-2 w-52 -translate-x-1/2 rounded-lg border border-gray-200 bg-gray-100 px-3 py-2 text-gray-600 opacity-0 transition-opacity group-hover:opacity-100 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-300">Estimated with ~10x compression ratio typical for database backups. Can differ basedon the database type, structure, and content.</span></span></span>- <span className="font-medium text-gray-200">~{formatSize(approximateDbSize)}</span>+ <span className="font-medium text-gray-900 dark:text-gray-200">+ ~{formatSize(approximateDbSize)}+ </span></p><DbSizeCommands commands={DB_SIZE_COMMANDS} />