work on opening files

This commit is contained in:
Skyler Lehmkuhl
2025-01-17 21:09:45 -05:00
parent 62ad2e35f2
commit 6e4f3d670f
2 changed files with 43 additions and 8 deletions
+8 -3
View File
@@ -4370,8 +4370,8 @@ function decrementFrame() {
updateUI();
}
function newWindow() {
invoke("create_window", {app: window.__TAURI__.app})
function newWindow(path) {
invoke("create_window", {app: window.__TAURI__.app, path: path})
}
function _newFile(width, height, fps) {
@@ -8318,4 +8318,9 @@ function renderAll() {
renderAll();
setTimeout(() => {console.log("Opened files", JSON.stringify(window.openedFiles))}, 1000)
if (window.openedFiles?.length>0) {
_open(window.openedFiles[0])
for (let i=1; i<window.openedFiles.length; i++) {
newWindow(window.openedFiles[i])
}
}