refactor(frontend): menuのdividerをnullで表現するのをやめる
This commit is contained in:
@@ -64,7 +64,7 @@ export function openInstanceMenu(ev: MouseEvent) {
|
||||
text: i18n.ts.charts,
|
||||
icon: 'ti ti-chart-line',
|
||||
to: '/about#charts',
|
||||
}, null, {
|
||||
}, { type: 'divider' }, {
|
||||
type: 'link',
|
||||
text: i18n.ts.ads,
|
||||
icon: 'ti ti-ad',
|
||||
@@ -79,7 +79,7 @@ export function openInstanceMenu(ev: MouseEvent) {
|
||||
text: i18n.ts.tools,
|
||||
icon: 'ti ti-tool',
|
||||
children: toolsMenuItems(),
|
||||
}, null, (instance.impressumUrl) ? {
|
||||
}, { type: 'divider' }, (instance.impressumUrl) ? {
|
||||
text: i18n.ts.impressum,
|
||||
icon: 'ti ti-file-invoice',
|
||||
action: () => {
|
||||
@@ -97,7 +97,7 @@ export function openInstanceMenu(ev: MouseEvent) {
|
||||
action: () => {
|
||||
window.open(instance.privacyPolicyUrl, '_blank', 'noopener');
|
||||
},
|
||||
} : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : null, {
|
||||
} : undefined, (!instance.impressumUrl && !instance.tosUrl && !instance.privacyPolicyUrl) ? undefined : { type: 'divider' }, {
|
||||
text: i18n.ts.help,
|
||||
icon: 'ti ti-help-circle',
|
||||
action: () => {
|
||||
|
@@ -236,7 +236,7 @@ function changeProfile(ev: MouseEvent) {
|
||||
deckStore.set('profile', k);
|
||||
unisonReload();
|
||||
},
|
||||
}))), null, {
|
||||
}))), { type: 'divider' }, {
|
||||
text: i18n.ts._deck.newProfile,
|
||||
icon: 'ti ti-plus',
|
||||
action: async () => {
|
||||
|
@@ -104,7 +104,7 @@ function toggleActive() {
|
||||
}
|
||||
|
||||
function getMenu() {
|
||||
let items = [{
|
||||
let items: MenuItem[] = [{
|
||||
icon: 'ti ti-settings',
|
||||
text: i18n.ts._deck.configureColumn,
|
||||
action: async () => {
|
||||
@@ -170,7 +170,7 @@ function getMenu() {
|
||||
action: () => {
|
||||
popRightColumn(props.column.id);
|
||||
},
|
||||
} : undefined, null, {
|
||||
} : undefined, { type: 'divider' }, {
|
||||
icon: 'ti ti-trash',
|
||||
text: i18n.ts.remove,
|
||||
danger: true,
|
||||
@@ -180,7 +180,7 @@ function getMenu() {
|
||||
}];
|
||||
|
||||
if (props.menu) {
|
||||
items.unshift(null);
|
||||
items.unshift({ type: 'divider' });
|
||||
items = props.menu.concat(items);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user