-
Notifications
You must be signed in to change notification settings - Fork 0
Could you help me get started on dev in this? #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If I copy the node_modules and window folder from the binary distribution to the source one then it seems to work. |
Hi, Thanks for bringing up this issue. I've looked into it a bit, and it seems that the error in the browser console is from the |
@PAEz I've managed to remove the error, but it isn't as good as it used to be. I've opened an issue with the creator of custom-electron-titlebar. For now, though, you should be able to pull the latest code, reinstall node_modules, and have a working version 😃 |
Thanks mate, that worked. |
Glad to hear it! |
I'm closing this issue for now, feel free to comment back if you need any more help. |
Hello again. EDIT: Updated coz I noticed that the options in the preload where changed, so now the preload saves the options to main so that renderer can then ask the pre to get the options from main....hahahaha, I love jumping through hoops for securities sake. Also had to make the renderer wait for the page load to stop a race condition with updating the options.....Im not even sure thats a full fix, but seems to be consistent |
Getting close to just dumping this whole idea. EDIT: Tried everything here..... |
Hi @PAEz ,
I believe this is an issue with how the web version of Photopea asks about unsaved work before you can close the tab. Whenever I use photopealoader, I save or close all unsaved opened documents before exiting (this works well). I'm not sure how to properly integrate this into Electron, but I'll look into it. As you said, |
https: //github.com//issues/2 Co-Authored-By: PAEz <785449+PAEz@users.noreply.github.com>
That works fine, good stuff. And thanks for putting my name in, I like getting my name on things. ;P EDIT: Promises, Microtasks and Macrotasks SUCK!!!!! |
@PAEz Seems pretty cool. I utilize some of the features of having Photopea in an iframe, such as making an Open With Photopea system, and the Resources folder. One plausibility, using Electron, is getting the resources in preload. |
Oh wait. Webview. Edit: webview tag is deprecated and doesn't work all that well. Not sure how to go about this. |
Sorry, think we have some communication crossed wires. EDIT: Just changed photopea.js some more, hope I havent gone to far ;P Also added a zindex to the loading element so it covers the screen and dont remove it till everything is done. |
@PAEz New gist looks good, I updated master to match. Edit: just figured out the plugins, I think it's an easy fix, I'll update soon. |
Today was a good day, finally got rudimentary (still got to do the options dialog, grrrrrrr) save and load working!!....so happy ;P Sorry about the plugins breaking. This is why I try to explain that I have problems and make dumb mistakes....never take it that my code just works, always good to go over it. I moved your fix to main.js, "separation of concerns" and all that. I dont really have any coding conventions, but the things I always keep in mind are size, speed, modularity - separation of concerns - reuse (those three usually go together to me). The IO thing is an option that must be enabled by setting the property If you ever have any questions as to why I did something, just ask and if you have any criticisms just say... I do NOT get offended by them in the slightest, I welcome them. Talking of doing things. Ive marked a few areas that Id like to take out and make part of the Photopea API. I see these files being in a folder with Photopea.js named main.js and preload.js that must be required in. This will take out a bunch of code that really shouldnt be there. All the code in main and preload should be to do with the app and not Photopea.js. I think I deleted the no frames version, Ill make another one soon. Theres not much to it. Move renderer to preload, make Photopea.js handle not setting up an iframe. Make main.js open the site in the browser. Pretty sure thats all it was. |
@PAEz Very impressed with the new code! It's quite seamless as far as I can tell.
I understand how it works now. I was just curious; no need to remake it for me unless you want to. Thanks for the explanation! |
@PAEz Oh yeah... thanks for commenting on my YouTube video, by the way 😆 |
I did a lot of testing with a no frames version yesterday, that and trying to get it to flash less when it first appears. I noticed your youtube coz I was looking for plugins for dev reasons and the only ones I found where yours. Cool stuff! I learnt to code because I was interested in how it all worked, making the computer do what I want and then the BIG thing for me was the Demo Scene. People making amazing graphical things on old slow computers. Due to my messed up brain I wasnt up to compete, but they directed my learning and I owe them a lot. Those conventions I mentioned above where instilled into me by my first teacher who was a demo coder. Particularly liked Zeus, but unfortunately it was broken. Didnt work at all in FF and chrome showed one lightning but then bugged out in the console. I wish I had my old code for lightning, but I have nothing from my past. Oh and if you dont know what the demo scene is and you like making graphical stuff, got pouet.net and have your mind blown. That and shadertoy. |
For some reason, the custom close handler doesn't work anymore, as mentioned here: AlexTorresDev/custom-electron-titlebar#183 I added a splash screen, which isn't perfect, but does look much nicer than the not completely truthful I did take a look at the Demoscene, it was very cool. I'm trying to kickstart a thing surrounding graphics software, so I should probably get better at this type of tech 😅 A lot of my graphics stuff uses SVG, which sometimes works great, but is limited in some areas and many browsers haven't quite caught up to it. You probably noticed this with Zeus, which started out as an experiment. I had come up with a new method for making lightning effects with Photopea, and after learning about turbulent displacement in SVG, I just had to try it out. I have some other apps which are clunky like that, I'm trying to solve this by marketing the web versions as more of a demo and encouraging people to install the desktop versions, which run on Electron and therefore use a fixed browser with little room for incompatibility. |
@PAEz Bit of an issue with the file extension restrictions, it doesn't allow for many file types supported by Photopea including videos, brushes, patterns, fonts, actions, etc. Do you know if there's a way to fix this, other than manually writing in all of the file types? I may comment out the file type restrictions just for now, until we find a solution. |
Sorry, didnt even think of that. I gotta admit Im not so into this now that Ive gotten to know PP more. I was really interested in the scripting but its rather lacking and the dev never seems interested in making his app better so dont see that changing. Its little things like not being able to change the resize type ( https://www.reddit.com/r/photopea/comments/tdjehp/need_help_with_a_simple_script/ ). And now I find out hes made scripting garbage by making it now synchronous ( https://www.reddit.com/r/photopea/comments/t4wx7p/scripting_and_json_configuration_file_instant/ ) which is going to cause me grief. But Ill still try and get all the main stuff done anyway. |
@PAEz Thanks for the update to photopea.js, works great! I like the |
Hi, Id like to try a couple of things with your code but Im dumb and cant get started.
I downloaded your source code, went to the directory, typed "npm install", all seemed to go good, typed "npm start" and all I get is a page saying Updating....
In the windows console I get....
...and in the browsers console is.....
Any help getting started would be much appreciated, thanks.
Oh and this is on Windows.
The text was updated successfully, but these errors were encountered: