diff --git a/src/views/pages.js b/src/views/pages.js index ae44c96..1ac94cb 100644 --- a/src/views/pages.js +++ b/src/views/pages.js @@ -182,79 +182,90 @@ function renderLoginPage({ returnTo = "/app", error = null }) { - - -
Create account
-
+ - - - - +
+ + +
+
- + `, }); } function renderAppPage({ userId, summary, jobs, flash = null }) { - const flashMarkup = flash ? `
${escapeHtml(flash)}
` : ""; + const flashMarkup = flash ? `` : ""; const jobsMarkup = jobs.length === 0 - ? `
No generated audiobooks yet. Use the simulation form below or call the bot on X.
` - : `
${jobs - .map((job) => `

${escapeHtml(job.article.title)}

credits: ${job.creditsCharged} • status: ${escapeHtml(job.status)}

`) - .join("")}
`; + ? `
+

No generated audiobooks yet.

+

Use the simulation form below or call the bot on X.

+
` + : `
+ ${jobs.map((job) => ` + +
+

${escapeHtml(job.article.title)}

+
+ credits: ${job.creditsCharged} + ${escapeHtml(job.status)} +
+
+
`).join("")} +
`; return shell({ title: "Dashboard | XArtAudio", content: ` ${nav({ authenticated: true, userId })} ${flashMarkup} -
-
Credits
${summary.balance}
-
Audiobooks
${summary.totalJobs}
-
Spent
${summary.totalCreditsSpent}
+
+
+
Credits
+
${summary.balance}
+
+
+
Audiobooks
+
${summary.totalJobs}
+
+
+
Spent
+
${summary.totalCreditsSpent}
+
-
-
-
-

Top up credits

-

Dev shortcut for MVP. Production uses Polar webhook.

-
- - +
+
+
+

Top up credits

+

Dev shortcut for MVP. Production uses Polar webhook.

+ + +
-
+ -
-
-

Simulate mention

-

Simulates a webhook mention event and article conversion.

-
- - +
+
+

Simulate mention

+

Simulates a webhook mention event.

+ + +
-
-
+ + -
-

Recent audiobooks

+
+

Recent audiobooks

${jobsMarkup}
`,