|
|
|
|
@ -2,6 +2,7 @@ import appContext from "../../components/app_context.js";
|
|
|
|
|
import type { ContextMenuEvent } from "../../menus/context_menu.js";
|
|
|
|
|
import contextMenu from "../../menus/context_menu.js";
|
|
|
|
|
import linkContextMenu from "../../menus/link_context_menu.js";
|
|
|
|
|
import { t } from "../../services/i18n.js";
|
|
|
|
|
|
|
|
|
|
export default function openContextMenu(noteId: string, e: ContextMenuEvent) {
|
|
|
|
|
contextMenu.show({
|
|
|
|
|
@ -9,9 +10,9 @@ export default function openContextMenu(noteId: string, e: ContextMenuEvent) {
|
|
|
|
|
y: e.pageY,
|
|
|
|
|
items: [
|
|
|
|
|
...linkContextMenu.getItems(),
|
|
|
|
|
{ title: "Open location", command: "openGeoLocation", uiIcon: "bx bx-map-alt" },
|
|
|
|
|
{ title: t("geo-map-context.open-location"), command: "openGeoLocation", uiIcon: "bx bx-map-alt" },
|
|
|
|
|
{ title: "----" },
|
|
|
|
|
{ title: "Remove from map", command: "deleteFromMap", uiIcon: "bx bx-trash" }
|
|
|
|
|
{ title: t("geo-map-context.remove-from-map"), command: "deleteFromMap", uiIcon: "bx bx-trash" }
|
|
|
|
|
],
|
|
|
|
|
selectMenuItemHandler: ({ command }, e) => {
|
|
|
|
|
if (command === "deleteFromMap") {
|
|
|
|
|
|