Implement "Export" entry in File menu; add Copy/Paste icons in Edit menu

This commit is contained in:
Keavon Chambers
2021-06-01 19:49:04 -07:00
parent d1bf68320e
commit 4bcdbbe092
6 changed files with 25 additions and 7 deletions

View File

@@ -65,7 +65,7 @@ const menuEntries: MenuListEntries = [
ref: undefined,
children: [
[
{ label: "New", icon: "FileNew", shortcut: ["Ctrl", "N"] },
{ label: "New", icon: "File", shortcut: ["Ctrl", "N"] },
{ label: "Open…", shortcut: ["Ctrl", "O"] },
{
label: "Open Recent",
@@ -94,7 +94,7 @@ const menuEntries: MenuListEntries = [
],
[
{ label: "Import…", shortcut: ["Ctrl", "I"] },
{ label: "Export…", shortcut: ["Ctrl", "E"] },
{ label: "Export…", shortcut: ["Ctrl", "E"], action: async () => (await wasm).export_document() },
],
[{ label: "Quit", shortcut: ["Ctrl", "Q"] }],
],
@@ -104,13 +104,13 @@ const menuEntries: MenuListEntries = [
ref: undefined,
children: [
[
{ label: "Undo", shortcut: ["Ctrl", "Z"], action: async () => (await wasm).undo()},
{ label: "Undo", shortcut: ["Ctrl", "Z"], action: async () => (await wasm).undo() },
{ label: "Redo", shortcut: ["Ctrl", "⇧", "Z"] },
],
[
{ label: "Cut", shortcut: ["Ctrl", "X"] },
{ label: "Copy", shortcut: ["Ctrl", "C"] },
{ label: "Paste", shortcut: ["Ctrl", "V"] },
{ label: "Copy", icon: "Copy", shortcut: ["Ctrl", "C"] },
{ label: "Paste", icon: "Paste", shortcut: ["Ctrl", "V"] },
],
],
},