Skip to content
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

[DRAFT] Homebrewery as an Electron App #3502

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

G-Ambatte
Copy link
Collaborator

This draft PR is some initial work towards enabling the use of Homebrewery locally as a standalone Electron app.

While this PR produces the base functionality, the following issues have been identified:

  • prompt, alert, confirm all do not work in ElectronJS
    • login system does not work - uses prompt
  • switching to a new page often opens a new window

If you experiment with this and strike any issues, please record them here.

@5e-Cleric
Copy link
Member

  • prompt, alert, confirm all do not work in ElectronJS

#1537 was raised, we would need to get rid of those anyway.

login system does not work - uses prompt

If we are really working on a local version, we might as well use a different login system, similar to a OS login, simply username and password, and define a folder to save brews for every user.

switching to a new page often opens a new window

Right, we need to change how links work in local, or change it to a windowless browser instance, with multiple tabs..

@G-Ambatte
Copy link
Collaborator Author

G-Ambatte commented May 30, 2024

we need to change how links work in local

Or just specify a new value for NODE_ENV : electron.

EDIT: A quick test of this shows that the forcessl.mw.js file also needed to be updated for this to work. Currently this has been achieved via manual edit, but there should be a better way to achieve the same result with less technical debt going forward.

@G-Ambatte
Copy link
Collaborator Author

login system does not work - uses prompt

This makes me think of <dialog> element showModal() method. It's not blocking, but it does present in the top-layer so cannot be behind anything, and all elements outside of the <dialog> are rendered inert while it is present, so the user cannot perform any other actions while it is displayed - but crucially, server side functions can continue as normal.

https://developer.mozilla.org/en-US/docs/Web/API/HTMLDialogElement/showModal

@Gazook89
Copy link
Collaborator

Why would there be an account system at all?

@5e-Cleric
Copy link
Member

5e-Cleric commented May 30, 2024

Why would there be an account system at all?

For the same reason windows offers different accounts, multiple people might want multiple accounts in the same computer, i say we keep them for the local version.

@G-Ambatte
Copy link
Collaborator Author

Why would there be an account system at all?

If we were able to link to file system and thus have a users in their own folders, there might be less need for an account system.

That said, I still expect that some users will want to lock their documents so that it can't be viewed accidentally - and thus if they are exposed in the filesystem, they will not be protected.
I'm not sure which option is the best way forward; at the moment, this is just a small experimental side branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

3 participants