This commit is contained in:
Freeplay 2023-06-05 20:15:17 -04:00
parent 035d6660be
commit 6bddeac975

View file

@ -152,46 +152,50 @@ function top(): void {
scroll(rootEl, { top: 0 });
}
const lists = await os.api("users/lists/list");
function chooseList(ev: MouseEvent) {
const items = [
{
type: "link" as const,
text: i18n.ts.manageLists,
icon: "ph-faders-horizontal ph-bold ph-lg",
to: "/my/lists",
},
].concat(
lists.map((list) => ({
type: "link" as const,
text: list.name,
icon: "",
to: `/timeline/list/${list.id}`,
}))
);
os.popupMenu(items, ev.currentTarget ?? ev.target);
const lists = os.api("users/lists/list");
async function chooseList(ev: MouseEvent) {
await lists.then((res) => {
const items = [
{
type: "link" as const,
text: i18n.ts.manageLists,
icon: "ph-faders-horizontal ph-bold ph-lg",
to: "/my/lists",
},
].concat(
res.map((list) => ({
type: "link" as const,
text: list.name,
icon: "",
to: `/timeline/list/${list.id}`,
}))
);
os.popupMenu(items, ev.currentTarget ?? ev.target);
});
}
const antennas = await os.api("antennas/list");
function chooseAntenna(ev: MouseEvent) {
const items = [
{
type: "link" as const,
indicate: false,
text: i18n.ts.manageAntennas,
icon: "ph-faders-horizontal ph-bold ph-lg",
to: "/my/antennas",
},
].concat(
antennas.map((antenna) => ({
type: "link" as const,
text: antenna.name,
icon: "",
indicate: antenna.hasUnreadNote,
to: `/timeline/antenna/${antenna.id}`,
}))
);
os.popupMenu(items, ev.currentTarget ?? ev.target);
const antennas = os.api("antennas/list");
async function chooseAntenna(ev: MouseEvent) {
await antennas.then((res) => {
const items = [
{
type: "link" as const,
indicate: false,
text: i18n.ts.manageAntennas,
icon: "ph-faders-horizontal ph-bold ph-lg",
to: "/my/antennas",
},
].concat(
res.map((antenna) => ({
type: "link" as const,
text: antenna.name,
icon: "",
indicate: antenna.hasUnreadNote,
to: `/timeline/antenna/${antenna.id}`,
}))
);
os.popupMenu(items, ev.currentTarget ?? ev.target);
});
}
function saveSrc(