Remove unused persona marketplace and discover page files.
CI / check (22) (push) Failing after 16m32s
CI / check (24) (push) Failing after 15m50s

This commit is contained in:
2026-10-07 23:41:27 +02:00
parent 10ec76d437
commit 5ca611c113
34 changed files with 368 additions and 1216 deletions
-27
View File
@@ -109,30 +109,3 @@ if (recent) {
}
}
}
const featured = document.querySelector("#featuredPersonas");
if (featured) {
const result = await get("/api/discover");
const search = document.querySelector("#publicSearch");
function render() {
featured.replaceChildren();
if (result.error) { featured.textContent = result.error; return; }
const query = search?.value.trim().toLowerCase() || "";
let personas = (result.personas || []).filter(persona => `${persona.name} ${persona.description || ""}`.toLowerCase().includes(query));
if (!search) personas = personas.slice(0, 3);
if (!personas.length) { featured.textContent = query ? "No personas match your search." : "The community is just getting started. Create a persona and give the next story its voice."; return; }
for (const persona of personas) {
const card = document.createElement("article"); card.className = "feature-card";
const category = document.createElement("span"); category.className = "feature-number"; category.textContent = persona.persona_type === "assistant" ? "AI CHARACTER" : "USER PERSONA";
const title = document.createElement("h3"); title.textContent = persona.name;
const description = document.createElement("p"); description.textContent = persona.description || "A community persona, ready for a new conversation.";
const creator = document.createElement("p"); creator.textContent = `By ${persona.creator_username}`;
const link = document.createElement("a"); const destination = `/market?persona=${persona.id}`;
link.href = session.user ? destination : `/login?next=${encodeURIComponent(destination)}`;
link.textContent = session.user ? "Explore persona \u2192" : "Sign in to use persona \u2192";
card.append(category, title, description, creator, link); featured.append(card);
}
}
render(); search?.addEventListener("input", render);
}