diff --git a/src/app/components/admin.js b/src/app/components/admin.js index 84c7207..97dac5a 100644 --- a/src/app/components/admin.js +++ b/src/app/components/admin.js @@ -5,55 +5,61 @@ import { formatISO } from "date-fns"; export const UsersList = ({ users, total }) => html`

Users (${total} total)

- ${users && users.length > 0 - ? html` - - - - - - - - - - - - ${users.map( - (user) => html` - - - - - - - - `, - )} - -
NameEmailVerifiedRoleCreated
${user.name}${user.email}${user.emailVerified ? "✅" : "❌"} -
- - -
-
- ${formatISO(new Date(user.createdAt), { - representation: "date", - })} -
- ` - : html`

No users found.

`} + ${ + users && users.length > 0 + ? html` + + + + + + + + + + + + ${users.map( + (user) => html` + + + + + + + + `, + )} + +
NameEmailVerifiedRoleCreated
${user.name}${user.email}${user.emailVerified ? "✅" : "❌"} +
+ + +
+
+ ${formatISO(new Date(user.createdAt), { + representation: "date", + })} +
+ ` + : html`

No users found.

` + }
`; diff --git a/src/app/components/common.js b/src/app/components/common.js index 9e36798..4e6a076 100644 --- a/src/app/components/common.js +++ b/src/app/components/common.js @@ -5,14 +5,18 @@ export const FormSection = ({ children }) => html`
${children}
`; // Message display component export const Message = ({ error, success }) => html` - ${error - ? html`
- ${decodeURIComponent(error)} -
` - : ""} - ${success - ? html`
- ${decodeURIComponent(success)} -
` - : ""} + ${ + error + ? html`
+ ${decodeURIComponent(error)} +
` + : "" + } + ${ + success + ? html`
+ ${decodeURIComponent(success)} +
` + : "" + } `; diff --git a/src/app/components/home.js b/src/app/components/home.js index 66bb5d6..f8de595 100644 --- a/src/app/components/home.js +++ b/src/app/components/home.js @@ -2,18 +2,20 @@ import { html } from "hono/html"; // Login status display export const LoginStatus = ({ user }) => html` - ${user - ? html` -
- ✅ Logged in as: ${user.name} (${user.email}) -
- View Profile | -
- -
- ` - : html` -
❌ Not logged in
- Sign In - `} + ${ + user + ? html` +
+ ✅ Logged in as: ${user.name} (${user.email}) +
+ View Profile | +
+ +
+ ` + : html` +
❌ Not logged in
+ Sign In + ` + } `; diff --git a/src/app/components/layout.js b/src/app/components/layout.js index 8c9f4b3..63a9769 100644 --- a/src/app/components/layout.js +++ b/src/app/components/layout.js @@ -1,5 +1,14 @@ import { html } from "hono/html"; +// Derive a version stamp for cache-busting static assets. +// HEROKU_SLUG_COMMIT is the deployed git SHA, set automatically by Heroku. +// Falls back to SOURCE_VERSION (build-time env), then 'dev' for local. +const STATIC_VERSION = + (process.env.HEROKU_SLUG_COMMIT || process.env.SOURCE_VERSION || "").slice( + 0, + 7, + ) || "dev"; + // Base layout component export const Layout = ({ title, children }) => html` @@ -21,7 +30,10 @@ export const Layout = ({ title, children }) => html`
${children}
- + `;