From fb4327471ad1cbcb6a210a4fe183ac3aa9511688 Mon Sep 17 00:00:00 2001
From: derpygamer2142 <93667155+derpygamer2142@users.noreply.github.com>
Date: Sun, 8 Feb 2026 15:17:45 -0800
Subject: [PATCH 1/3] Load or create on startup
---
dist/artimus.js | 15 ++++++++++-----
index.html | 5 +++++
lang/english.json | 15 +++++++++++++--
site/src/menus/loadFile.js | 31 +++++++++++++++++++++++++++++++
site/src/menus/newFIle.js | 9 +++++++++
5 files changed, 68 insertions(+), 7 deletions(-)
create mode 100644 site/src/menus/loadFile.js
diff --git a/dist/artimus.js b/dist/artimus.js
index 8a556d9..e3f0f55 100644
--- a/dist/artimus.js
+++ b/dist/artimus.js
@@ -2482,7 +2482,7 @@ window.artimus = {
importFromPC() {
// Not yet widely available, so we will need to check we can use the file system access API
- if (window.showSaveFilePicker) window.showOpenFilePicker({
+ if (window.showSaveFilePicker) return window.showOpenFilePicker({
id: "artimus_file_location",
multiple: false,
startIn: "documents",
@@ -2501,11 +2501,16 @@ window.artimus = {
fileInput.type = "file";
fileInput.accept = "image/*, .artimus";
- fileInput.onchange = () => {
- artimus.activeWorkspaces[0].importFromImage(fileInput.files[0]);
- };
+ const filePromise = new Promise((resolve) => {
+ fileInput.onchange = () => {
+ artimus.activeWorkspaces[0].importFromImage(fileInput.files[0]);
+ resolve();
+ };
+ fileInput.onError = () => { console.log('file load error wow'); }
+ });
- fileInput.click();
+ fileInput.click();
+ return filePromise;
}
}
diff --git a/index.html b/index.html
index dd87e70..f055466 100644
--- a/index.html
+++ b/index.html
@@ -78,5 +78,10 @@
+
+