atagen

jelq

public

an http based roguelike rpg about jelqing

Star0
Watch0

Commit 0cad5f1c5014

tarball

atagen <boss@atagen.co>2026-10-14 11:38 UTC

1 file changed+9-2
ui: bold the resources and techniques a response has just made available
Modified file: src/ui.html+9 additions−2 deletions
@@ -123,6 +123,8 @@ let run = null;
123123 let linked = [];
124124 let techniques = [];
125125 let offered = [];
126+let known = new Set();
127+let fresh = new Set();
126128 let challenged = false;
127129 const etags = {};
128130 let target = "/runs";
@@ -278,7 +280,8 @@ function renderTargets() {
278280 box.append(el("h4", { textContent: title }));
279281 for (const t of members) {
280282 const radio = el("input", { type: "radio", name: "target", checked: t.path === target, onchange: () => chooseTarget(t) });
281- box.append(el("label", {}, radio, " " + t.name + " ", el("small", { textContent: short(t.path) })), el("br"));
283+ const name = fresh.has(t.path) ? el("b", { textContent: t.name }) : t.name;
284+ box.append(el("label", {}, radio, " ", name, " ", el("small", { textContent: short(t.path) })), el("br"));
282285 }
283286 }
284287 }
@@ -328,7 +331,8 @@ function renderFields() {
328331 const choices = options(name);
329332 let input;
330333 if (choices) {
331- input = el("select", {}, ...choices.map(o => el("option", { value: o, textContent: o || "(none)", selected: o === value })));
334+ const isNew = o => ["technique", "also"].includes(name) && fresh.has("technique " + o);
335+ input = el("select", {}, ...choices.map(o => el("option", { value: o, textContent: o || "(none)", selected: o === value, style: isNew(o) ? "font-weight: bold" : "" })));
332336 } else if (f.kind === "textarea") {
333337 input = el("textarea", { rows: 3, cols: 40, value, placeholder: f.placeholder || "" });
334338 } else {
@@ -458,6 +462,9 @@ function absorb(r, sentMethod, sentPath) {
458462 linked = [];
459463 techniques = [];
460464 }
465+ const menu = targets().filter(t => t.group !== "said").map(t => t.path).concat(techniques.map(t => "technique " + t.name));
466+ fresh = started ? new Set() : new Set(menu.filter(m => !known.has(m)));
467+ known = new Set(menu);
461468 if (started || !targets().some(t => t.path === target)) {
462469 const home = linked.find(t => t.key === "run");
463470 chooseTarget(home || GLOBALS[0]);