refactor(frontend): menuのdividerをnullで表現するのをやめる
This commit is contained in:
@@ -60,7 +60,7 @@ function setFilter(ev) {
|
||||
action: () => {
|
||||
includeTypes.value = null;
|
||||
},
|
||||
}, null, ...typeItems] : typeItems;
|
||||
}, { type: 'divider' }, ...typeItems] : typeItems;
|
||||
os.popupMenu(items, ev.currentTarget ?? ev.target);
|
||||
}
|
||||
|
||||
|
@@ -406,7 +406,7 @@ function menu(ev: MouseEvent, profileId: string) {
|
||||
icon: 'ti ti-download',
|
||||
href: URL.createObjectURL(new Blob([JSON.stringify(profiles.value[profileId], null, 2)], { type: 'application/json' })),
|
||||
download: `${profiles.value[profileId].name}.json`,
|
||||
}, null, {
|
||||
}, { type: 'divider' }, {
|
||||
text: ts.rename,
|
||||
icon: 'ti ti-forms',
|
||||
action: () => rename(profileId),
|
||||
@@ -414,7 +414,7 @@ function menu(ev: MouseEvent, profileId: string) {
|
||||
text: ts._preferencesBackups.save,
|
||||
icon: 'ti ti-device-floppy',
|
||||
action: () => save(profileId),
|
||||
}, null, {
|
||||
}, { type: 'divider' }, {
|
||||
text: ts.delete,
|
||||
icon: 'ti ti-trash',
|
||||
action: () => deleteProfile(profileId),
|
||||
|
@@ -232,7 +232,7 @@ const age = computed(() => {
|
||||
return calcAge(props.user.birthday);
|
||||
});
|
||||
|
||||
function menu(ev) {
|
||||
function menu(ev: MouseEvent) {
|
||||
const { menu, cleanup } = getUserMenu(user.value, router);
|
||||
os.popupMenu(menu, ev.currentTarget ?? ev.target).finally(cleanup);
|
||||
}
|
||||
|
Reference in New Issue
Block a user