mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-16 23:08:05 +08:00
Implement closing the current, and all, documents from the menu bar (#265)
Closes #261 Additional cleanup and refactoring with the way the backend relays the list of open documents to the frontend and prompts for confirmation.
This commit is contained in:
@@ -83,8 +83,8 @@ const menuEntries: MenuListEntries = [
|
||||
},
|
||||
],
|
||||
[
|
||||
{ label: "Close", shortcut: ["Ctrl", "W"] },
|
||||
{ label: "Close All", shortcut: ["Ctrl", "Alt", "W"] },
|
||||
{ label: "Close", shortcut: ["Ctrl", "W"], action: async () => (await wasm).close_active_document_with_confirmation() },
|
||||
{ label: "Close All", shortcut: ["Ctrl", "Alt", "W"], action: async () => (await wasm).close_all_documents_with_confirmation() },
|
||||
],
|
||||
[
|
||||
{ label: "Save", shortcut: ["Ctrl", "S"] },
|
||||
@@ -154,6 +154,7 @@ export default defineComponent({
|
||||
window.open("https://www.graphite.design", "_blank");
|
||||
},
|
||||
actionNotImplemented() {
|
||||
// eslint-disable-next-line no-alert
|
||||
alert("This action is not yet implemented");
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user