feat: domains, transports, logs, quarantine, spam filter, i18n + UX fixes

Features added:
- Admin > Domains: add domains to Mailcow servers, auto-generate DKIM,
  display full DNS record set (MX, SPF, DMARC, DKIM, autoconfig CNAMEs)
  with one-click copy per record
- Admin > Transports: manage sender-dependent relay hosts (add/delete)
- Admin > Logs: view Postfix, Dovecot, Rspamd, Ratelimit, API and other
  server logs in a dark scrollable panel
- My Account: per-domain Quarantine panel — view score, sender, subject,
  date; permanently delete quarantined messages
- My Account: per-mailbox Spam Filter slider (1–15 threshold) saved via API
- My Account: Aliases & Forwarders (alias creation doubles as forwarder
  to any external address)

UX fixes:
- Quota 0 now displays ∞ (unlimited) in both admin and account views
- Admin mailbox action buttons replaced with Dashicon icon buttons
  (lock, chart-bar, trash) with title tooltips

i18n:
- load_plugin_textdomain registered on init hook
- All user-facing PHP strings wrapped in __() / esc_html__()
- Translated strings array passed to account JS via wp_localize_script
- woocow-es_ES.po/.mo — Spanish translation
- woocow-ro_RO.po/.mo — Romanian translation (with correct plural forms)
- English remains the fallback

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-27 08:38:52 +01:00
parent 1ea2ed7e74
commit 1c5b58f238
11 changed files with 1252 additions and 14 deletions

View File

@@ -336,6 +336,93 @@
.woocow-muted { color: #aaa; font-size: 13px; }
.woocow-error { color: #c0392b; }
/* ── Icon buttons (admin) ────────────────────────────────────── */
.button.woocow-icon-btn {
width: 30px !important;
min-width: 0 !important;
padding: 0 !important;
display: inline-flex !important;
align-items: center;
justify-content: center;
}
.button.woocow-icon-btn .dashicons {
font-size: 15px;
width: 15px;
height: 28px;
line-height: 28px;
}
/* ── DNS records table ───────────────────────────────────────── */
.woocow-dns-table { margin-top: 8px; }
.woocow-dns-host code { font-size: 11px; word-break: break-all; }
.woocow-dns-val { max-width: 340px; }
.woocow-dns-value {
display: block;
font-size: 11px;
word-break: break-all;
white-space: pre-wrap;
background: #f6f8fa;
padding: 4px 6px;
border-radius: 3px;
max-height: 60px;
overflow-y: auto;
}
/* ── Log viewer ──────────────────────────────────────────────── */
.woocow-log-toolbar {
display: flex;
gap: 12px;
align-items: center;
margin-bottom: 8px;
}
.woocow-log-pre {
background: #1e1e2e;
color: #cdd6f4;
padding: 16px;
border-radius: 6px;
font-size: 12px;
line-height: 1.6;
max-height: 500px;
overflow-y: auto;
white-space: pre-wrap;
word-break: break-all;
}
/* ── Quarantine (account) ────────────────────────────────────── */
.woocow-quarantine-wrap {
padding: 16px 20px;
border-top: 1px solid #e0e0e0;
background: #fffbf0;
}
.woocow-quarantine-table {
width: 100%;
border-collapse: collapse;
font-size: 13px;
margin-bottom: 10px;
}
.woocow-quarantine-table th,
.woocow-quarantine-table td {
padding: 7px 10px;
border-bottom: 1px solid #eee;
text-align: left;
vertical-align: middle;
}
.woocow-quarantine-table th { font-weight: 700; background: #f5f5f5; }
.woocow-quarantine-table tr:hover td { background: #fafafa; }
.woocow-score-badge {
display: inline-block;
padding: 2px 7px;
border-radius: 10px;
font-size: 11px;
font-weight: 700;
color: #fff;
}
/* ── Spam filter panel ───────────────────────────────────────── */
.woocow-spam-panel { font-size: 13px; }
.woocow-spam-panel input[type=range] { vertical-align: middle; }
.wc-spam-val { font-weight: 700; min-width: 30px; display: inline-block; }
@media (max-width: 600px) {
.woocow-domain-header,
.woocow-mbox-main,
@@ -343,4 +430,6 @@
.woocow-quota-bar-outer { width: 80px; }
.woocow-alias-fields { flex-direction: column; }
.woocow-input { max-width: 100%; }
.woocow-quarantine-table { font-size: 11px; }
.woocow-quarantine-table th, .woocow-quarantine-table td { padding: 5px 6px; }
}