feat(settings): add SMTP admin configuration
This commit is contained in:
parent
c58e212e3a
commit
884a20e043
32 changed files with 1200 additions and 42 deletions
|
|
@ -108,6 +108,23 @@ export default function DashboardPage() {
|
|||
)}
|
||||
</section>
|
||||
|
||||
{summary.system_status.length > 0 && (
|
||||
<section className="rounded-lg border bg-white p-6">
|
||||
<h2 className="text-lg font-semibold text-slate-950">Systemstatus</h2>
|
||||
<div className="mt-4 grid gap-3 md:grid-cols-2 xl:grid-cols-4">
|
||||
{summary.system_status.map((item) => (
|
||||
<div key={item.label} className="rounded-lg border bg-slate-50 p-4">
|
||||
<div className="flex items-center justify-between gap-3">
|
||||
<p className="text-sm font-medium text-slate-600">{item.label}</p>
|
||||
<span className={`h-2.5 w-2.5 rounded-full ${statusColor(item.status)}`} />
|
||||
</div>
|
||||
<p className="mt-2 break-words text-sm font-semibold text-slate-950">{formatSystemValue(item.value)}</p>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
)}
|
||||
|
||||
<div className="grid gap-4 md:grid-cols-2 xl:grid-cols-4">
|
||||
<ActivityPanel
|
||||
widget={summary.activities}
|
||||
|
|
@ -123,6 +140,27 @@ export default function DashboardPage() {
|
|||
);
|
||||
}
|
||||
|
||||
function statusColor(status: "ok" | "warning" | "info") {
|
||||
if (status === "ok") {
|
||||
return "bg-emerald-500";
|
||||
}
|
||||
if (status === "warning") {
|
||||
return "bg-amber-500";
|
||||
}
|
||||
return "bg-slate-400";
|
||||
}
|
||||
|
||||
function formatSystemValue(value: string) {
|
||||
const date = new Date(value);
|
||||
if (!Number.isNaN(date.getTime()) && value.includes("T")) {
|
||||
return new Intl.DateTimeFormat("de-DE", {
|
||||
dateStyle: "short",
|
||||
timeStyle: "short",
|
||||
}).format(date);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
function ActivityPanel({
|
||||
widget,
|
||||
activities,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue