sitegen/src/q+a/views/backend-inbox.marko
clover caruso 310170fc98 i accidentally deleted the repo, but recovered it. i'll start committing
it was weird. i pressed delete on a subfolder, i think one of the
pages.off folders that i was using. and then, suddenly, nvim on windows
7 decided to delete every file in the directory. they weren't shred off
the space time continuum, but just marked deleted. i had to pay $80 to
get access to a software that could see them. bleh!

just seeing all my work, a little over a week, was pretty heart
shattering. but i remembered that long ago, a close friend said i could
call them whenever i was feeling sad. i finally took them up on that
offer. the first time i've ever called someone for emotional support.
but it's ok. i got it back. and the site framework is better than ever.

i'm gonna commit and push more often. the repo is private anyways.
2025-06-06 23:38:02 -07:00

40 lines
1.2 KiB
Text

---
export { minimal as layout } from "../layouts/questions.tsx";
import { PendingQuestion } from "../db.ts";
import { useInlineScript } from "../framework/page-resources";
import {
formatQuestionISOTimestamp,
formatQuestionTimestamp,
} from "../q+a/QuestionRender";
<const/questions = PendingQuestion.getAll() />
<Script src="backend-inbox.client.ts" />
<h1>inbox</h1>
<for|q| of=questions>
<div
data-q=q.id
style="border-bottom: 2px solid #fff7; margin-bottom: 1rem"
>
<time datetime={formatQuestionISOTimestamp(q.date)}>
${formatQuestionTimestamp(q.date)} ${q.id}
</time>
<div style="color: dodgerblue; margin-bottom: 0.25rem">
${q.sourceName}
${q.sourceLocation !== "unknown" ? `from ${q.sourceLocation}` : null}
${q.sourceVPN ? `(VPN: ${q.sourceVPN})` : null}
</div>
<p style="white-space: pre-wrap">${q.prompt}</p>
<p>
<button onclick=`onReply("${q.id}") style="color: lime">
reply
</button>
<button onclick=`onDelete("${q.id}")` style="color: red">
reject
</button>
<button onclick=`onDeleteFull("${q.id}")` style="color: red">
DELETE
</button>
</p>
</div>
</>