Wrap list chips, add list sharing and public/unlisted/private visibility

- Home page list chips wrap to new rows instead of scrolling off the edge
- Lists are public, unlisted or private (migrated from the visible flag)
- Unlisted lists are reachable only at /s/<token>; slug URLs are public-only
- Share button on list pages and in the editor/dashboard; owners can reset an unlisted link

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
cdnutterandClaude Opus 5.5 committed 2026-11-19 09:51:16 -08:00
1 parent 268af7b9ed
commit 87e3d1fb30
16 files changed
+292 -28

No files matched your search

+7 -1
View File
@@ -3,6 +3,7 @@ import { h, icon, api, readBoot, toast, confirmDialog, chooseDialog, openDialog,
import { sortable } from "./sortable.js";
import { Places } from "./places.js";
import { openListForm } from "./list-form.js";
import { shareDialog, VISIBILITY, visibilityOf } from "./share.js";
import { previewButton } from "./player.js";
import { openImport } from "./import.js";
@@ -40,7 +41,8 @@ function renderHeader() {
document.querySelector("[data-bind=title]").textContent = list.title;
document.querySelector("[data-bind=count]").textContent = fmt.format(list.itemCount);
document.querySelector("[data-bind=max]").textContent = fmt.format(list.maxItems);
document.querySelector("[data-bind=hidden]").textContent = list.visible ? "" : " · Hidden";
const vis = visibilityOf(list);
document.querySelector("[data-bind=hidden]").textContent = vis === "public" ? "" : ` · ${VISIBILITY[vis].label}`;
document.querySelector("[data-bind=public]").href = `/l/${list.slug}`;
document.querySelector("[data-bind=export-csv]").href = `/l/${list.slug}/export?format=csv`;
document.querySelector("[data-bind=export-txt]").href = `/l/${list.slug}/export?format=txt`;
@@ -51,6 +53,10 @@ function renderHeader() {
const isFull = () => list.itemCount >= list.maxItems;
document.querySelector("[data-action=share]").addEventListener("click", () => {
shareDialog(list, { onChange: (saved) => { list = saved; renderHeader(); } });
});
document.querySelector("[data-action=edit-list]").addEventListener("click", () => {
openListForm({
categories, limits, styles: boot.styles, list,