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

feat: Password logic #22

Merged
merged 6 commits into from
Jan 3, 2025
Merged

feat: Password logic #22

merged 6 commits into from
Jan 3, 2025

Conversation

matthme
Copy link
Collaborator

@matthme matthme commented Jan 2, 2025

Adds 3 different password modes password-optional, password-requiredand no-password with associated splashscreens.

@matthme matthme requested a review from a team January 2, 2025 08:59
Copy link

@c12i c12i left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know a lot of effort has gone in creating the html pages, but seeing how the complexity has greatly increased, I think using Svelte instead of Js here would be much better and easier to maintain, cleaning up event handlers that are added but never removed, reactive state management rather than direct DOM manipulation, and giving us more declarative and maintainable code.

This would also help with testing and debugging, while reducing the potential for bugs by handling component cleanup.

What do you think?

src/renderer/setupPassword.html Show resolved Hide resolved
src/renderer/enterPassword.html Show resolved Hide resolved
src/renderer/setupPasswordOptional.html Show resolved Hide resolved
src/renderer/setupPasswordOptional.html Outdated Show resolved Hide resolved
src/main/filesystem.ts Outdated Show resolved Hide resolved
src/main/filesystem.ts Show resolved Hide resolved
src/renderer/index.css Outdated Show resolved Hide resolved
@matthme
Copy link
Collaborator Author

matthme commented Jan 2, 2025

using Svelte instead of Js here would be much better and easier to maintain

During refinement it was decided that we should stick with vanilla JS for now to keep it agnostic of a specific framework but I agree that it is considerable complexity and rather error prone to handle all the state in plain js. So I'm not generally opposed to choose a specific framework for this (my preference would be lit, simply because I'm most familiar with it, but svelte would be okay too) but we should maybe hear other opinions as well...

@c12i
Copy link

c12i commented Jan 2, 2025

During refinement it was decided that we should stick with vanilla JS

I see, I think if more functionalities similar to this get added, then it would definitely warrant this change. Good enough for now.

So I'm not generally opposed to choose a specific framework for this (my preference would be lit, simply because I'm most familiar with it, but svelte would be okay too) but we should maybe hear other opinions as well...

No worries, definitely something that can be discussed separately. I suggested svelte since thats the framework launcher uses, and perhaps there could be some code from that project that could be used here

@matthme matthme merged commit b80eb74 into main Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants