diff --git a/server/src/plugins/service-admin-http/routes-ablesign.ts b/server/src/plugins/service-admin-http/routes-ablesign.ts
index 1733e89..af07d70 100644
--- a/server/src/plugins/service-admin-http/routes-ablesign.ts
+++ b/server/src/plugins/service-admin-http/routes-ablesign.ts
@@ -217,7 +217,7 @@ export function registerAbleSignRoutes(app: H3, deps: AdminDeps): void {
app.post("/admin/ablesign/:id/delete", async (event) => {
const id = getRouterParam(event, "id") ?? "";
await deps.repo.deleteAbleSignAccount(id);
- return new Response(null, { status: 302, headers: { location: "/admin/ablesign" } });
+ return new Response(null, { status: 302, headers: { location: "/admin/settings" } });
});
app.post("/admin/ablesign/screens/:sid/delete", async (event) => {
diff --git a/server/src/plugins/service-admin-http/routes-admin.ts b/server/src/plugins/service-admin-http/routes-admin.ts
index dd272d1..c9a1dc1 100644
--- a/server/src/plugins/service-admin-http/routes-admin.ts
+++ b/server/src/plugins/service-admin-http/routes-admin.ts
@@ -34,6 +34,7 @@ import {
renderKioskLabels,
renderDisplayLayouts,
renderDefaultLayoutSelect,
+ SettingsPage,
} from "../../web-templates/admin-pages.js";
import { discover as onvifDiscover, getEventProperties as onvifGetEventProperties } from "../../shared/onvif.js";
import { generateBundle } from "../../shared/bundle.js";
@@ -2219,6 +2220,14 @@ export function registerAdminRoutes(app: H3, deps: AdminDeps): void {
return new Response(null, { status: 302, headers: { location: `/admin/kiosks/${id}` } });
});
+ // ---- Settings page ----------------------------------------------------------
+
+ app.get("/admin/settings", async () => {
+ const cloudAccounts = await deps.repo.listCloudAccounts();
+ const ablesignAccounts = await deps.repo.listAbleSignAccounts();
+ return htmlPage(SettingsPage({ cloudAccounts, ablesignAccounts }));
+ });
+
// ---- Tenant switcher fragment (htmx) ----------------------------------------
app.get("/admin/_tenant_switcher", async (event) => {
const tenants = await deps.repo.listTenants();
diff --git a/server/src/web-templates/admin-pages.tsx b/server/src/web-templates/admin-pages.tsx
index 80d431c..2dbe230 100644
--- a/server/src/web-templates/admin-pages.tsx
+++ b/server/src/web-templates/admin-pages.tsx
@@ -4380,6 +4380,73 @@ export function TenantEditPage(props: TenantEditPageProps) {
);
}
+// ---- Settings Page ----------------------------------------------------------
+
+interface SettingsPageProps {
+ cloudAccounts: any[];
+ ablesignAccounts: any[];
+ error?: string;
+}
+
+export function SettingsPage(props: SettingsPageProps) {
+ return (
+
+ {"Manage cloud camera integrations at "}
+ Cloud Cams.
+ Settings
+
+ {props.error ? AbleSign Account
+ {props.ablesignAccounts.length > 0 ? (
+
+
+
+
+ {props.ablesignAccounts.map((a: any) => (
+ Name Screens Last Sync Actions
+
+ ))}
+
+ {a.name}
+ {String(a.screen_count ?? 0)}
+ {a.last_sync_at ? formatTime(a.last_sync_at) : "Never"}
+
+
+
+ Cloud Camera Accounts
+