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