summaryrefslogtreecommitdiff
path: root/src/client/menu.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/menu.ts')
-rw-r--r--src/client/menu.ts21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/client/menu.ts b/src/client/menu.ts
index 4929b64281..0a9e2b5475 100644
--- a/src/client/menu.ts
+++ b/src/client/menu.ts
@@ -90,7 +90,26 @@ export const menuDef = {
title: 'antennas',
icon: 'fas fa-satellite',
show: computed(() => $i != null),
- to: '/my/antennas',
+ active: computed(() => router.currentRoute.value.path.startsWith('/timeline/antenna/') || router.currentRoute.value.path === '/my/antennas' || router.currentRoute.value.path.startsWith('/my/antennas/')),
+ action: (ev) => {
+ const items = ref([{
+ type: 'pending'
+ }]);
+ os.api('antennas/list').then(antennas => {
+ const _items = [...antennas.map(antenna => ({
+ type: 'link',
+ text: antenna.name,
+ to: `/timeline/antenna/${antenna.id}`
+ })), null, {
+ type: 'link',
+ to: '/my/antennas',
+ text: i18n.locale.manageAntennas,
+ icon: 'fas fa-cog',
+ }];
+ items.value = _items;
+ });
+ os.popupMenu(items, ev.currentTarget || ev.target);
+ },
},
mentions: {
title: 'mentions',