feat: conviction voting button handler, server import cleanup
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
06f7d67cd3
commit
6801916c60
|
|
@ -1166,12 +1166,12 @@ app.use("/:space/*", async (c, next) => {
|
|||
const space = c.req.param("space");
|
||||
if (!space || space === "api" || space.includes(".")) return;
|
||||
const config = await getSpaceConfig(space);
|
||||
const vis = config?.visibility || "public_read";
|
||||
if (vis === "public_read" || vis === "public") return;
|
||||
const vis = config?.visibility || "public";
|
||||
if (vis === "public") return;
|
||||
const html = await c.res.text();
|
||||
c.res = new Response(
|
||||
html.replace(
|
||||
'data-space-visibility="public_read"',
|
||||
'data-space-visibility="public"',
|
||||
`data-space-visibility="${vis}"`,
|
||||
),
|
||||
{ status: c.res.status, headers: c.res.headers },
|
||||
|
|
@ -1378,7 +1378,7 @@ app.get("/admin-data", async (c) => {
|
|||
spacesList.push({
|
||||
slug: data.meta.slug,
|
||||
name: data.meta.name,
|
||||
visibility: data.meta.visibility || "public_read",
|
||||
visibility: data.meta.visibility || "public",
|
||||
createdAt: data.meta.createdAt,
|
||||
ownerDID: data.meta.ownerDID,
|
||||
shapeCount,
|
||||
|
|
|
|||
|
|
@ -3433,6 +3433,18 @@
|
|||
});
|
||||
});
|
||||
|
||||
document.getElementById("new-conviction").addEventListener("click", () => {
|
||||
setPendingTool("folk-choice-conviction", {
|
||||
title: "Conviction Ranking",
|
||||
options: [
|
||||
{ id: "opt-1", label: "Option A", color: "#f59e0b" },
|
||||
{ id: "opt-2", label: "Option B", color: "#3b82f6" },
|
||||
{ id: "opt-3", label: "Option C", color: "#22c55e" },
|
||||
],
|
||||
stakes: [],
|
||||
});
|
||||
});
|
||||
|
||||
// Social media post
|
||||
document.getElementById("new-social-post").addEventListener("click", () => {
|
||||
setPendingTool("folk-social-post", {
|
||||
|
|
|
|||
Loading…
Reference in New Issue