Add 'New Window' command
This commit is contained in:
parent
7cf33494fa
commit
2d355a13b9
|
|
@ -1,4 +1,4 @@
|
|||
use std::sync::{Arc, Mutex};
|
||||
use std::sync::{Mutex};
|
||||
|
||||
use tauri_plugin_log::{Target, TargetKind};
|
||||
use log::{trace, info, debug, warn, error};
|
||||
|
|
|
|||
11
src/main.js
11
src/main.js
|
|
@ -354,6 +354,7 @@ let config = {
|
|||
undo: "<mod>z",
|
||||
redo: "<mod>Z",
|
||||
new: "<mod>n",
|
||||
newWindow: "<mod>N",
|
||||
save: "<mod>s",
|
||||
saveAs: "<mod>S",
|
||||
open: "<mod>o",
|
||||
|
|
@ -4369,6 +4370,10 @@ function decrementFrame() {
|
|||
updateUI();
|
||||
}
|
||||
|
||||
function newWindow() {
|
||||
invoke("create_window", {app: window.__TAURI__.app})
|
||||
}
|
||||
|
||||
function _newFile(width, height, fps) {
|
||||
root = new GraphicsObject("root");
|
||||
context.objectStack = [root];
|
||||
|
|
@ -7881,6 +7886,12 @@ async function renderMenu() {
|
|||
action: newFile,
|
||||
accelerator: getShortcut("new"),
|
||||
},
|
||||
{
|
||||
text: "New Window",
|
||||
enabled: true,
|
||||
action: newWindow,
|
||||
accelerator: getShortcut("newWindow"),
|
||||
},
|
||||
{
|
||||
text: "Save",
|
||||
enabled: true,
|
||||
|
|
|
|||
Loading…
Reference in New Issue