diff --git a/apps/web/src/routes/dashboard.ts b/apps/web/src/routes/dashboard.ts index 944ade1..1c7b352 100644 --- a/apps/web/src/routes/dashboard.ts +++ b/apps/web/src/routes/dashboard.ts @@ -680,7 +680,7 @@ export const dashboard = new Elysia() }) // ── Status pages ────────────────────────────────────────────────── - .get("/dashboard/status-pages", async ({ cookie, headers }) => { + .get("/dashboard/pages", async ({ cookie, headers }) => { const resolved = await getAccountId(cookie, headers); if (!resolved?.accountId) return redirect("/dashboard"); const pages = await sql` @@ -688,25 +688,25 @@ export const dashboard = new Elysia() FROM status_pages WHERE account_id = ${resolved.accountId} ORDER BY created_at DESC `; - return html("status-pages", { nav: "status-pages", pages }); + return html("status-pages", { nav: "pages", pages }); }) - .get("/dashboard/status-pages/new", async ({ cookie, headers }) => { + .get("/dashboard/pages/new", async ({ cookie, headers }) => { const resolved = await getAccountId(cookie, headers); if (!resolved?.accountId) return redirect("/dashboard"); const allMonitors = await sql` SELECT id, name FROM monitors WHERE account_id = ${resolved.accountId} ORDER BY created_at DESC `; - return html("status-page-edit", { nav: "status-pages", isNew: true, page: null, allMonitors }); + return html("status-page-edit", { nav: "pages", isNew: true, page: null, allMonitors }); }) - .get("/dashboard/status-pages/:id", async ({ cookie, headers, params }) => { + .get("/dashboard/pages/:id", async ({ cookie, headers, params }) => { const resolved = await getAccountId(cookie, headers); if (!resolved?.accountId) return redirect("/dashboard"); const [page] = await sql` SELECT * FROM status_pages WHERE id = ${params.id} AND account_id = ${resolved.accountId} `; - if (!page) return redirect("/dashboard/status-pages"); + if (!page) return redirect("/dashboard/pages"); const [monitors, groups, allMonitors] = await Promise.all([ sql`SELECT monitor_id, display_name, group_id FROM status_page_monitors WHERE status_page_id = ${params.id} ORDER BY position ASC`, sql`SELECT id, name, position FROM status_page_groups WHERE status_page_id = ${params.id} ORDER BY position ASC`, @@ -714,10 +714,10 @@ export const dashboard = new Elysia() ]); page.monitors = monitors; page.groups = groups; - return html("status-page-edit", { nav: "status-pages", isNew: false, page, allMonitors }); + return html("status-page-edit", { nav: "pages", isNew: false, page, allMonitors }); }) - .post("/dashboard/status-pages/new", async ({ cookie, headers, body }) => { + .post("/dashboard/pages/new", async ({ cookie, headers, body }) => { const resolved = await getAccountId(cookie, headers); if (!resolved?.accountId) return redirect("/dashboard"); const b = body as any; @@ -752,10 +752,10 @@ export const dashboard = new Elysia() }), }); } catch {} - return redirect("/dashboard/status-pages"); + return redirect("/dashboard/pages"); }) - .post("/dashboard/status-pages/:id/edit", async ({ cookie, headers, params, body }) => { + .post("/dashboard/pages/:id/edit", async ({ cookie, headers, params, body }) => { const resolved = await getAccountId(cookie, headers); if (!resolved?.accountId) return redirect("/dashboard"); const b = body as any; @@ -796,10 +796,10 @@ export const dashboard = new Elysia() body: JSON.stringify(payload), }); } catch {} - return redirect("/dashboard/status-pages"); + return redirect("/dashboard/pages"); }) - .post("/dashboard/status-pages/:id/delete", async ({ cookie, headers, params }) => { + .post("/dashboard/pages/:id/delete", async ({ cookie, headers, params }) => { const resolved = await getAccountId(cookie, headers); if (!resolved?.accountId) return redirect("/dashboard"); try { @@ -810,7 +810,7 @@ export const dashboard = new Elysia() headers: { "Authorization": `Bearer ${key}` }, }); } catch {} - return redirect("/dashboard/status-pages"); + return redirect("/dashboard/pages"); }) // ── Incidents ───────────────────────────────────────────────────── diff --git a/apps/web/src/views/incident-edit.ejs b/apps/web/src/views/incident-edit.ejs index fc685ad..c73a8a4 100644 --- a/apps/web/src/views/incident-edit.ejs +++ b/apps/web/src/views/incident-edit.ejs @@ -68,7 +68,7 @@
No status pages yet. Create one.
+No status pages yet. Create one.
<% } else { %>