Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

feat(ui): restyle the Backups body to the new look

Juan Denis382dd76fd54b
diff --git a/frontend/src/pages/Backups.jsx b/frontend/src/pages/Backups.jsx
index e4f3cd15..f37cb098 100644
--- a/frontend/src/pages/Backups.jsx
+++ b/frontend/src/pages/Backups.jsx
@@ -1,20 +1,21 @@
import { useState, useEffect } from 'react';
import useTabParam from '../hooks/useTabParam';
-import { Upload, Download, Check, AlertTriangle, Clock, Database, Package, FolderArchive, HardDrive, Cloud, CloudOff, RefreshCw, Trash2, Plus, CheckCircle, XCircle, FileArchive } from 'lucide-react';
+import { Upload, Check, AlertTriangle, Clock, Database, Package, FolderArchive, HardDrive, Cloud, CloudOff, RefreshCw, Trash2, Plus, CheckCircle, XCircle, FileArchive } from 'lucide-react';
import api from '../services/api';
import { useToast } from '../contexts/ToastContext';
import { useConfirm } from '../hooks/useConfirm';
import { ConfirmDialog } from '../components/ConfirmDialog';
-import { StatCard, StatsGrid } from '../components/StatCard';
import EmptyState from '../components/EmptyState';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Textarea } from '@/components/ui/textarea';
-import { Badge } from '@/components/ui/badge';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
+import { MetricCard, Pill, SegControl } from '@/components/ds';
const VALID_TABS = ['backups', 'schedules', 'storage', 'settings'];
+const PROVIDER_LABELS = { local: 'Local only', s3: 'S3-Compatible', b2: 'Backblaze B2' };
+
const Backups = () => {
const toast = useToast();
const { confirm, confirmState, handleConfirm, handleCancel } = useConfirm();
@@ -346,14 +347,14 @@ const Backups = () => {
}
};
- const getRemoteStatusBadge = (status) => {
+ const getRemoteStatusPill = (status) => {
switch (status) {
case 'synced':
- return <Badge variant="success"><Cloud size={12} /> Synced</Badge>;
+ return <Pill kind="green" dot={false}><Cloud size={11} /> Synced</Pill>;
case 'remote-only':
- return <Badge variant="info"><Cloud size={12} /> Remote</Badge>;
+ return <Pill kind="cyan" dot={false}><Cloud size={11} /> Remote</Pill>;
default:
- return <Badge variant="secondary"><HardDrive size={12} /> Local</Badge>;
+ return <Pill kind="gray" dot={false}><HardDrive size={11} /> Local</Pill>;
}
};
@@ -372,7 +373,7 @@ const Backups = () => {
<h1>Backups</h1>
<p className="page-subtitle">Manage application, database, and file backups with local and remote storage</p>
</div>
- <div className="page-actions">
+ <div className="page-header-actions">
<Button variant="outline" onClick={() => setShowScheduleModal(true)}>
<Clock size={16} />
Add Schedule
@@ -391,16 +392,22 @@ const Backups = () => {
</div>
)}
- {/* Stats Cards */}
- <StatsGrid>
- <StatCard icon={Download} iconVariant="backups" label="Total Backups" value={stats?.total_backups || 0} />
- <StatCard icon={Package} iconVariant="apps" label="Application Backups" value={stats?.application_backups || 0} />
- <StatCard icon={Database} iconVariant="databases" label="Database Backups" value={stats?.database_backups || 0} />
- <StatCard icon={HardDrive} iconVariant="size" label="Local Size" value={stats?.total_size_human || '0 B'} />
+ {/* KPI strip */}
+ <div className="bk-kpis">
+ <MetricCard tone="green" icon={<FileArchive size={16} />} value={stats?.total_backups || 0} label="Total backups">
+ <div className="sk-kpi__sub"><span>{stats?.file_backups || 0} file backups</span></div>
+ </MetricCard>
+ <MetricCard tone="accent" icon={<Package size={16} />} value={stats?.application_backups || 0} label="Application backups" />
+ <MetricCard tone="violet" icon={<Database size={16} />} value={stats?.database_backups || 0} label="Database backups" />
+ <MetricCard tone="amber" icon={<HardDrive size={16} />} value={stats?.total_size_human || '0 B'} label="Local size" />
{storageConfig?.provider !== 'local' && (
- <StatCard icon={Cloud} iconVariant="cloud" label="Remote Backups" value={stats?.remote_count || 0} />
+ <MetricCard tone="cyan" icon={<Cloud size={16} />} value={stats?.remote_count || 0} label="Remote backups">
+ {stats?.remote_size_human && (
+ <div className="sk-kpi__sub"><span>{stats.remote_size_human} remote</span></div>
+ )}
+ </MetricCard>
)}
- </StatsGrid>
+ </div>
<Tabs value={activeTab} onValueChange={setActiveTab}>
<TabsList>
@@ -412,209 +419,236 @@ const Backups = () => {
{/* Backups Tab */}
<TabsContent value="backups">
- <div className="card">
- <div className="card-header">
- <h3>Backup List</h3>
- <div className="card-actions">
- <select
- value={filterType}
- onChange={(e) => setFilterType(e.target.value)}
- className="filter-select"
- >
- <option value="all">All Types</option>
- <option value="application">Applications</option>
- <option value="database">Databases</option>
- <option value="files">Files</option>
- </select>
- <Button size="sm" variant="outline" onClick={loadData}>
- <RefreshCw size={14} />
- Refresh
- </Button>
- </div>
- </div>
- <div className="card-body">
- {filteredBackups.length === 0 ? (
- <EmptyState
- icon={FileArchive}
- title="No Backups"
- description="No backups found. Create your first backup to get started."
- action={<Button onClick={() => setShowBackupModal(true)}>Create Backup</Button>}
- />
- ) : (
- <table className="table">
- <thead>
- <tr>
- <th>Name</th>
- <th>Type</th>
- <th>Size</th>
- <th>Storage</th>
- <th>Created</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- {filteredBackups.map((backup, index) => (
- <tr key={index}>
- <td>
- <div className="backup-name">
+ <div className="bk-listhead">
+ <h2>Backup archive</h2>
+ <SegControl
+ value={filterType}
+ onChange={setFilterType}
+ options={[
+ { value: 'all', label: 'All', count: backups.length },
+ { value: 'application', label: 'Applications', count: backups.filter(b => b.type === 'application').length },
+ { value: 'database', label: 'Databases', count: backups.filter(b => b.type === 'database').length },
+ { value: 'files', label: 'Files', count: backups.filter(b => b.type === 'files').length },
+ ]}
+ />
+ <Button size="sm" variant="outline" onClick={loadData}>
+ <RefreshCw size={14} />
+ Refresh
+ </Button>
+ </div>
+ {backups.length === 0 ? (
+ <EmptyState
+ icon={FileArchive}
+ title="No Backups"
+ description="No backups found. Create your first backup to get started."
+ action={<Button onClick={() => setShowBackupModal(true)}>Create Backup</Button>}
+ />
+ ) : filteredBackups.length === 0 ? (
+ <div className="bk-empty">No backups match the current filter.</div>
+ ) : (
+ <div className="bk-card">
+ <table className="sk-dtable bk-table">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Size</th>
+ <th>Storage</th>
+ <th>Created</th>
+ <th aria-label="Actions" />
+ </tr>
+ </thead>
+ <tbody>
+ {filteredBackups.map((backup, index) => (
+ <tr key={index}>
+ <td>
+ <div className="sk-cell-name">
+ <span className={`bk-ico bk-ico--${backup.type}`}>
{getBackupIcon(backup.type)}
- <span>{backup.name || backup.app_name}</span>
- </div>
- </td>
- <td>
- <Badge variant={backup.type === 'application' ? 'default' : backup.type === 'database' ? 'info' : 'warning'}>
- {backup.type}
- </Badge>
- </td>
- <td>{formatSize(backup.size)}</td>
- <td>{getRemoteStatusBadge(backup.remote_status)}</td>
- <td>{formatTimestamp(backup.timestamp)}</td>
- <td>
- <div className="action-buttons">
- {backup.type !== 'files' && (
- <Button
- size="sm"
- variant="outline"
- onClick={() => {
- setSelectedBackup(backup);
- setShowRestoreModal(true);
- }}
- title="Restore"
- >
- <RefreshCw size={14} />
- </Button>
- )}
- {storageConfig?.provider !== 'local' && backup.remote_status !== 'synced' && (
- <Button
- size="sm"
- variant="outline"
- onClick={() => handleUploadToRemote(backup)}
- disabled={uploadingBackup === backup.path}
- title="Upload to Remote"
- >
- {uploadingBackup === backup.path ? (
- <RefreshCw size={14} className="spinning" />
- ) : (
- <Upload size={14} />
- )}
- </Button>
- )}
+ </span>
+ <span>{backup.name || backup.app_name}</span>
+ </div>
+ </td>
+ <td>
+ <span className={`bk-type bk-type--${backup.type}`}>{backup.type}</span>
+ </td>
+ <td className="sk-cell-mono">{formatSize(backup.size)}</td>
+ <td>{getRemoteStatusPill(backup.remote_status)}</td>
+ <td className="bk-when">{formatTimestamp(backup.timestamp)}</td>
+ <td>
+ <div className="bk-actions">
+ {backup.type !== 'files' && (
<Button
size="sm"
- variant="destructive"
- onClick={() => handleDeleteBackup(backup.path)}
- title="Delete"
+ variant="outline"
+ onClick={() => {
+ setSelectedBackup(backup);
+ setShowRestoreModal(true);
+ }}
+ title="Restore"
>
- <Trash2 size={14} />
+ <RefreshCw size={14} />
</Button>
- </div>
- </td>
- </tr>
- ))}
- </tbody>
- </table>
- )}
- </div>
- </div>
- </TabsContent>
-
- {/* Schedules Tab */}
- <TabsContent value="schedules">
- <div className="card">
- <div className="card-header">
- <h3>Backup Schedules</h3>
- <Button size="sm" onClick={() => setShowScheduleModal(true)}>
- <Plus size={14} />
- Add Schedule
- </Button>
- </div>
- <div className="card-body">
- {schedules.length === 0 ? (
- <EmptyState
- icon={Clock}
- title="No Schedules"
- description="No backup schedules configured. Add a schedule for automated backups."
- action={<Button onClick={() => setShowScheduleModal(true)}>Add Schedule</Button>}
- />
- ) : (
- <table className="table">
- <thead>
- <tr>
- <th>Name</th>
- <th>Type</th>
- <th>Target</th>
- <th>Time</th>
- <th>Days</th>
- <th>Remote</th>
- <th>Last Run</th>
- <th>Status</th>
- <th>Actions</th>
- </tr>
- </thead>
- <tbody>
- {schedules.map((schedule) => (
- <tr key={schedule.id}>
- <td>{schedule.name}</td>
- <td>
- <Badge variant={schedule.backup_type === 'application' ? 'default' : schedule.backup_type === 'database' ? 'info' : 'warning'}>
- {schedule.backup_type}
- </Badge>
- </td>
- <td>{schedule.target}</td>
- <td>{schedule.schedule_time}</td>
- <td>{schedule.days?.join(', ') || 'daily'}</td>
- <td>
- {schedule.upload_remote ? (
- <Cloud size={16} className="text-success" />
- ) : (
- <CloudOff size={16} className="text-muted" />
- )}
- </td>
- <td>{schedule.last_run ? formatTimestamp(schedule.last_run) : 'Never'}</td>
- <td>
- {schedule.last_status === 'success' && (
- <Badge variant="success"><CheckCircle size={12} /> Success</Badge>
- )}
- {schedule.last_status === 'failed' && (
- <Badge variant="destructive"><XCircle size={12} /> Failed</Badge>
)}
- {!schedule.last_status && (
- <Badge variant={schedule.enabled ? 'success' : 'secondary'}>
- {schedule.enabled ? 'Active' : 'Disabled'}
- </Badge>
- )}
- </td>
- <td>
- <div className="action-buttons">
- <Button
- size="sm"
- variant={schedule.enabled ? 'outline' : 'default'}
- onClick={() => handleToggleSchedule(schedule)}
- title={schedule.enabled ? 'Disable' : 'Enable'}
- >
- {schedule.enabled ? <XCircle size={14} /> : <CheckCircle size={14} />}
- </Button>
+ {storageConfig?.provider !== 'local' && backup.remote_status !== 'synced' && (
<Button
size="sm"
- variant="destructive"
- onClick={() => handleRemoveSchedule(schedule.id)}
- title="Remove"
+ variant="outline"
+ onClick={() => handleUploadToRemote(backup)}
+ disabled={uploadingBackup === backup.path}
+ title="Upload to Remote"
>
- <Trash2 size={14} />
+ {uploadingBackup === backup.path ? (
+ <RefreshCw size={14} className="spinning" />
+ ) : (
+ <Upload size={14} />
+ )}
</Button>
- </div>
- </td>
- </tr>
- ))}
- </tbody>
- </table>
- )}
+ )}
+ <Button
+ size="sm"
+ variant="destructive"
+ onClick={() => handleDeleteBackup(backup.path)}
+ title="Delete"
+ >
+ <Trash2 size={14} />
+ </Button>
+ </div>
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
</div>
+ )}
+ </TabsContent>
+
+ {/* Schedules Tab */}
+ <TabsContent value="schedules">
+ <div className="bk-listhead">
+ <h2>Backup schedules</h2>
+ <Button size="sm" onClick={() => setShowScheduleModal(true)}>
+ <Plus size={14} />
+ Add Schedule
+ </Button>
</div>
+ {schedules.length === 0 ? (
+ <EmptyState
+ icon={Clock}
+ title="No Schedules"
+ description="No backup schedules configured. Add a schedule for automated backups."
+ action={<Button onClick={() => setShowScheduleModal(true)}>Add Schedule</Button>}
+ />
+ ) : (
+ <div className="bk-card">
+ <table className="sk-dtable bk-table bk-table--schedules">
+ <thead>
+ <tr>
+ <th>Name</th>
+ <th>Type</th>
+ <th>Target</th>
+ <th>Time</th>
+ <th>Days</th>
+ <th>Remote</th>
+ <th>Last Run</th>
+ <th>Status</th>
+ <th aria-label="Actions" />
+ </tr>
+ </thead>
+ <tbody>
+ {schedules.map((schedule) => (
+ <tr key={schedule.id} className={schedule.enabled ? undefined : 'is-disabled'}>
+ <td>
+ <div className="sk-cell-name">
+ <span className={`bk-ico bk-ico--${schedule.backup_type}`}>
+ {getBackupIcon(schedule.backup_type)}
+ </span>
+ <span>{schedule.name}</span>
+ </div>
+ </td>
+ <td>
+ <span className={`bk-type bk-type--${schedule.backup_type}`}>{schedule.backup_type}</span>
+ </td>
+ <td className="sk-cell-mono">{schedule.target}</td>
+ <td>
+ <span className="bk-sched"><Clock size={11} />{schedule.schedule_time}</span>
+ </td>
+ <td className="sk-cell-mono">{schedule.days?.join(', ') || 'daily'}</td>
+ <td>
+ {schedule.upload_remote ? (
+ <Cloud size={16} className="bk-remote-on" />
+ ) : (
+ <CloudOff size={16} className="bk-remote-off" />
+ )}
+ </td>
+ <td className="bk-when">{schedule.last_run ? formatTimestamp(schedule.last_run) : 'Never'}</td>
+ <td>
+ {schedule.last_status === 'success' && (
+ <Pill kind="green">Success</Pill>
+ )}
+ {schedule.last_status === 'failed' && (
+ <Pill kind="red">Failed</Pill>
+ )}
+ {!schedule.last_status && (
+ <Pill kind={schedule.enabled ? 'green' : 'gray'}>
+ {schedule.enabled ? 'Active' : 'Disabled'}
+ </Pill>
+ )}
+ </td>
+ <td>
+ <div className="bk-actions">
+ <Button
+ size="sm"
+ variant={schedule.enabled ? 'outline' : 'default'}
+ onClick={() => handleToggleSchedule(schedule)}
+ title={schedule.enabled ? 'Disable' : 'Enable'}
+ >
+ {schedule.enabled ? <XCircle size={14} /> : <CheckCircle size={14} />}
+ </Button>
+ <Button
+ size="sm"
+ variant="destructive"
+ onClick={() => handleRemoveSchedule(schedule.id)}
+ title="Remove"
+ >
+ <Trash2 size={14} />
+ </Button>
+ </div>
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ )}
</TabsContent>
{/* Storage Tab */}
<TabsContent value="storage">
+ <div className="bk-specs">
+ <div className="sk-spec-card">
+ <div className="sk-spec-card__label">Provider</div>
+ <div className="sk-spec-card__value">{PROVIDER_LABELS[storageConfig?.provider] || 'Local only'}</div>
+ <div className="sk-spec-card__sub">
+ {storageConfig && storageConfig.provider !== 'local'
+ ? (storageConfig.auto_upload ? 'auto-upload on' : 'auto-upload off')
+ : 'backups stay on this server'}
+ </div>
+ </div>
+ <div className="sk-spec-card">
+ <div className="sk-spec-card__label">Local archive</div>
+ <div className="sk-spec-card__value">{stats?.total_size_human || '0 B'}</div>
+ <div className="sk-spec-card__sub">{stats?.total_backups || 0} backups on disk</div>
+ </div>
+ {storageConfig && storageConfig.provider !== 'local' && (
+ <div className="sk-spec-card">
+ <div className="sk-spec-card__label">Remote archive</div>
+ <div className="sk-spec-card__value">{stats?.remote_size_human || '0 B'}</div>
+ <div className="sk-spec-card__sub">{stats?.remote_count || 0} backups uploaded</div>
+ </div>
+ )}
+ </div>
+
<div className="card">
<div className="card-header">
<h3>Remote Storage Configuration</h3>
@@ -623,14 +657,16 @@ const Backups = () => {
<form onSubmit={handleSaveStorageConfig}>
<div className="form-group">
<label>Storage Provider</label>
- <select
+ <SegControl
value={storageForm.provider}
- onChange={(e) => setStorageForm({...storageForm, provider: e.target.value})}
- >
- <option value="local">Local Only</option>
- <option value="s3">S3-Compatible (AWS S3, MinIO, Wasabi)</option>
- <option value="b2">Backblaze B2</option>
- </select>
+ onChange={(provider) => setStorageForm({...storageForm, provider})}
+ options={[
+ { value: 'local', label: 'Local Only' },
+ { value: 's3', label: 'S3-Compatible' },
+ { value: 'b2', label: 'Backblaze B2' },
+ ]}
+ />
+ <span className="form-help">S3-Compatible works with AWS S3, MinIO and Wasabi.</span>
</div>
{storageForm.provider === 's3' && (
@@ -1091,27 +1127,26 @@ const Backups = () => {
<button className="modal-close" onClick={() => setShowRestoreModal(false)}>&times;</button>
</div>
<div className="modal-body">
- <div className="restore-warning">
- <AlertTriangle size={48} />
- <h3>Warning</h3>
- <p>Restoring this backup will overwrite existing data. This action cannot be undone.</p>
+ <div className="bk-restore-warn">
+ <AlertTriangle size={18} />
+ <span><b>Warning:</b> restoring this backup will overwrite existing data. This action cannot be undone.</span>
</div>
- <div className="restore-details">
- <div className="detail-row">
- <span className="detail-label">Backup Name:</span>
- <span className="detail-value">{selectedBackup.name || selectedBackup.app_name}</span>
+ <div className="bk-restore-details">
+ <div className="sk-info-row">
+ <span className="k">Backup Name</span>
+ <span className="v">{selectedBackup.name || selectedBackup.app_name}</span>
</div>
- <div className="detail-row">
- <span className="detail-label">Type:</span>
- <span className="detail-value">{selectedBackup.type}</span>
+ <div className="sk-info-row">
+ <span className="k">Type</span>
+ <span className="v">{selectedBackup.type}</span>
</div>
- <div className="detail-row">
- <span className="detail-label">Created:</span>
- <span className="detail-value">{formatTimestamp(selectedBackup.timestamp)}</span>
+ <div className="sk-info-row">
+ <span className="k">Created</span>
+ <span className="v">{formatTimestamp(selectedBackup.timestamp)}</span>
</div>
- <div className="detail-row">
- <span className="detail-label">Size:</span>
- <span className="detail-value">{formatSize(selectedBackup.size)}</span>
+ <div className="sk-info-row">
+ <span className="k">Size</span>
+ <span className="v">{formatSize(selectedBackup.size)}</span>
</div>
</div>
</div>
diff --git a/frontend/src/styles/pages/_backups.scss b/frontend/src/styles/pages/_backups.scss
index e4fe9c90..b9e5b015 100644
--- a/frontend/src/styles/pages/_backups.scss
+++ b/frontend/src/styles/pages/_backups.scss
@@ -1,223 +1,343 @@
// ============================================
-// BACKUPS PAGE
+// BACKUPS PAGE (redesign — infra console look)
// ============================================
.backups-page {
- // Stat icon variants for backups
- .stat-icon {
- &.backups {
- background: fade($success, 10%);
- color: $success;
- }
- &.apps {
- background: fade($accent-primary-raw, 10%);
- color: $accent-primary;
- }
+ // ── KPI strip (4 tiles, +1 when a remote provider is set) ──
+ .bk-kpis {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
+ gap: $space-4;
+ margin-bottom: $space-5;
- &.databases {
- background: fade($violet, 10%);
- color: $violet;
- }
+ @media (max-width: $breakpoint-sm) { grid-template-columns: 1fr; }
+ }
- &.size {
- background: fade($warning, 10%);
- color: $warning;
- }
+ // ── tab strip (shadcn .tabs/.tab → accent wash) ─────────
+ .tabs {
+ gap: 2px;
+ border-bottom: 1px solid var(--border-soft);
}
- .filter-select {
- padding: $space-2 $space-3;
- border: 1px solid $border-subtle;
- border-radius: $radius-md;
- background: $bg-hover;
- color: $text-primary;
- font-size: $font-size-sm;
+ .tab {
+ padding: 8px 13px;
+ border-radius: 8px 8px 0 0;
+ border-bottom: 2px solid transparent;
+ margin-bottom: -1px;
+ font-size: 13px;
+ color: var(--text-dim);
+
+ &:hover {
+ color: var(--text);
+ background: var(--surface-hover);
+ }
- &:focus {
- outline: none;
- border-color: $accent-primary;
+ &.active,
+ &[data-state="active"] {
+ color: var(--accent-bright);
+ background: var(--accent-bg);
+ border-bottom-color: var(--accent-bright);
}
}
- .backup-name {
+ // ── list head: mono eyebrow + segmented filter + actions ─
+ .bk-listhead {
display: flex;
align-items: center;
- gap: $space-2;
-
- svg {
- stroke: currentColor;
- fill: none;
- stroke-width: 2;
- flex-shrink: 0;
+ gap: $space-3;
+ margin-bottom: $space-3;
+
+ h2 {
+ flex: 1;
+ min-width: 0;
+ margin: 0;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
}
- .icon-app {
- color: $accent-primary;
+ @media (max-width: $breakpoint-md) {
+ flex-wrap: wrap;
+
+ h2 { flex-basis: 100%; }
}
+ }
+
+ // ── dense tables (backup archive + schedules) ───────────
+ .bk-card {
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ overflow: hidden;
+ }
+
+ .bk-empty {
+ padding: $space-10;
+ text-align: center;
+ color: var(--text-faint);
+ font-size: 13px;
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ }
- .icon-db {
- color: $violet;
+ .bk-table {
+ // actions column shrinks to fit, buttons never wrap
+ th:last-child { width: 1%; }
+ td:last-child { white-space: nowrap; }
+
+ tbody tr.is-disabled {
+ opacity: 0.55;
+
+ .bk-ico {
+ background: var(--surface-3);
+ color: var(--text-faint);
+ }
}
}
- .action-buttons {
- display: flex;
- gap: $space-1;
+ // backup kind tile (tinted per type)
+ .bk-ico {
+ width: 30px;
+ height: 30px;
+ border-radius: 8px;
+ display: grid;
+ place-items: center;
+ flex-shrink: 0;
+ background: var(--surface-2);
+ color: var(--text-dim);
+
+ &--application { background: var(--accent-bg); color: var(--accent-bright); }
+ &--database { background: var(--violet-bg); color: var(--violet); }
+ &--files { background: var(--amber-bg); color: var(--amber); }
}
- .checkbox-label {
- display: flex;
+ // mono type chip (application / database / files)
+ .bk-type {
+ display: inline-flex;
align-items: center;
- gap: $space-2;
- cursor: pointer;
+ padding: 2px 7px;
+ border-radius: 5px;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.05em;
+ text-transform: uppercase;
+ background: var(--surface-2);
+ border: 1px solid var(--border);
+ color: var(--text-dim);
+
+ &--application {
+ background: var(--accent-bg);
+ border-color: fade($accent-primary-raw, 30%);
+ color: var(--accent-bright);
+ }
- input[type="checkbox"] {
- width: 18px;
- height: 18px;
- cursor: pointer;
+ &--database {
+ background: var(--violet-bg);
+ border-color: rgba(176, 123, 245, 0.3);
+ color: var(--violet);
}
- span {
- font-size: $font-size-sm;
- color: $text-primary;
+ &--files {
+ background: var(--amber-bg);
+ border-color: rgba(245, 185, 69, 0.3);
+ color: var(--amber);
}
}
- .form-row {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: $space-4;
+ .bk-when {
+ font-family: var(--mono);
+ font-size: 12px;
+ color: var(--text-faint);
+ white-space: nowrap;
}
- .form-help {
- display: block;
- margin-top: $space-1;
- font-size: $font-size-xs;
- color: $text-tertiary;
+ .bk-actions {
+ display: flex;
+ justify-content: flex-end;
+ gap: $space-1;
}
- .restore-warning {
- text-align: center;
- padding: $space-6;
- background: $danger-bg;
- border-radius: $radius-md;
- margin-bottom: $space-6;
+ // schedule time chip (matches the cron expression chip)
+ .bk-sched {
+ display: inline-flex;
+ align-items: center;
+ gap: 5px;
+ padding: 2px 8px;
+ font-family: var(--mono);
+ font-size: 11.5px;
+ color: var(--text-dim);
+ background: var(--surface-2);
+ border: 1px solid var(--border);
+ border-radius: 6px;
+ white-space: nowrap;
svg {
- stroke: $danger;
- fill: none;
- stroke-width: 2;
- margin-bottom: $space-2;
- }
-
- h3 {
- color: $danger;
- margin-bottom: $space-2;
- }
-
- p {
- color: $text-secondary;
- font-size: $font-size-sm;
+ color: var(--text-faint);
+ flex-shrink: 0;
}
}
- .restore-details {
- background: $bg-hover;
- border-radius: $radius-md;
- padding: $space-4;
+ // remote-upload indicator on schedule rows
+ .bk-remote-on { color: var(--green); }
+ .bk-remote-off { color: var(--text-ghost); }
- .detail-row {
- display: flex;
- justify-content: space-between;
- padding: $space-2 0;
+ // storage pills carry a small lucide icon instead of the dot
+ .sk-pill svg { flex-shrink: 0; }
- &:not(:last-child) {
- border-bottom: 1px solid $border-subtle;
- }
- }
+ @media (max-width: $breakpoint-md) {
+ .bk-card { overflow-x: auto; }
+ .bk-table { min-width: 720px; }
+ .bk-table--schedules { min-width: 880px; }
+ }
- .detail-label {
- color: $text-tertiary;
- font-size: $font-size-sm;
- }
+ // ── storage tab: real-data spec strip ───────────────────
+ .bk-specs {
+ display: grid;
+ grid-template-columns: repeat(3, 1fr);
+ gap: $space-3;
+ margin-bottom: $space-4;
- .detail-value {
- font-weight: $font-weight-medium;
- font-size: $font-size-sm;
- color: $text-primary;
- }
+ @media (max-width: $breakpoint-sm) { grid-template-columns: 1fr; }
}
- // Remote storage stat
- .stat-icon.cloud {
- background: fade($info, 10%);
- color: $info;
+ // storage/settings cards → surface chrome + eyebrow headers
+ .card {
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ }
+
+ .card-header h3 {
+ margin: 0;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
}
- // Storage provider config section
.storage-provider-config {
margin: $space-4 0;
padding: $space-4;
- background: $bg-hover;
- border-radius: $radius-md;
- border: 1px solid $border-subtle;
+ background: var(--surface-2);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius-sm);
h4 {
margin: 0 0 $space-4;
- font-size: $font-size-base;
- color: $text-primary;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
}
}
- .form-help-inline {
- font-size: $font-size-xs;
- color: $text-tertiary;
- font-weight: $font-weight-normal;
+ // ── forms (cards + modals): mono eyebrow labels ─────────
+ .form-group > label:not(.checkbox-label) {
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
}
- // Remote status badges in backup list
- .badge {
- svg {
- vertical-align: -2px;
- margin-right: 2px;
- }
+ .form-row {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+ gap: $space-4;
+
+ @media (max-width: $breakpoint-sm) { grid-template-columns: 1fr; }
}
- // Text helper classes
- .text-success {
- color: $success;
+ .form-help {
+ display: block;
+ margin-top: $space-2;
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--text-faint);
}
- .text-muted {
- color: $text-tertiary;
+ // inline hint inside an eyebrow label — undo the uppercase
+ .form-help-inline {
+ font-family: var(--mono);
+ font-size: 10px;
+ font-weight: $font-weight-normal;
+ letter-spacing: normal;
+ text-transform: none;
+ color: var(--text-ghost);
}
- // Spinning animation for upload/test buttons
- .spinning {
- animation: spin 1s linear infinite;
+ .form-actions {
+ display: flex;
+ gap: $space-2;
+ margin-top: $space-5;
}
- @keyframes spin {
- from { transform: rotate(0deg); }
- to { transform: rotate(360deg); }
+ .checkbox-label {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+ cursor: pointer;
+
+ input[type="checkbox"] {
+ width: 16px;
+ height: 16px;
+ cursor: pointer;
+ accent-color: var(--accent);
+ }
+
+ span {
+ font-size: 13px;
+ color: var(--text);
+ }
}
- // Textarea for file paths
- textarea {
- width: 100%;
- padding: $space-2 $space-3;
- border: 1px solid $border-subtle;
- border-radius: $radius-md;
- background: $bg-input;
- color: $text-primary;
- font-family: $font-mono;
- font-size: $font-size-sm;
- resize: vertical;
+ // ── restore modal ───────────────────────────────────────
+ .bk-restore-warn {
+ display: flex;
+ gap: 11px;
+ padding: 13px 15px;
+ margin-bottom: $space-5;
+ border-radius: 11px;
+ background: var(--amber-bg);
+ border: 1px solid rgba(245, 185, 69, 0.28);
+ font-size: 12.5px;
+ line-height: 1.5;
+ color: var(--text-dim);
- &:focus {
- outline: none;
- border-color: $accent-primary;
+ svg {
+ color: var(--amber);
+ flex-shrink: 0;
+ margin-top: 1px;
}
+
+ b { color: var(--text); }
+ }
+
+ .bk-restore-details {
+ padding: $space-1 $space-4;
+ background: var(--surface-2);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius-sm);
}
+
+ // ── spinners (upload / test-connection buttons) ─────────
+ .spinning {
+ animation: spin 1s linear infinite;
+ }
+}
+
+@keyframes spin {
+ from { transform: rotate(0deg); }
+ to { transform: rotate(360deg); }
}