mirror of
https://github.com/zadam/trilium.git
synced 2025-10-28 16:56:34 +01:00
client/menus: refactor
This commit is contained in:
@@ -14,11 +14,11 @@ export interface ContextMenuOptions<T> {
|
|||||||
onHide?: () => void;
|
onHide?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MenuSeparatorItem {
|
export interface MenuSeparatorItem {
|
||||||
kind: "separator";
|
kind: "separator";
|
||||||
}
|
}
|
||||||
|
|
||||||
interface MenuHeader {
|
export interface MenuHeader {
|
||||||
title: string;
|
title: string;
|
||||||
kind: "header";
|
kind: "header";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { t } from "./i18n.js";
|
import { t } from "./i18n.js";
|
||||||
import froca from "./froca.js";
|
import froca from "./froca.js";
|
||||||
import server from "./server.js";
|
import server from "./server.js";
|
||||||
import type { MenuCommandItem, MenuItem, MenuItemBadge } from "../menus/context_menu.js";
|
import type { MenuCommandItem, MenuItem, MenuItemBadge, MenuSeparatorItem } from "../menus/context_menu.js";
|
||||||
import type { NoteType } from "../entities/fnote.js";
|
import type { NoteType } from "../entities/fnote.js";
|
||||||
import type { TreeCommandNames } from "../menus/tree_context_menu.js";
|
import type { TreeCommandNames } from "../menus/tree_context_menu.js";
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ const BETA_BADGE = {
|
|||||||
title: t("note_types.beta-feature")
|
title: t("note_types.beta-feature")
|
||||||
};
|
};
|
||||||
|
|
||||||
const SEPARATOR = { kind: "separator" };
|
const SEPARATOR: MenuSeparatorItem = { kind: "separator" };
|
||||||
|
|
||||||
const creationDateCache = new Map<string, Date>();
|
const creationDateCache = new Map<string, Date>();
|
||||||
let rootCreationDate: Date | undefined;
|
let rootCreationDate: Date | undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user