fix
This commit is contained in:
parent
035d6660be
commit
6bddeac975
|
@ -152,8 +152,9 @@ 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) {
|
||||||
|
await lists.then((res) => {
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
type: "link" as const,
|
type: "link" as const,
|
||||||
|
@ -162,7 +163,7 @@ function chooseList(ev: MouseEvent) {
|
||||||
to: "/my/lists",
|
to: "/my/lists",
|
||||||
},
|
},
|
||||||
].concat(
|
].concat(
|
||||||
lists.map((list) => ({
|
res.map((list) => ({
|
||||||
type: "link" as const,
|
type: "link" as const,
|
||||||
text: list.name,
|
text: list.name,
|
||||||
icon: "",
|
icon: "",
|
||||||
|
@ -170,10 +171,12 @@ function chooseList(ev: MouseEvent) {
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
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) {
|
||||||
|
await antennas.then((res) => {
|
||||||
const items = [
|
const items = [
|
||||||
{
|
{
|
||||||
type: "link" as const,
|
type: "link" as const,
|
||||||
|
@ -183,7 +186,7 @@ function chooseAntenna(ev: MouseEvent) {
|
||||||
to: "/my/antennas",
|
to: "/my/antennas",
|
||||||
},
|
},
|
||||||
].concat(
|
].concat(
|
||||||
antennas.map((antenna) => ({
|
res.map((antenna) => ({
|
||||||
type: "link" as const,
|
type: "link" as const,
|
||||||
text: antenna.name,
|
text: antenna.name,
|
||||||
icon: "",
|
icon: "",
|
||||||
|
@ -192,6 +195,7 @@ function chooseAntenna(ev: MouseEvent) {
|
||||||
}))
|
}))
|
||||||
);
|
);
|
||||||
os.popupMenu(items, ev.currentTarget ?? ev.target);
|
os.popupMenu(items, ev.currentTarget ?? ev.target);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveSrc(
|
function saveSrc(
|
||||||
|
|
Loading…
Reference in New Issue