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): unify empty states + strip AI-slop on infra pages

Juan Denis40e590f10ce9
diff --git a/frontend/src/pages/Databases.jsx b/frontend/src/pages/Databases.jsx
index 81218e52..88c70e29 100644
--- a/frontend/src/pages/Databases.jsx
+++ b/frontend/src/pages/Databases.jsx
@@ -6,10 +6,11 @@ import { useToast } from '../contexts/ToastContext';
import { useConfirm } from '../hooks/useConfirm';
import { ConfirmDialog } from '../components/ConfirmDialog';
import QueryRunner from '../components/QueryRunner';
+import EmptyState from '../components/EmptyState';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
-import { Archive, Box, Database, HardDrive, Server } from 'lucide-react';
+import { Archive, Box, Database, HardDrive, Server, Users } from 'lucide-react';
const VALID_TABS = ['mysql', 'postgresql', 'docker', 'backups', 'sqlite'];
@@ -248,19 +249,21 @@ const MySQLTab = ({ status }) => {
if (!status?.installed) {
return (
- <div className="empty-state">
- <h3>MySQL is not installed</h3>
- <p>Install MySQL or MariaDB on your server to manage databases.</p>
- </div>
+ <EmptyState
+ icon={Database}
+ title="MySQL is not installed"
+ description="Install MySQL or MariaDB on your server to manage databases."
+ />
);
}
if (!status?.running) {
return (
- <div className="empty-state">
- <h3>MySQL is not running</h3>
- <p>Start the MySQL server to manage databases.</p>
- </div>
+ <EmptyState
+ icon={Database}
+ title="MySQL is not running"
+ description="Start the MySQL server to manage databases."
+ />
);
}
@@ -300,10 +303,11 @@ const MySQLTab = ({ status }) => {
{view === 'databases' ? (
databases.length === 0 ? (
- <div className="empty-state">
- <h3>No databases</h3>
- <p>Create your first MySQL database.</p>
- </div>
+ <EmptyState
+ icon={Database}
+ title="No databases"
+ description="Create your first MySQL database."
+ />
) : (
<div className="db-list">
{databases.map(db => (
@@ -344,10 +348,11 @@ const MySQLTab = ({ status }) => {
)
) : (
users.length === 0 ? (
- <div className="empty-state">
- <h3>No users</h3>
- <p>Create your first MySQL user.</p>
- </div>
+ <EmptyState
+ icon={Users}
+ title="No users"
+ description="Create your first MySQL user."
+ />
) : (
<div className="db-list">
{users.map(user => (
@@ -499,19 +504,21 @@ const PostgreSQLTab = ({ status }) => {
if (!status?.installed) {
return (
- <div className="empty-state">
- <h3>PostgreSQL is not installed</h3>
- <p>Install PostgreSQL on your server to manage databases.</p>
- </div>
+ <EmptyState
+ icon={Database}
+ title="PostgreSQL is not installed"
+ description="Install PostgreSQL on your server to manage databases."
+ />
);
}
if (!status?.running) {
return (
- <div className="empty-state">
- <h3>PostgreSQL is not running</h3>
- <p>Start the PostgreSQL server to manage databases.</p>
- </div>
+ <EmptyState
+ icon={Database}
+ title="PostgreSQL is not running"
+ description="Start the PostgreSQL server to manage databases."
+ />
);
}
@@ -551,10 +558,11 @@ const PostgreSQLTab = ({ status }) => {
{view === 'databases' ? (
databases.length === 0 ? (
- <div className="empty-state">
- <h3>No databases</h3>
- <p>Create your first PostgreSQL database.</p>
- </div>
+ <EmptyState
+ icon={Database}
+ title="No databases"
+ description="Create your first PostgreSQL database."
+ />
) : (
<div className="db-list">
{databases.map(db => (
@@ -595,10 +603,11 @@ const PostgreSQLTab = ({ status }) => {
)
) : (
users.length === 0 ? (
- <div className="empty-state">
- <h3>No users</h3>
- <p>Create your first PostgreSQL user.</p>
- </div>
+ <EmptyState
+ icon={Users}
+ title="No users"
+ description="Create your first PostgreSQL user."
+ />
) : (
<div className="db-list">
{users.map(user => (
@@ -728,10 +737,11 @@ const BackupsTab = () => {
</div>
{backups.length === 0 ? (
- <div className="empty-state">
- <h3>No backups</h3>
- <p>Database backups will appear here.</p>
- </div>
+ <EmptyState
+ icon={Archive}
+ title="No backups"
+ description="Database backups will appear here."
+ />
) : (
<div className="db-list">
{backups.map(backup => (
@@ -1435,10 +1445,11 @@ const SQLiteTab = () => {
</div>
{databases.length === 0 ? (
- <div className="empty-state">
- <h3>No SQLite databases found</h3>
- <p>No .db, .sqlite, or .sqlite3 files were found in the scanned directories.</p>
- </div>
+ <EmptyState
+ icon={HardDrive}
+ title="No SQLite databases found"
+ description="No .db, .sqlite, or .sqlite3 files were found in the scanned directories."
+ />
) : (
<div className="db-list">
{databases.map(db => (
@@ -1598,10 +1609,11 @@ const DockerDatabasesTab = () => {
</div>
{apps.length === 0 ? (
- <div className="empty-state">
- <h3>No Docker apps</h3>
- <p>Deploy an app from a template to see its databases here.</p>
- </div>
+ <EmptyState
+ icon={Box}
+ title="No Docker apps"
+ description="Deploy an app from a template to see its databases here."
+ />
) : (
<div className="db-list">
{apps.map(app => (
diff --git a/frontend/src/pages/Docker.jsx b/frontend/src/pages/Docker.jsx
index cb43b983..f4af9f9c 100644
--- a/frontend/src/pages/Docker.jsx
+++ b/frontend/src/pages/Docker.jsx
@@ -6,6 +6,7 @@ import { useConfirm } from '../hooks/useConfirm';
import { ConfirmDialog } from '../components/ConfirmDialog';
import LogToolbar from '../components/log-viewer/LogToolbar';
import LogContent from '../components/log-viewer/LogContent';
+import EmptyState from '../components/EmptyState';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Textarea } from '@/components/ui/textarea';
@@ -875,10 +876,13 @@ const ContainersTab = ({ onStatsChange }) => {
</div>
{filteredContainers.length === 0 ? (
- <div className="docker-empty">
- <Box size={32} />
- <p>{containers.length === 0 ? 'No containers yet. Run your first one.' : 'No containers match the current filters.'}</p>
- </div>
+ <EmptyState
+ icon={Box}
+ title={containers.length === 0 ? 'No containers' : 'No matching containers'}
+ description={containers.length === 0
+ ? 'Run your first container to see it here.'
+ : 'No containers match the current filters.'}
+ />
) : (
<div className="dx-manager-layout">
<section className="dx-resource-list">
@@ -1356,10 +1360,11 @@ const ImagesTab = ({ onStatsChange }) => {
</div>
{filteredImages.length === 0 ? (
- <div className="docker-empty">
- <h3>No images</h3>
- <p>Pull your first image to get started.</p>
- </div>
+ <EmptyState
+ icon={Layers}
+ title="No images"
+ description="Pull an image to see it here."
+ />
) : (
<table className="docker-table">
<thead>
@@ -1468,10 +1473,11 @@ const NetworksTab = ({ onStatsChange }) => {
return (
<div>
{networks.length === 0 ? (
- <div className="docker-empty">
- <h3>No networks</h3>
- <p>Create a network to connect containers.</p>
- </div>
+ <EmptyState
+ icon={NetworkIcon}
+ title="No networks"
+ description="Create a network to connect containers."
+ />
) : (
<table className="docker-table">
<thead>
@@ -1576,10 +1582,11 @@ const VolumesTab = ({ onStatsChange }) => {
return (
<div>
{volumes.length === 0 ? (
- <div className="docker-empty">
- <h3>No volumes</h3>
- <p>Create a volume for persistent data storage.</p>
- </div>
+ <EmptyState
+ icon={HardDrive}
+ title="No volumes"
+ description="Create a volume for persistent data storage."
+ />
) : (
<table className="docker-table">
<thead>
@@ -1741,13 +1748,12 @@ const ComposeTab = ({ onStatsChange }) => {
</div>
{projects.length === 0 ? (
- <div className="docker-empty">
- <h3>No Compose Projects</h3>
- <p>No Docker Compose projects are running on this server.</p>
- <p className="text-muted">
- Start a compose project with <code>docker compose up -d</code>
- </p>
- </div>
+ <EmptyState
+ icon={Package}
+ title="No Compose projects"
+ description="No Docker Compose projects are running on this server."
+ action={<code>docker compose up -d</code>}
+ />
) : (
<table className="docker-table">
<thead>
diff --git a/frontend/src/pages/Domains.jsx b/frontend/src/pages/Domains.jsx
index 5134cc4f..d26de646 100644
--- a/frontend/src/pages/Domains.jsx
+++ b/frontend/src/pages/Domains.jsx
@@ -6,6 +6,7 @@ import {
} from 'lucide-react';
import api from '../services/api';
import { useToast } from '../contexts/ToastContext';
+import EmptyState from '../components/EmptyState';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
@@ -213,19 +214,19 @@ const Domains = () => {
<h2 className="section-title">Domains</h2>
{loading ? (
- <div className="empty-state">
- <p>Loading domains...</p>
- </div>
+ <EmptyState loading title="Loading domains..." />
) : domains.length === 0 ? (
- <div className="empty-state">
- <Globe size={48} />
- <h3>No domains configured</h3>
- <p>Add a domain to your application to get started.</p>
- <Button onClick={() => setShowAddModal(true)}>
- <Plus size={16} />
- Add Domain
- </Button>
- </div>
+ <EmptyState
+ icon={Globe}
+ title="No domains configured"
+ description="Add a domain to your application to get started."
+ action={
+ <Button onClick={() => setShowAddModal(true)}>
+ <Plus size={16} />
+ Add Domain
+ </Button>
+ }
+ />
) : (
<div className="domain-list">
{domains.map(domain => (
diff --git a/frontend/src/pages/Git.jsx b/frontend/src/pages/Git.jsx
index f24de2b8..8e45dec8 100644
--- a/frontend/src/pages/Git.jsx
+++ b/frontend/src/pages/Git.jsx
@@ -5,6 +5,8 @@ import { useToast } from '../contexts/ToastContext';
import Spinner from '../components/Spinner';
import ConfirmDialog from '../components/ConfirmDialog';
import { DangerZone } from '../components/DangerZone';
+import EmptyState from '../components/EmptyState';
+import { AlertCircle, FolderGit2, Webhook, Rocket } from 'lucide-react';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Textarea } from '@/components/ui/textarea';
@@ -761,18 +763,12 @@ function Git({ basePath = '/git' }) {
<TabsContent value="repositories">
<div className="repositories-tab">
{!status?.running ? (
- <div className="empty-state">
- <svg viewBox="0 0 24 24" width="48" height="48" stroke="currentColor" fill="none" strokeWidth="1.5">
- <circle cx="12" cy="12" r="10"/>
- <line x1="12" y1="8" x2="12" y2="12"/>
- <line x1="12" y1="16" x2="12.01" y2="16"/>
- </svg>
- <h4>Server Not Running</h4>
- <p>Start the Git server to browse repositories</p>
- <Button onClick={handleStart}>
- Start Server
- </Button>
- </div>
+ <EmptyState
+ icon={AlertCircle}
+ title="Server not running"
+ description="Start the Git server to browse repositories."
+ action={<Button onClick={handleStart}>Start Server</Button>}
+ />
) : repoView === 'list' ? (
<>
<div className="repos-header">
@@ -792,16 +788,12 @@ function Git({ basePath = '/git' }) {
<Spinner />
</div>
) : repositories.length === 0 ? (
- <div className="empty-state">
- <svg viewBox="0 0 24 24" width="48" height="48" stroke="currentColor" fill="none" strokeWidth="1.5">
- <path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/>
- </svg>
- <h4>No Repositories Yet</h4>
- <p>Create your first repository in Gitea</p>
- <Button onClick={openGitea}>
- Open Gitea
- </Button>
- </div>
+ <EmptyState
+ icon={FolderGit2}
+ title="No repositories yet"
+ description="Create your first repository in Gitea."
+ action={<Button onClick={openGitea}>Open Gitea</Button>}
+ />
) : (
<div className="repos-list">
{repositories.map((repo) => (
@@ -1118,17 +1110,12 @@ function Git({ basePath = '/git' }) {
<Spinner />
</div>
) : webhooks.length === 0 ? (
- <div className="empty-state">
- <svg viewBox="0 0 24 24" width="48" height="48" stroke="currentColor" fill="none" strokeWidth="1.5">
- <path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/>
- <path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>
- </svg>
- <h4>No Webhooks Configured</h4>
- <p>Add a webhook to sync repositories from external sources</p>
- <Button onClick={() => setShowWebhookModal(true)}>
- Add Your First Webhook
- </Button>
- </div>
+ <EmptyState
+ icon={Webhook}
+ title="No webhooks configured"
+ description="Add a webhook to sync repositories from external sources."
+ action={<Button onClick={() => setShowWebhookModal(true)}>Add Webhook</Button>}
+ />
) : (
<div className="webhooks-list">
{webhooks.map((webhook) => (
@@ -1229,18 +1216,12 @@ function Git({ basePath = '/git' }) {
<Spinner />
</div>
) : deployments.length === 0 ? (
- <div className="empty-state">
- <svg viewBox="0 0 24 24" width="48" height="48" stroke="currentColor" fill="none" strokeWidth="1.5">
- <path d="M12 2L2 7l10 5 10-5-10-5z"/>
- <path d="M2 17l10 5 10-5"/>
- <path d="M2 12l10 5 10-5"/>
- </svg>
- <h4>No Deployments Yet</h4>
- <p>Configure a webhook with &quot;Deploy on Push&quot; enabled to see deployments here</p>
- <Button onClick={() => setActiveTab('webhooks')}>
- Configure Webhooks
- </Button>
- </div>
+ <EmptyState
+ icon={Rocket}
+ title="No deployments yet"
+ description='Configure a webhook with "Deploy on Push" enabled to see deployments here.'
+ action={<Button onClick={() => setActiveTab('webhooks')}>Configure Webhooks</Button>}
+ />
) : (
<div className="deployments-list">
{deployments.map((deployment) => (
diff --git a/frontend/src/pages/Servers.jsx b/frontend/src/pages/Servers.jsx
index f71db194..77489c8e 100644
--- a/frontend/src/pages/Servers.jsx
+++ b/frontend/src/pages/Servers.jsx
@@ -14,6 +14,7 @@ import {
import api from '../services/api';
import { useToast } from '../contexts/ToastContext';
import { ConfirmDialog } from '../components/ConfirmDialog';
+import EmptyState from '../components/EmptyState';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
@@ -371,36 +372,30 @@ const Servers = () => {
)}
{filteredServers.length === 0 ? (
- <div className="servers-empty-workspace">
- <div className="servers-empty-workspace__icon">
- <ServerLucideIcon size={28} />
- </div>
- <h2>{servers.length === 0 ? 'No servers yet' : 'No servers match these filters'}</h2>
- <p>
- {servers.length === 0
- ? 'Pair an agent to bring a machine into this fleet.'
- : 'Adjust the rail filters or search query to bring machines back into view.'}
- </p>
- <div className="servers-empty-workspace__actions">
- {servers.length === 0 ? (
- <Button onClick={() => setShowAddModal(true)}>
- <Plus size={16} /> Add your first server
- </Button>
- ) : (
- <Button
- type="button"
- variant="outline"
- onClick={() => {
- setSelectedGroup('all');
- setSelectedStatus('all');
- setSearchTerm('');
- }}
- >
- Clear filters
- </Button>
- )}
- </div>
- </div>
+ <EmptyState
+ icon={ServerLucideIcon}
+ title={servers.length === 0 ? 'No servers yet' : 'No servers match these filters'}
+ description={servers.length === 0
+ ? 'Add a server to start managing it from here.'
+ : 'Adjust the filters or search query to see your servers.'}
+ action={servers.length === 0 ? (
+ <Button onClick={() => setShowAddModal(true)}>
+ <Plus size={16} /> Add your first server
+ </Button>
+ ) : (
+ <Button
+ type="button"
+ variant="outline"
+ onClick={() => {
+ setSelectedGroup('all');
+ setSelectedStatus('all');
+ setSearchTerm('');
+ }}
+ >
+ Clear filters
+ </Button>
+ )}
+ />
) : (
<div className="servers-table-wrap">
<table className="servers-table">
diff --git a/frontend/src/styles/pages/_databases.scss b/frontend/src/styles/pages/_databases.scss
index a0d05fc2..6c875368 100644
--- a/frontend/src/styles/pages/_databases.scss
+++ b/frontend/src/styles/pages/_databases.scss
@@ -35,9 +35,7 @@
height: 44px;
flex-shrink: 0;
color: $text-primary;
- background:
- linear-gradient(135deg, fade($color-mysql, 18%), fade($color-postgresql-secondary, 18%)),
- $bg-card;
+ background: $bg-card;
border: 1px solid $border-active;
border-radius: $radius-lg;
}
@@ -347,12 +345,12 @@
font-weight: $font-weight-bold;
&.mysql {
- background: linear-gradient(135deg, $color-mysql-secondary, $color-mysql);
+ background: $color-mysql;
color: white;
}
&.postgresql {
- background: linear-gradient(135deg, $color-postgresql, $color-postgresql-secondary);
+ background: $color-postgresql;
color: white;
}
}
diff --git a/frontend/src/styles/pages/_docker.scss b/frontend/src/styles/pages/_docker.scss
index 7127aec7..13375ba5 100644
--- a/frontend/src/styles/pages/_docker.scss
+++ b/frontend/src/styles/pages/_docker.scss
@@ -928,16 +928,8 @@
@include transition(all);
overflow: hidden;
- &::before {
- content: '';
- position: absolute;
- left: 0; top: 0; bottom: 0;
- width: 3px;
- background: $border-default;
- }
-
- &.is-running::before { background: $success; }
- &.is-stopped::before { background: $text-tertiary; }
+ &.is-running { border-color: fade($success, 40%); }
+ &.is-stopped { border-color: $border-default; }
&:hover {
border-color: $border-hover;
diff --git a/frontend/src/styles/pages/_git.scss b/frontend/src/styles/pages/_git.scss
index 06bbba4a..7186d708 100644
--- a/frontend/src/styles/pages/_git.scss
+++ b/frontend/src/styles/pages/_git.scss
@@ -120,10 +120,10 @@
padding: $space-5;
background: $bg-card;
border-radius: $radius-xl;
- border-left: 4px solid $border-subtle;
+ border: 1px solid $border-subtle;
&.success {
- border-left-color: $success;
+ border-color: fade($success, 45%);
.status-icon {
color: $success;
@@ -131,7 +131,7 @@
}
&.danger {
- border-left-color: $danger;
+ border-color: fade($danger, 45%);
.status-icon {
color: $danger;
@@ -139,7 +139,7 @@
}
&.warning {
- border-left-color: $warning;
+ border-color: fade($warning, 45%);
.status-icon {
color: $warning;
@@ -348,7 +348,7 @@
padding: $space-3;
background: fade($info, 10%);
border-radius: $radius-md;
- border-left: 3px solid $info;
+ border: 1px solid fade($info, 35%);
strong {
color: $text-primary;
@@ -1183,18 +1183,17 @@
border-radius: $radius-lg;
padding: $space-5;
border: 1px solid $border-subtle;
- border-left: 4px solid $border-subtle;
&.success {
- border-left-color: $success;
+ border-color: fade($success, 45%);
}
&.failed {
- border-left-color: $danger;
+ border-color: fade($danger, 45%);
}
&.running {
- border-left-color: $warning;
+ border-color: fade($warning, 45%);
}
.deployment-header {
diff --git a/frontend/src/styles/pages/_servers.scss b/frontend/src/styles/pages/_servers.scss
index 96d526d3..e0b3f59c 100644
--- a/frontend/src/styles/pages/_servers.scss
+++ b/frontend/src/styles/pages/_servers.scss
@@ -148,7 +148,6 @@
background:
linear-gradient(180deg, $accent-glow, transparent),
$bg-card;
- backdrop-filter: blur(16px);
box-shadow: $shadow-sm;
}
@@ -248,7 +247,6 @@
border: 1px solid $border-subtle;
border-radius: $radius-2xl;
background: $bg-card;
- backdrop-filter: blur(12px);
box-shadow: $shadow-sm;
@media (max-width: $breakpoint-lg) {
@@ -1847,12 +1845,11 @@
background: $bg-elevated;
border: 1px solid $border-subtle;
border-radius: $radius-lg;
- border-left: 3px solid $text-tertiary;
- &.severity-critical { border-left-color: $danger; }
- &.severity-high { border-left-color: $warning; }
- &.severity-medium { border-left-color: $accent-primary; }
- &.severity-low { border-left-color: $text-tertiary; }
+ &.severity-critical { border-color: fade($danger, 45%); }
+ &.severity-high { border-color: fade($warning, 45%); }
+ &.severity-medium { border-color: fade($accent-primary-raw, 45%); }
+ &.severity-low { border-color: $border-subtle; }
}
.alert-item-header {
@@ -3887,7 +3884,6 @@
padding: $space-4 $space-5;
background: $bg-card;
border: 1px solid $border-subtle;
- border-left-width: 3px;
border-radius: $radius-lg;
box-shadow: $shadow-sm;
@@ -3921,17 +3917,17 @@
}
&--info {
- border-left-color: $accent-primary;
+ border-color: fade($accent-primary-raw, 45%);
.notification__icon { background: $accent-glow; color: $accent-primary; }
}
&--warning {
- border-left-color: $warning;
+ border-color: fade($warning, 45%);
.notification__icon { background: $warning-bg; color: $warning; }
}
&--danger {
- border-left-color: $danger;
+ border-color: fade($danger, 45%);
.notification__icon { background: $danger-bg; color: $danger; }
}
}
diff --git a/frontend/src/styles/pages/_wordpress.scss b/frontend/src/styles/pages/_wordpress.scss
index 8b84bd63..df63a22a 100644
--- a/frontend/src/styles/pages/_wordpress.scss
+++ b/frontend/src/styles/pages/_wordpress.scss
@@ -214,7 +214,7 @@
.wp-site-icon {
width: 40px;
height: 40px;
- background: linear-gradient(135deg, $color-wordpress 0%, #1a5f7f 100%);
+ background: $color-wordpress;
border-radius: $radius-md;
display: flex;
align-items: center;
@@ -378,7 +378,7 @@
// WordPress Detail Page
.wp-detail-page {
.wp-icon {
- background: linear-gradient(135deg, $color-wordpress 0%, #1a5f7f 100%) !important;
+ background: $color-wordpress !important;
}
}