NeverDecaf / discord-PWA

A wrapper for the Discord web client as a PWA, made for Chromium browsers on desktop.
MIT License
145 stars 13 forks source link

[Question] What about the Electron? #15

Closed SpacingBat3 closed 3 years ago

SpacingBat3 commented 3 years ago

Hi there,

Just to mention at first, this is not an issue, but rather a question. And I don't expect it will be treated as the important one.

As you might know me earlier from the issue #6, I've also started to search for the alternative to the chrome web applications – at first I've found this repository, but the way it looked and worked weren't just as great as I expected and I knew i need to look for something different. Then, I've found the nativefier that uses the electron engine to generate the app. This sollution were good for having generic web app generation, but it weren't when you want to maintain, add to it code or tweak it. So I've jumped then to the electron itself – today I have made this repository. As today it has many functionalities like a working tray or "single session lock", it still need much more than today.

I'm writting there mostly to give this sollution some attention (not just for bigger insterest with my repository). I'm also curious why you didn't tried by yourself doing the app with the Electron – even the official Discord client is still using it.

Some advantages of using Electron

Disadvantages:

Help wanted

As you know much about the CSS, HTML and JS why don't you help me to improve this app? As I'm myself rather the begginer with the JS, CSS and HTML (from JS I know only the basics and the Electron syntax that I've learnt from their docs – but I've also the experience with writing a shell scripts on Linux), this project would be way better having some collaborators / contributors with good JS and CSS knowledge.

The good example where I need help is making the custom tittle bar – but I don't have a proper assets (images of the buttons) + don't know how to adapt your CSS to it (however it is possible to do with same ways you did it on your web apps and even Electron has in it's API declarations to create a window without borders and to make a part of the HTML site draggable).

NeverDecaf commented 3 years ago

Part of the reason I started this project in the first place is because the official client uses Electron. I don't want to run a separate browser (with all the resource usage that implies) just to display a single webpage.

The main reason I created the original Chrome app is that I didn't like how the official client was granted access to my computer via native APIs. I realize you can disable this when creating your own Electron app, but I didn't want to burden users with either needing to trust that I haven't added any malicious code to binaries (whether intentionally or by error), or audit and compile the app from source every time there is an update.

As for the title bar, it is all generated through CSS and HTML via the <svg> tag, there are no images used. If you are willing to run the official app, you can open the built-in chromium devtools (ctrl+shift+i) to see exactly how everything is done.

I should also mention that this web app (and all PWAs) can be themed with CSS and modified/extended with JS via extensions like TamperMonkey and Stylus. If you are interested in modifying Discord there is something called BetterDiscord(?) with a large community developing themes/extensions for the official client, perhaps you will want to make your app compatible with their themes so users can instantly have access to a large library of customization options.

SpacingBat3 commented 3 years ago

ok, thank you, gonna close that issue...