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: show vpn start/stop failure in app #44

Merged
merged 2 commits into from
Mar 6, 2025
Merged

Conversation

deansheather
Copy link
Member

Adds red text that appears when the VPN fails to start or stop. After an error, any manual start/stop operation will clear the error.

Changes a lot of the optional components (TextBlocks, etc.) in the tray window to use bools for visibility rather than custom converters, because the logic behind whether to show them is slightly more complicated now. I could've maybe rearranged the app and shifted everything around into multiple parent containers for each condition that we check but it seemed harder than just using bools on the view model.

Most of the lines in this PR were from restructuring the XAML to make it simpler (and unindenting many lines in the process).

image

Contributes to #40

[NotifyPropertyChangedFor(nameof(ShowWorkspacesHeader))]
[NotifyPropertyChangedFor(nameof(ShowNoAgentsSection))]
[NotifyPropertyChangedFor(nameof(ShowAgentsSection))]
[NotifyPropertyChangedFor(nameof(ShowFailedSection))]
Copy link
Collaborator

Choose a reason for hiding this comment

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

ShowFailedSection doesn't depend on the lifecycle.

It really is annoying that we have to maintain these deps this way, where you have to mark the dependency, not the dependent. Harder to verify it's correct.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I definitely don't like it either. Since it's a decorator attribute I wonder if someone could write an inverse version of this using codegen or something. Maybe one already exists and I've just been doing it the dumb way

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for spotting this though!

@deansheather deansheather enabled auto-merge (squash) March 6, 2025 13:08
@deansheather deansheather merged commit 51bf68e into main Mar 6, 2025
3 checks passed
@deansheather deansheather deleted the dean/vpn-start-error branch March 6, 2025 13:12
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