Conversation
Co-authored-by: Mitchell Rysavy <mitchell.rysavy@gmail.com>
Co-authored-by: Mitchell Rysavy <mitchell.rysavy@gmail.com>
…dreset-tools-window
feat: tools window with supervisor verification for password reset
feat: Addded update button for file selection, progress window and data backup
…o feature/v2-password-reset
feat: password validation and strength meter
Feature/s2026 passwordreset
pul request from main to get it up to date
S2026 new lang: change made for french Lang
Merge pull request #62 from C4G/s2026-new-lang
S2026 new lang: update the password english
Feature/s2026 self update
mrysav
left a comment
There was a problem hiding this comment.
@hakiatalov @ranjinikrishnan @simotony77 @asuquoe62-star @luqmanrashad @Tjones1701
Good work all! I have some suggestions and some discussions below. In general there is nothing here that I wouldn't merge in main - just some areas where I think we should refactor in the long term. Ultimately the goal is that most features don't live in the launcher after all, but within BLIS itself. The launcher really just needs to be reliable, and I see a lot of good things to that end here.
If you'd like to push more changes to the unstable branch based on my feedback, please feel free. After the semester ends, I'll merge it and work on getting a proper release out.
| <DockPanel> | ||
|
|
||
| <Border DockPanel.Dock="Top" Background="#005A9C" Padding="16 12"> | ||
| <TextBlock Foreground="White" FontSize="16" FontWeight="SemiBold">BLIS Tools</TextBlock> |
There was a problem hiding this comment.
@asuquoe62-star @Tjones1701 @simotony77 If any of you are interested before the semester end, all of the text in this file looks like it needs to be separated into the Resources file and translated.
(this comment is irrelevant if the Tools window is not used, per my comment above)
There was a problem hiding this comment.
@mrysav
Done! I have pushed the following changes to the feature/s2026-modern-password-hashing branch:
- Created Lang/Resources.resx with English strings for all UI text across MainWindow, ToolsWindow, and PasswordResetDialog
- Created Lang/Resources.fr.resx with French translations of all those strings
- Updated BLIS-NG.csproj to register the resx files and generate the BLIS_NG.Lang.Resources strongly-typed class
- Updated Views/MainWindow.axaml, Views/ToolsWindow.axaml, and Views/PasswordResetDialog.axaml to replace all hardcoded text with {x:Static lang:Resources.KeyName} bindings
- Removed the commented-out Updates tab from ToolsWindow.axaml per your suggestion
The translation system builds on the LanguagePreferences and culture-switching logic already in the unstable branch. At runtime, if launcher-language.txt is set to "fr", .NET automatically serves strings from Resources.fr.resx. If set to "en" or absent, it falls back to Resources.resx. No additional code changes were needed beyond the resource files and the AXAML updates
| <TextBlock FontSize="18" FontWeight="Bold">Reset User Password</TextBlock> | ||
|
|
||
| <StackPanel Spacing="4"> | ||
| <TextBlock>Username</TextBlock> |
There was a problem hiding this comment.
@asuquoe62-star @Tjones1701 @simotony77 If any of you are interested before the semester end, all of the text in this file looks like it needs to be separated into the Resources file and translated.
|
|
||
| namespace BLIS_NG.ViewModels; | ||
|
|
||
| public class UpdateProgressViewModel : ViewModelBase |
There was a problem hiding this comment.
So, I'm not going to block on this, but putting the update logic in this class is an antipattern.
Avalonia (which traces its lineage to Microsoft's WPF forms) uses the "MVVM" pattern where "VM" is "ViewModel," and "view models" are where the weird bits of logic that deal with updating the data layer of the UI but aren't strictly to do with the UI.
Sort of weird, but it does make sense, and for the most part the codebase should follow that. Practically speaking I would suggest that this logic should live in its own set of utility classes (the "model") and injected into this view model which then interacts with them.
| return Convert.ToHexString(bytes).ToLowerInvariant(); | ||
| } | ||
|
|
||
| private string? ValidatePassword(string password) |
There was a problem hiding this comment.
@simotony77 It seems like this is duplicate logic from above- maybe separate it into its own function?
|
|
||
| namespace BLIS_NG.ViewModels; | ||
|
|
||
| public class PasswordResetViewModel : ViewModelBase |
There was a problem hiding this comment.
@simotony77 I have same comment on this class as I do the update one below. I'm not blocking this, but the Avalonia MVVM pattern should be used, and much of this should be in a model class. The ViewModel class should really just be used for the bridge between the view itself and the business logic.
| private const string DefaultLanguageCode = "en"; | ||
| private const string SettingsFileName = "launcher-language.txt"; | ||
|
|
||
| public static string GetLanguageCode() |
There was a problem hiding this comment.
Language code should be implemented as an enum, or something else that provides more of a compile-time guarantee about the values, rather than a string.
…o have a single grid, misc code cleanup
I am opening this PR to track the review on the
unstablebranch - don't merge this! I will merge this PR when my review is completed.I will tag people in comments as I make, and you can follow up in that thread.