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 Email Server body to the new look

Juan Denisbc7edde302ff
diff --git a/frontend/src/pages/Email.jsx b/frontend/src/pages/Email.jsx
index 3626fa4b..64ec3a17 100644
--- a/frontend/src/pages/Email.jsx
+++ b/frontend/src/pages/Email.jsx
@@ -1,5 +1,5 @@
import { useState, useEffect, useCallback } from 'react';
-import { Globe, AtSign, Forward, Server, Inbox } from 'lucide-react';
+import { Globe, AtSign, Forward, Server, Inbox, Mail, Send, KeyRound, ShieldAlert, ShieldCheck, AppWindow } from 'lucide-react';
import useTabParam from '../hooks/useTabParam';
import { api } from '../services/api';
import { useToast } from '../contexts/ToastContext';
@@ -8,11 +8,38 @@ import EmptyState from '../components/EmptyState';
import ConfirmDialog from '../components/ConfirmDialog';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
-import { Badge } from '@/components/ui/badge';
import { Tabs, TabsList, TabsTrigger, TabsContent } from '@/components/ui/tabs';
+import { Pill, MetricCard } from '@/components/ds';
const VALID_TABS = ['status', 'domains', 'accounts', 'aliases', 'forwarding', 'dns-providers', 'spam', 'webmail', 'queue'];
+const TAB_LABELS = {
+ 'dns-providers': 'DNS Providers',
+ queue: 'Queue & Logs',
+};
+
+const SERVICE_ICONS = {
+ postfix: Send,
+ dovecot: Inbox,
+ opendkim: KeyRound,
+ spamassassin: ShieldAlert,
+ roundcube: AppWindow,
+};
+
+// running → green / stopped → red / not installed → gray
+function statusPill(data) {
+ if (data?.running) return <Pill kind="green">running</Pill>;
+ if (data?.installed) return <Pill kind="red">stopped</Pill>;
+ return <Pill kind="gray">not installed</Pill>;
+}
+
+// DKIM/SPF/DMARC presence (record configured vs missing)
+function dnsPill(value) {
+ return value
+ ? <Pill kind="green" dot={false}>set</Pill>
+ : <Pill kind="amber" dot={false}>missing</Pill>;
+}
+
function Email() {
const [activeTab, setActiveTab] = useTabParam('/email', VALID_TABS);
const [status, setStatus] = useState(null);
@@ -459,35 +486,42 @@ function Email() {
const isInstalled = status?.installed;
- const ServiceCard = ({ name, data, component }) => (
- <div className="email-service-card">
- <div className="email-service-header">
- <div>
- <h3>{name}</h3>
- {data?.version && <span className="version">v{data.version}</span>}
+ // Real counts from the loaded domains payload (KPI strip, Domains tab)
+ const totalMailboxes = domains.reduce((n, d) => n + (d.accounts_count || 0), 0);
+ const totalAliases = domains.reduce((n, d) => n + (d.aliases_count || 0), 0);
+ const dnsReadyCount = domains.filter(d => d.dkim_public_key && d.spf_record && d.dmarc_record).length;
+
+ const ServiceCard = ({ name, data, component }) => {
+ const Icon = SERVICE_ICONS[component] || Server;
+ return (
+ <div className="email-service-card">
+ <div className="email-service-header">
+ <span className="email-service-ico"><Icon size={15} /></span>
+ <div className="email-service-id">
+ <h3>{name}</h3>
+ {data?.version && <span className="version">v{data.version}</span>}
+ </div>
+ {statusPill(data)}
</div>
- <Badge variant={data?.running ? 'success' : 'secondary'}>
- {data?.running ? 'Running' : data?.installed ? 'Stopped' : 'Not Installed'}
- </Badge>
+ {data?.installed && (
+ <div className="email-service-actions">
+ <Button size="sm" variant="outline" onClick={() => handleServiceControl(component, 'restart')} disabled={actionLoading}>Restart</Button>
+ {data?.running
+ ? <Button size="sm" variant="outline" onClick={() => handleServiceControl(component, 'stop')} disabled={actionLoading}>Stop</Button>
+ : <Button size="sm" onClick={() => handleServiceControl(component, 'start')} disabled={actionLoading}>Start</Button>
+ }
+ </div>
+ )}
</div>
- {data?.installed && (
- <div className="email-service-actions">
- <Button size="sm" variant="outline" onClick={() => handleServiceControl(component, 'restart')} disabled={actionLoading}>Restart</Button>
- {data?.running
- ? <Button size="sm" variant="outline" onClick={() => handleServiceControl(component, 'stop')} disabled={actionLoading}>Stop</Button>
- : <Button size="sm" onClick={() => handleServiceControl(component, 'start')} disabled={actionLoading}>Start</Button>
- }
- </div>
- )}
- </div>
- );
+ );
+ };
return (
<div className="page-container email-page">
<div className="page-header">
<div className="page-header-content">
<h1>Email Server</h1>
- <p className="page-description">Manage Postfix, Dovecot, DKIM, SpamAssassin, and Roundcube</p>
+ <p className="page-description">Postfix · Dovecot · DKIM · SpamAssassin · Roundcube</p>
</div>
<div className="page-header-actions">
<Button size="sm" variant="outline" onClick={loadStatus}>Refresh</Button>
@@ -496,7 +530,7 @@ function Email() {
{!isInstalled ? (
<div className="not-installed">
- <div className="icon">&#9993;</div>
+ <div className="not-installed__icon"><Mail size={22} /></div>
<h2>Email Server Not Installed</h2>
<p>Install Postfix, Dovecot, OpenDKIM, and SpamAssassin to enable email hosting.</p>
<div className="install-form">
@@ -515,7 +549,7 @@ function Email() {
<TabsList>
{VALID_TABS.map(tab => (
<TabsTrigger key={tab} value={tab}>
- {tab === 'dns-providers' ? 'DNS Providers' : tab.charAt(0).toUpperCase() + tab.slice(1)}
+ {TAB_LABELS[tab] || tab.charAt(0).toUpperCase() + tab.slice(1)}
</TabsTrigger>
))}
</TabsList>
@@ -536,6 +570,14 @@ function Email() {
{/* Domains Tab */}
<TabsContent value="domains">
<div className="email-domains">
+ {domains.length > 0 && (
+ <div className="email-kpis">
+ <MetricCard icon={<Globe size={17} />} tone="accent" value={domains.length} label="Mail domains" />
+ <MetricCard icon={<AtSign size={17} />} tone="cyan" value={totalMailboxes} label="Mailboxes" />
+ <MetricCard icon={<Forward size={17} />} tone="violet" value={totalAliases} label="Aliases" />
+ <MetricCard icon={<ShieldCheck size={17} />} tone="green" value={dnsReadyCount} unit={`/ ${domains.length}`} label="DNS configured" />
+ </div>
+ )}
<div className="section-header">
<h2>Email Domains</h2>
<Button size="sm" variant={showDomainForm ? 'outline' : 'default'} onClick={() => setShowDomainForm(!showDomainForm)}>
@@ -555,34 +597,51 @@ function Email() {
</div>
</form>
)}
- <div className="domain-list">
- {domains.length === 0 ? (
- <EmptyState icon={Globe} title="No domains configured" />
- ) : domains.map(d => (
- <div key={d.id} className="domain-card">
- <div className="domain-header">
- <h3>{d.name}</h3>
- <Badge variant={d.is_active ? 'success' : 'secondary'}>
- {d.is_active ? 'Active' : 'Inactive'}
- </Badge>
- </div>
- <div className="domain-stats">
- <span>{d.accounts_count} accounts</span>
- <span>{d.aliases_count} aliases</span>
- </div>
- <div className="domain-dns">
- <span className={`dns-badge ${d.dkim_public_key ? 'verified' : 'missing'}`}>DKIM</span>
- <span className={`dns-badge ${d.spf_record ? 'verified' : 'missing'}`}>SPF</span>
- <span className={`dns-badge ${d.dmarc_record ? 'verified' : 'missing'}`}>DMARC</span>
- </div>
- <div className="domain-actions">
- <Button size="sm" variant="outline" onClick={() => handleVerifyDNS(d.id)} disabled={actionLoading}>Verify DNS</Button>
- {d.dns_provider_id && <Button size="sm" onClick={() => handleDeployDNS(d.id)} disabled={actionLoading}>Deploy DNS</Button>}
- <Button size="sm" variant="destructive" onClick={() => handleDeleteDomain(d.id, d.name)}>Delete</Button>
- </div>
- </div>
- ))}
- </div>
+ {domains.length === 0 ? (
+ <EmptyState icon={Globe} title="No domains configured" />
+ ) : (
+ <div className="email-table-card">
+ <table className="sk-dtable">
+ <thead>
+ <tr>
+ <th>Domain</th>
+ <th>Mailboxes</th>
+ <th>Aliases</th>
+ <th>DKIM</th>
+ <th>SPF</th>
+ <th>DMARC</th>
+ <th>Status</th>
+ <th />
+ </tr>
+ </thead>
+ <tbody>
+ {domains.map(d => (
+ <tr key={d.id}>
+ <td>
+ <div className="sk-cell-name">
+ <span className="email-fav"><Globe size={15} /></span>
+ {d.name}
+ </div>
+ </td>
+ <td className="sk-cell-mono">{d.accounts_count}</td>
+ <td className="sk-cell-mono">{d.aliases_count}</td>
+ <td>{dnsPill(d.dkim_public_key)}</td>
+ <td>{dnsPill(d.spf_record)}</td>
+ <td>{dnsPill(d.dmarc_record)}</td>
+ <td><Pill kind={d.is_active ? 'green' : 'gray'}>{d.is_active ? 'active' : 'inactive'}</Pill></td>
+ <td>
+ <div className="email-row-actions">
+ <Button size="sm" variant="outline" onClick={() => handleVerifyDNS(d.id)} disabled={actionLoading}>Verify DNS</Button>
+ {d.dns_provider_id && <Button size="sm" onClick={() => handleDeployDNS(d.id)} disabled={actionLoading}>Deploy DNS</Button>}
+ <Button size="sm" variant="destructive" onClick={() => handleDeleteDomain(d.id, d.name)}>Delete</Button>
+ </div>
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ )}
</div>
</TabsContent>
@@ -627,27 +686,42 @@ function Email() {
</div>
</form>
)}
- <div className="accounts-list">
- {accounts.length === 0 ? (
- <EmptyState icon={AtSign} title="No accounts for this domain" />
- ) : accounts.map(a => (
- <div key={a.id} className="account-card">
- <div className="account-info">
- <div className="account-email">{a.email}</div>
- <div className="account-meta">
- <span>Quota: {a.quota_mb}MB</span>
- <Badge variant={a.is_active ? 'success' : 'secondary'}>
- {a.is_active ? 'Active' : 'Disabled'}
- </Badge>
- </div>
- </div>
- <div className="account-actions">
- <Button size="sm" variant="outline" onClick={() => { setShowPasswordModal(a.id); setNewPassword(''); }}>Password</Button>
- <Button size="sm" variant="destructive" onClick={() => handleDeleteAccount(a.id, a.email)}>Delete</Button>
- </div>
- </div>
- ))}
- </div>
+ {accounts.length === 0 ? (
+ <EmptyState icon={AtSign} title="No accounts for this domain" />
+ ) : (
+ <div className="email-table-card">
+ <table className="sk-dtable">
+ <thead>
+ <tr>
+ <th>Address</th>
+ <th>Quota</th>
+ <th>Status</th>
+ <th />
+ </tr>
+ </thead>
+ <tbody>
+ {accounts.map(a => (
+ <tr key={a.id}>
+ <td>
+ <div className="sk-cell-name">
+ <span className="email-fav email-fav--cyan"><AtSign size={14} /></span>
+ <span className="email-addr">{a.email}</span>
+ </div>
+ </td>
+ <td className="sk-cell-mono">{a.quota_mb} MB</td>
+ <td><Pill kind={a.is_active ? 'green' : 'gray'}>{a.is_active ? 'active' : 'disabled'}</Pill></td>
+ <td>
+ <div className="email-row-actions">
+ <Button size="sm" variant="outline" onClick={() => { setShowPasswordModal(a.id); setNewPassword(''); }}>Password</Button>
+ <Button size="sm" variant="destructive" onClick={() => handleDeleteAccount(a.id, a.email)}>Delete</Button>
+ </div>
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ )}
</>
)}
{showPasswordModal && (
@@ -705,20 +779,36 @@ function Email() {
</div>
</form>
)}
- <div className="items-list">
- {aliases.length === 0 ? (
- <EmptyState icon={Forward} title="No aliases for this domain" />
- ) : aliases.map(a => (
- <div key={a.id} className="alias-card">
- <div className="item-info">
- <div className="item-mapping">{a.source} <span className="arrow">&rarr;</span> {a.destination}</div>
- </div>
- <div className="item-actions">
- <Button size="sm" variant="destructive" onClick={() => handleDeleteAlias(a.id)}>Delete</Button>
- </div>
- </div>
- ))}
- </div>
+ {aliases.length === 0 ? (
+ <EmptyState icon={Forward} title="No aliases for this domain" />
+ ) : (
+ <div className="email-table-card">
+ <table className="sk-dtable">
+ <thead>
+ <tr>
+ <th>Source</th>
+ <th style={{ width: 30 }} />
+ <th>Destination</th>
+ <th />
+ </tr>
+ </thead>
+ <tbody>
+ {aliases.map(a => (
+ <tr key={a.id}>
+ <td className="sk-cell-mono">{a.source}</td>
+ <td className="email-arrow">&rarr;</td>
+ <td className="sk-cell-mono">{a.destination}</td>
+ <td>
+ <div className="email-row-actions">
+ <Button size="sm" variant="destructive" onClick={() => handleDeleteAlias(a.id)}>Delete</Button>
+ </div>
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ )}
</>
)}
</div>
@@ -752,7 +842,7 @@ function Email() {
<Input type="email" value={newForward.destination} onChange={e => setNewForward({ ...newForward, destination: e.target.value })} required />
</div>
<div className="form-group">
- <label>
+ <label className="email-check">
<input type="checkbox" checked={newForward.keep_copy} onChange={e => setNewForward({ ...newForward, keep_copy: e.target.checked })} />
{' '}Keep a copy in mailbox
</label>
@@ -763,21 +853,40 @@ function Email() {
</div>
</form>
)}
- <div className="items-list">
- {forwardingRules.length === 0 ? (
- <EmptyState icon={Forward} title="No forwarding rules" />
- ) : forwardingRules.map(r => (
- <div key={r.id} className="forwarding-card">
- <div className="item-info">
- <div className="item-mapping">{r.account_email} <span className="arrow">&rarr;</span> {r.destination}</div>
- <div className="item-meta">{r.keep_copy ? 'Keeps copy' : 'No copy'} &middot; {r.is_active ? 'Active' : 'Inactive'}</div>
- </div>
- <div className="item-actions">
- <Button size="sm" variant="destructive" onClick={() => handleDeleteForwarding(r.id)}>Delete</Button>
- </div>
- </div>
- ))}
- </div>
+ {forwardingRules.length === 0 ? (
+ <EmptyState icon={Forward} title="No forwarding rules" />
+ ) : (
+ <div className="email-table-card">
+ <table className="sk-dtable">
+ <thead>
+ <tr>
+ <th>Mailbox</th>
+ <th style={{ width: 30 }} />
+ <th>Forward To</th>
+ <th>Copy</th>
+ <th>Status</th>
+ <th />
+ </tr>
+ </thead>
+ <tbody>
+ {forwardingRules.map(r => (
+ <tr key={r.id}>
+ <td className="sk-cell-mono">{r.account_email}</td>
+ <td className="email-arrow">&rarr;</td>
+ <td className="sk-cell-mono">{r.destination}</td>
+ <td><Pill kind={r.keep_copy ? 'cyan' : 'gray'} dot={false}>{r.keep_copy ? 'keeps copy' : 'no copy'}</Pill></td>
+ <td><Pill kind={r.is_active ? 'green' : 'gray'}>{r.is_active ? 'active' : 'inactive'}</Pill></td>
+ <td>
+ <div className="email-row-actions">
+ <Button size="sm" variant="destructive" onClick={() => handleDeleteForwarding(r.id)}>Delete</Button>
+ </div>
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ )}
</>
)}
</div>
@@ -816,11 +925,13 @@ function Email() {
) : providers.map(p => (
<div key={p.id} className="provider-card">
<div className="provider-header">
+ <span className="email-fav email-fav--violet"><Server size={15} /></span>
<h3>{p.name}</h3>
<span className="provider-type">{p.provider}</span>
+ {p.is_default && <Pill kind="cyan" dot={false}>default</Pill>}
</div>
<div className="provider-meta">
- <div className="meta-row"><span>API Key: {p.api_key}</span>{p.is_default && <span><strong>Default</strong></span>}</div>
+ <div className="meta-row"><span className="k">API key</span><span className="v">{p.api_key}</span></div>
</div>
<div className="provider-actions">
<Button size="sm" variant="outline" onClick={() => handleTestProvider(p.id)} disabled={actionLoading}>Test</Button>
@@ -881,10 +992,8 @@ function Email() {
<div className="section-header"><h2>Roundcube Webmail</h2></div>
<div className="webmail-card">
<div className="webmail-status-row">
- <Badge variant={webmailStatus?.running ? 'success' : 'secondary'}>
- {webmailStatus?.running ? 'Running' : webmailStatus?.installed ? 'Stopped' : 'Not Installed'}
- </Badge>
- {webmailStatus?.port && <span>Port: {webmailStatus.port}</span>}
+ {statusPill(webmailStatus)}
+ {webmailStatus?.port && <span className="webmail-port">Port: {webmailStatus.port}</span>}
</div>
<div className="webmail-actions">
{!webmailStatus?.installed ? (
@@ -920,26 +1029,45 @@ function Email() {
<h2>Mail Queue ({queue.length})</h2>
<Button size="sm" variant="outline" onClick={handleFlushQueue} disabled={actionLoading}>Flush Queue</Button>
</div>
- <div className="queue-list">
- {queue.length === 0 ? (
- <EmptyState icon={Inbox} title="Queue is empty" />
- ) : queue.map(item => (
- <div key={item.queue_id} className="queue-item">
- <div className="queue-info">
- <div className="queue-id">{item.queue_id}</div>
- <div className="queue-meta">
- <span>From: {item.sender}</span>
- <span>Size: {item.size}B</span>
- <span>{item.arrival_time}</span>
- </div>
- {item.error && <div className="queue-error">{item.error}</div>}
- </div>
- <Button size="sm" variant="destructive" onClick={() => handleDeleteQueueItem(item.queue_id)}>Delete</Button>
- </div>
- ))}
- </div>
+ {queue.length === 0 ? (
+ <EmptyState icon={Inbox} title="Queue is empty" />
+ ) : (
+ <div className="email-table-card">
+ <table className="sk-dtable">
+ <thead>
+ <tr>
+ <th>Queue ID</th>
+ <th>From</th>
+ <th>Recipients</th>
+ <th>Size</th>
+ <th>Arrived</th>
+ <th />
+ </tr>
+ </thead>
+ <tbody>
+ {queue.map(item => (
+ <tr key={item.queue_id}>
+ <td className="sk-cell-mono email-qid">{item.queue_id}</td>
+ <td className="sk-cell-mono">{item.sender}</td>
+ <td>
+ <span className="sk-cell-mono">{(item.recipients || []).join(', ') || '—'}</span>
+ {item.error && <div className="email-qerr">{item.error}</div>}
+ </td>
+ <td className="sk-cell-mono">{item.size}B</td>
+ <td className="sk-cell-mono">{item.arrival_time}</td>
+ <td>
+ <div className="email-row-actions">
+ <Button size="sm" variant="destructive" onClick={() => handleDeleteQueueItem(item.queue_id)}>Delete</Button>
+ </div>
+ </td>
+ </tr>
+ ))}
+ </tbody>
+ </table>
+ </div>
+ )}
</div>
- <div className="email-logs mt-8">
+ <div className="email-logs">
<div className="section-header">
<h2>Mail Logs</h2>
<div className="log-controls">
diff --git a/frontend/src/styles/pages/_email.scss b/frontend/src/styles/pages/_email.scss
index 45fbcefa..81e3e37b 100644
--- a/frontend/src/styles/pages/_email.scss
+++ b/frontend/src/styles/pages/_email.scss
@@ -1,33 +1,20 @@
// ============================================
-// EMAIL SERVER PAGE STYLES
+// EMAIL SERVER PAGE (redesign — infra console look, REDESIGN_MAP #18):
+// status Pills on per-service cards, MetricCard KPI strip (Domains tab),
+// dense .sk-dtable lists (domains / accounts / aliases / forwarding / queue),
+// mono-uppercase eyebrow section headers, token surfaces, --bg-code logs.
+// Mail-volume chart, reputation/RBL ring, structured activity feed,
+// per-mailbox storage gauges and per-message retry are intentionally
+// absent — no backend yet (REDESIGN_MAP §5).
// ============================================
.email-page {
- .page-header {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- margin-bottom: $space-6;
- flex-wrap: wrap;
- gap: $space-4;
- .page-header-content {
- h1 {
- font-size: 24px;
- font-weight: $font-weight-semibold;
- margin: 0 0 4px 0;
- }
-
- .page-description {
- color: $text-secondary;
- margin: 0;
- }
- }
-
- .page-header-actions {
- display: flex;
- gap: $space-2;
- }
+ // Page header (global base in layout/_main-content) — mono meta line
+ .page-header .page-description {
+ font-family: var(--mono);
+ font-size: 11.5px;
+ color: var(--text-faint);
}
.page-loading {
@@ -37,62 +24,112 @@
min-height: 400px;
}
- .tab-navigation {
- display: flex;
- gap: $space-2;
- margin-bottom: $space-6;
- border-bottom: 1px solid $border-subtle;
+ // ── In-page tab strip (shadcn Tabs → .tabs/.tab) ────────
+ // Demo `.bk-tab` accent-wash pills. Tab ids/keys + ?tab= deep-links
+ // are untouched (JSX keeps the same VALID_TABS values).
+ .tabs {
+ gap: 4px;
padding-bottom: $space-2;
- overflow-x: auto;
+ margin-bottom: $space-5;
+ border-bottom: 1px solid var(--border-soft);
+ }
+
+ .tab {
+ padding: 7px 14px;
+ border-bottom: none;
+ margin-bottom: 0;
+ border-radius: 9px;
+ font-size: 13px;
+ font-weight: $font-weight-medium;
+ color: var(--text-faint);
+
+ &:hover {
+ color: var(--text);
+ background: var(--surface-2);
+ }
- .tab-button {
- padding: $space-2 $space-4;
- border: none;
- background: none;
- color: $text-secondary;
- cursor: pointer;
- border-radius: $radius-md;
- white-space: nowrap;
- font-size: $font-size-sm;
- transition: all 0.2s;
-
- &:hover {
- background: $bg-hover;
- color: $text-primary;
- }
+ &.active,
+ &[data-state='active'] {
+ color: var(--accent-bright);
+ background: var(--accent-bg);
+ }
+ }
- &.active {
- background: $accent-primary;
- color: white;
- }
+ // ── Section headers → mono-uppercase eyebrows ───────────
+ .section-header {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ gap: $space-3;
+ margin-bottom: $space-3;
+
+ h2 {
+ 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);
}
+
+ .section-actions {
+ display: flex;
+ gap: $space-2;
+ }
+ }
+
+ // Eyebrow field labels (forms + selectors); checkbox rows keep sentence case
+ .form-group:not(.checkbox-field) > label:not(.email-check) {
+ font-family: var(--mono);
+ font-size: 10px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--text-faint);
}
- // Not-installed state
+ .domain-selector {
+ max-width: 340px;
+ margin-bottom: $space-4;
+ }
+
+ // ── Not-installed install flow (method-card look) ───────
.not-installed {
display: flex;
flex-direction: column;
align-items: center;
- justify-content: center;
- padding: 80px $space-6;
- background: $bg-card;
- border-radius: $radius-lg;
+ max-width: 520px;
+ margin: $space-8 auto 0;
+ padding: 48px 40px;
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius-lg);
text-align: center;
- .icon {
- font-size: 64px;
- color: $text-tertiary;
+ &__icon {
+ width: 46px;
+ height: 46px;
+ border-radius: 12px;
+ display: grid;
+ place-items: center;
+ background: var(--accent-bg);
+ color: var(--accent-bright);
margin-bottom: $space-4;
}
h2 {
- margin: 0 0 $space-2 0;
+ margin: 0 0 $space-2;
+ font-size: 17px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: -0.01em;
}
p {
- color: $text-secondary;
- margin: 0 0 $space-6 0;
- max-width: 480px;
+ margin: 0 0 $space-6;
+ font-size: 13px;
+ line-height: 1.55;
+ color: var(--text-dim);
}
.install-form {
@@ -101,408 +138,334 @@
gap: $space-4;
align-items: center;
width: 100%;
- max-width: 400px;
- }
- }
+ max-width: 380px;
- .section-header {
- display: flex;
- justify-content: space-between;
- align-items: center;
- margin-bottom: $space-4;
-
- h2 {
- margin: 0;
- font-size: $font-size-lg;
- font-weight: $font-weight-semibold;
- }
-
- .section-actions {
- display: flex;
- gap: $space-2;
+ .form-group {
+ margin-bottom: 0;
+ text-align: left;
+ }
}
}
-}
-// ── Status Tab ──
-
-.email-status {
- .status-grid {
+ // ── KPI strip (Domains tab — real counts only) ──────────
+ .email-kpis {
display: grid;
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
+ grid-template-columns: repeat(4, 1fr);
gap: $space-4;
- margin-bottom: $space-6;
+ margin-bottom: $space-5;
+
+ @media (max-width: $breakpoint-lg) { grid-template-columns: repeat(2, 1fr); }
+ @media (max-width: $breakpoint-sm) { grid-template-columns: 1fr; }
}
-}
-.email-service-card {
- background: $bg-card;
- border-radius: $radius-lg;
- border: 1px solid $border-subtle;
- padding: $space-5;
-}
+ // ── Card-wrapped dense tables (.sk-dtable spec) ─────────
+ .email-table-card {
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ overflow-x: auto;
+ }
-.email-service-header {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- gap: $space-4;
+ // Tinted icon tile for name cells (domains / mailboxes / providers)
+ .email-fav {
+ width: 30px;
+ height: 30px;
+ border-radius: 8px;
+ display: grid;
+ place-items: center;
+ flex-shrink: 0;
+ background: var(--accent-bg);
+ color: var(--accent-bright);
- h3 {
- margin: 0 0 $space-1 0;
- font-size: $font-size-md;
- font-weight: $font-weight-semibold;
+ &--cyan { background: var(--cyan-bg); color: var(--cyan); }
+ &--violet { background: var(--violet-bg); color: var(--violet); }
}
- .version {
- font-size: $font-size-xs;
- color: $text-tertiary;
+ .email-addr {
+ font-family: var(--mono);
+ font-size: 12.5px;
+ color: var(--text);
}
-}
-.email-service-meta {
- margin-top: $space-3;
- font-size: $font-size-sm;
- color: $text-secondary;
+ .email-arrow {
+ font-family: var(--mono);
+ font-size: 12px;
+ color: var(--text-ghost);
+ }
- .meta-item {
+ .email-row-actions {
display: flex;
- justify-content: space-between;
- padding: $space-1 0;
+ justify-content: flex-end;
+ gap: 6px;
+ flex-wrap: wrap;
}
-}
-.email-service-actions {
- display: flex;
- gap: $space-2;
- margin-top: $space-4;
- padding-top: $space-4;
- border-top: 1px solid $border-subtle;
-}
-
-// ── Domains Tab ──
-
-.email-domains {
- .domain-list {
- display: flex;
- flex-direction: column;
+ // ── Status tab: per-service cards ───────────────────────
+ .status-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
gap: $space-4;
}
-}
-.domain-card {
- background: $bg-card;
- border-radius: $radius-lg;
- border: 1px solid $border-subtle;
- padding: $space-5;
+ .email-service-card {
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ padding: 15px 16px;
+ transition: border-color $transition-fast;
- .domain-header {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- margin-bottom: $space-3;
+ &:hover { border-color: var(--border-strong); }
+ }
- h3 {
- margin: 0;
- font-size: $font-size-md;
- }
+ .email-service-ico {
+ width: 30px;
+ height: 30px;
+ border-radius: 8px;
+ display: grid;
+ place-items: center;
+ flex-shrink: 0;
+ background: var(--surface-2);
+ color: var(--text-dim);
}
- .domain-stats {
+ .email-service-header {
display: flex;
- gap: $space-6;
- margin-bottom: $space-3;
- font-size: $font-size-sm;
- color: $text-secondary;
+ align-items: center;
+ gap: 10px;
- span {
- display: flex;
- align-items: center;
- gap: $space-1;
+ .email-service-id {
+ flex: 1;
+ min-width: 0;
}
- }
-
- .domain-dns {
- display: flex;
- gap: $space-2;
- flex-wrap: wrap;
- margin-bottom: $space-3;
- .dns-badge {
- font-size: $font-size-xs;
- padding: 2px $space-2;
- border-radius: $radius-sm;
- background: $bg-elevated;
- border: 1px solid $border-subtle;
- color: $text-secondary;
-
- &.verified {
- background: $bg-elevated;
- border-color: $success;
- color: $success;
- }
+ h3 {
+ margin: 0;
+ font-size: 13.5px;
+ font-weight: $font-weight-semibold;
+ }
- &.missing {
- background: $bg-elevated;
- border-color: $danger;
- color: $danger;
- }
+ .version {
+ display: block;
+ margin-top: 2px;
+ font-family: var(--mono);
+ font-size: 10.5px;
+ color: var(--text-faint);
}
+
+ .sk-pill { flex-shrink: 0; }
}
- .domain-actions {
+ .email-service-actions {
display: flex;
gap: $space-2;
- padding-top: $space-3;
- border-top: 1px solid $border-subtle;
+ margin-top: 14px;
+ padding-top: 13px;
+ border-top: 1px solid var(--border-soft);
}
-}
-
-// ── Accounts Tab ──
-.email-accounts {
- .domain-selector {
+ // ── Inline create/edit forms ────────────────────────────
+ .email-form {
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ padding: $space-5;
margin-bottom: $space-4;
- }
-
- .accounts-list {
- display: flex;
- flex-direction: column;
- gap: $space-3;
- }
-}
-.account-card {
- background: $bg-card;
- border-radius: $radius-md;
- border: 1px solid $border-subtle;
- padding: $space-4;
- display: flex;
- justify-content: space-between;
- align-items: center;
- gap: $space-4;
- flex-wrap: wrap;
+ .form-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
+ gap: $space-4;
+ margin-bottom: $space-4;
+ align-items: end;
- .account-info {
- .account-email {
- font-weight: $font-weight-medium;
- margin-bottom: $space-1;
+ .form-group { margin-bottom: 0; }
}
- .account-meta {
- font-size: $font-size-sm;
- color: $text-secondary;
+ .form-actions {
display: flex;
- gap: $space-4;
+ gap: $space-2;
+ justify-content: flex-end;
}
}
- .account-actions {
+ // Checkbox row label (forwarding keep-copy)
+ .email-check {
display: flex;
+ align-items: center;
gap: $space-2;
+ font-size: 13px;
+ color: var(--text-dim);
+ cursor: pointer;
+
+ input[type='checkbox'] {
+ width: 15px;
+ height: 15px;
+ accent-color: var(--accent);
+ }
}
-}
-// ── Form styles ──
+ // ── Queue error sub-line + queue id emphasis ────────────
+ .email-qid { color: var(--text); }
-.email-form {
- background: $bg-card;
- border-radius: $radius-lg;
- border: 1px solid $border-subtle;
- padding: $space-5;
- margin-bottom: $space-4;
-
- .form-title {
- font-size: $font-size-md;
- font-weight: $font-weight-semibold;
- margin: 0 0 $space-4 0;
+ .email-qerr {
+ margin-top: 3px;
+ font-family: var(--mono);
+ font-size: 11px;
+ color: var(--red);
}
- .form-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
- gap: $space-4;
- margin-bottom: $space-4;
- }
-
- .form-actions {
- display: flex;
- gap: $space-2;
- justify-content: flex-end;
- }
-}
+ .email-queue { margin-bottom: $space-6; }
-// ── Aliases & Forwarding ──
-
-.email-aliases,
-.email-forwarding {
- .items-list {
+ // ── DNS providers ───────────────────────────────────────
+ .provider-list {
display: flex;
flex-direction: column;
gap: $space-3;
}
-}
-.alias-card,
-.forwarding-card {
- background: $bg-card;
- border-radius: $radius-md;
- border: 1px solid $border-subtle;
- padding: $space-4;
- display: flex;
- justify-content: space-between;
- align-items: center;
- gap: $space-4;
- flex-wrap: wrap;
+ .provider-card {
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ padding: 15px 16px;
+ transition: border-color $transition-fast;
- .item-info {
- .item-mapping {
- font-weight: $font-weight-medium;
- margin-bottom: $space-1;
+ &:hover { border-color: var(--border-strong); }
+
+ .provider-header {
display: flex;
align-items: center;
- gap: $space-2;
+ gap: 10px;
- .arrow {
- color: $text-tertiary;
+ h3 {
+ margin: 0;
+ font-size: 13.5px;
+ font-weight: $font-weight-semibold;
}
}
- .item-meta {
- font-size: $font-size-sm;
- color: $text-secondary;
- }
- }
-
- .item-actions {
- display: flex;
- gap: $space-2;
- }
-}
-
-// ── DNS Providers Tab ──
-
-.email-dns-providers {
- .provider-list {
- display: flex;
- flex-direction: column;
- gap: $space-4;
- }
-}
-
-.provider-card {
- background: $bg-card;
- border-radius: $radius-lg;
- border: 1px solid $border-subtle;
- padding: $space-5;
-
- .provider-header {
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- margin-bottom: $space-3;
-
- h3 {
- margin: 0;
- font-size: $font-size-md;
- }
-
.provider-type {
- font-size: $font-size-xs;
- padding: 2px $space-2;
- border-radius: $radius-sm;
- background: $bg-elevated;
+ padding: 2px 7px;
+ border: 1px solid var(--border-strong);
+ border-radius: 5px;
+ background: var(--surface-2);
+ color: var(--text-dim);
+ font-family: var(--mono);
+ font-size: 10.5px;
+ font-weight: $font-weight-semibold;
+ letter-spacing: 0.06em;
text-transform: uppercase;
- letter-spacing: 0.5px;
}
- }
-
- .provider-meta {
- font-size: $font-size-sm;
- color: $text-secondary;
- margin-bottom: $space-3;
- .meta-row {
- display: flex;
- gap: $space-4;
- padding: $space-1 0;
+ .provider-meta {
+ margin-top: 12px;
+
+ .meta-row {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ gap: $space-4;
+
+ .k {
+ font-family: var(--mono);
+ font-size: 12px;
+ color: var(--text-faint);
+ }
+
+ .v {
+ font-family: var(--mono);
+ font-size: 12.5px;
+ color: var(--text);
+ overflow-wrap: anywhere;
+ }
+ }
}
- }
-
- .provider-actions {
- display: flex;
- gap: $space-2;
- padding-top: $space-3;
- border-top: 1px solid $border-subtle;
- }
-
- .zones-list {
- margin-top: $space-3;
- padding: $space-3;
- background: $bg-elevated;
- border-radius: $radius-md;
- font-size: $font-size-sm;
- .zone-item {
+ .provider-actions {
display: flex;
- justify-content: space-between;
- padding: $space-1 0;
+ gap: $space-2;
+ margin-top: 13px;
+ padding-top: 13px;
+ border-top: 1px solid var(--border-soft);
+ }
- &:not(:last-child) {
- border-bottom: 1px solid $border-subtle;
+ .zones-list {
+ margin-top: $space-3;
+ padding: $space-2 $space-3;
+ background: var(--surface-2);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius-sm);
+
+ .zone-item {
+ display: flex;
+ justify-content: space-between;
+ gap: $space-4;
+ padding: 7px 0;
+ font-family: var(--mono);
+ font-size: 11.5px;
+
+ span:first-child { color: var(--text-dim); }
+ span:last-child { color: var(--text-faint); }
+
+ &:not(:last-child) { border-bottom: 1px solid var(--border-soft); }
}
}
}
-}
-// ── SpamAssassin Config ──
-
-.email-spam {
+ // ── SpamAssassin config ─────────────────────────────────
.spam-config {
- background: $bg-card;
- border-radius: $radius-lg;
- border: 1px solid $border-subtle;
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
padding: $space-5;
- }
- .form-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
- gap: $space-4;
- margin-bottom: $space-4;
- }
+ .form-grid {
+ display: grid;
+ grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
+ gap: $space-4;
+ align-items: center;
- .checkbox-field {
- display: flex;
- align-items: center;
- gap: $space-2;
+ .form-group { margin-bottom: 0; }
+ }
- label {
- font-size: $font-size-sm;
+ .checkbox-field {
+ display: flex;
+ align-items: center;
+ gap: $space-2;
+
+ input[type='checkbox'] {
+ width: 15px;
+ height: 15px;
+ accent-color: var(--accent);
+ }
+
+ label {
+ margin: 0;
+ font-size: 13px;
+ color: var(--text-dim);
+ }
}
}
-}
-// ── Webmail ──
-
-.email-webmail {
+ // ── Webmail ─────────────────────────────────────────────
.webmail-card {
- background: $bg-card;
- border-radius: $radius-lg;
- border: 1px solid $border-subtle;
+ background: var(--surface);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
padding: $space-5;
.webmail-status-row {
display: flex;
justify-content: space-between;
align-items: center;
+ gap: $space-3;
margin-bottom: $space-4;
}
- .webmail-info {
- font-size: $font-size-sm;
- color: $text-secondary;
- margin-bottom: $space-4;
+ .webmail-port {
+ font-family: var(--mono);
+ font-size: 11.5px;
+ color: var(--text-faint);
}
.webmail-actions {
@@ -510,89 +473,98 @@
gap: $space-2;
flex-wrap: wrap;
}
- }
-
- .proxy-form {
- margin-top: $space-4;
- padding-top: $space-4;
- border-top: 1px solid $border-subtle;
- }
-}
-
-// ── Mail Queue ──
-.email-queue {
- .queue-list {
- display: flex;
- flex-direction: column;
- gap: $space-3;
- }
-}
-
-.queue-item {
- background: $bg-card;
- border-radius: $radius-md;
- border: 1px solid $border-subtle;
- padding: $space-4;
- display: flex;
- justify-content: space-between;
- align-items: flex-start;
- gap: $space-4;
-
- .queue-info {
- flex: 1;
-
- .queue-id {
- font-family: $font-mono;
- font-size: $font-size-sm;
- font-weight: $font-weight-medium;
- margin-bottom: $space-1;
+ .proxy-form {
+ display: flex;
+ align-items: flex-end;
+ gap: $space-3;
+ flex-wrap: wrap;
+ margin-top: $space-4;
+ padding-top: $space-4;
+ border-top: 1px solid var(--border-soft);
+
+ .form-group {
+ flex: 1;
+ min-width: 240px;
+ max-width: 360px;
+ margin-bottom: 0;
+ }
}
+ }
- .queue-meta {
- font-size: $font-size-sm;
- color: $text-secondary;
+ // ── Mail logs ───────────────────────────────────────────
+ .email-logs {
+ .log-controls {
display: flex;
- flex-wrap: wrap;
- gap: $space-3;
+ align-items: center;
+ gap: $space-2;
+
+ select {
+ padding: 5px 10px;
+ background: var(--surface-2);
+ border: 1px solid var(--border);
+ border-radius: $radius-md;
+ color: var(--text);
+ font-size: $font-size-sm;
+ cursor: pointer;
+
+ &:focus {
+ outline: none;
+ border-color: var(--accent);
+ }
+ }
}
- .queue-error {
- font-size: $font-size-sm;
- color: $danger;
- margin-top: $space-1;
+ .log-output {
+ margin: 0;
+ padding: $space-4;
+ background: var(--bg-code);
+ border: 1px solid var(--border-soft);
+ border-radius: var(--radius);
+ font-family: var(--mono);
+ font-size: 12px;
+ line-height: 1.6;
+ color: var(--text-dim);
+ max-height: 600px;
+ overflow: auto;
+ white-space: pre-wrap;
+ word-break: break-all;
}
}
-}
-// ── Logs ──
-
-.email-logs {
- .log-output {
- font-family: $font-mono;
- font-size: $font-size-xs;
- line-height: $line-height-relaxed;
- color: $text-primary;
- background: $bg-body;
- padding: $space-4;
- border-radius: $radius-md;
- border: 1px solid $border-subtle;
- max-height: 600px;
- overflow: auto;
- white-space: pre-wrap;
- word-break: break-all;
- margin: 0;
- }
+ // ── Change-password modal (overlay is global _modals.scss;
+ // .modal-content has no global styles — surface card here)
+ .modal-content {
+ width: 100%;
+ max-width: 420px;
+ padding: $space-5 $space-6 $space-6;
+ background: var(--surface);
+ border: 1px solid var(--border);
+ border-radius: var(--radius-lg);
+ box-shadow: var(--shadow-lg);
- .log-controls {
- display: flex;
- gap: $space-2;
- margin-bottom: $space-3;
- align-items: center;
+ h3 {
+ margin: 0 0 $space-4;
+ font-size: 15px;
+ font-weight: $font-weight-semibold;
+ }
+
+ .form-actions {
+ display: flex;
+ justify-content: flex-end;
+ gap: $space-2;
+ margin-top: $space-4;
+ }
}
}
-// ── Shared ──
+// ── Legacy unscoped leftovers ────────────────────────────────
+// Not used by the Email page itself, but `.status-badge` / `.empty-state`
+// are rendered by other pages (Git deployments, security/settings tabs)
+// and — because pages import after components in main.scss — these blocks
+// currently win the cascade app-wide. Kept verbatim to avoid cross-page
+// regressions; a follow-up should consolidate them into the component
+// partials (_status-badge.scss / _empty-state.scss) and delete these.
.status-badge {
display: inline-flex;