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 @@
<% if (allPages.length === 0) { %> -

No status pages yet. Create one.

+

No status pages yet. Create one.

<% } else { %>
<% allPages.forEach(function(p) { %> diff --git a/apps/web/src/views/partials/nav.ejs b/apps/web/src/views/partials/nav.ejs index 4d185e2..c9b4ae3 100644 --- a/apps/web/src/views/partials/nav.ejs +++ b/apps/web/src/views/partials/nav.ejs @@ -2,7 +2,7 @@ PingQL
Monitors - Pages + Pages Incidents Notifications Settings diff --git a/apps/web/src/views/status-page-edit.ejs b/apps/web/src/views/status-page-edit.ejs index 21a9d65..61abb06 100644 --- a/apps/web/src/views/status-page-edit.ejs +++ b/apps/web/src/views/status-page-edit.ejs @@ -1,5 +1,5 @@ <%~ include('./partials/head', { title: it.isNew ? 'New status page' : 'Edit status page' }) %> -<%~ include('./partials/nav', { nav: 'status-pages' }) %> +<%~ include('./partials/nav', { nav: 'pages' }) %> <% const p = it.page || {}; @@ -31,17 +31,24 @@
- ← Back to status pages + ← Back to status pages

<%= it.isNew ? 'New status page' : 'Edit status page' %>

-
+
- -

Public URL: pages.pingql.com/

+

Public URL: pages.pingql.com/<%= p.slug || '' %>

+
diff --git a/apps/web/src/views/status-pages.ejs b/apps/web/src/views/status-pages.ejs index 7437669..74f3968 100644 --- a/apps/web/src/views/status-pages.ejs +++ b/apps/web/src/views/status-pages.ejs @@ -1,11 +1,11 @@ <%~ include('./partials/head', { title: 'Status pages' }) %> -<%~ include('./partials/nav', { nav: 'status-pages' }) %> +<%~ include('./partials/nav', { nav: 'pages' }) %>

Status pages

- + New page + + New page

@@ -33,8 +33,8 @@ <% if (p.description) { %>

<%= p.description %>

<% } %>
- Edit - + Edit +