-
Notifications
You must be signed in to change notification settings - Fork 11
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
Show a toast notification when changing security profiles #1890
base: main
Are you sure you want to change the base?
Show a toast notification when changing security profiles #1890
Conversation
bb3bf9a
to
67f3a33
Compare
@@ -202,6 +202,12 @@ Page { | |||
// This guards the wasm version to trigger a reload even if the reply isn't received. | |||
BackendConnection.securityProtocolChanged() | |||
Global.pageManager.popPage() | |||
if (Qt.platform.os === "wasm") { | |||
Global.showToastNotification(VenusOS.Notification_Info, | |||
//% "Page will automatically reload in 5 seconds" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you change this so it does something like:
Global.showToastNotification(
VenusOS.Notification_Info,
BackendConnection.isVrm
//% "Closing due to security protocol change, you will need to relaunch remote console via VRM"
? qsTrId("access_and_security_closing_remote_console")
//% "Page will automatically reload in 5 seconds"
: qsTrId("access_and_security_page_will_reload"),
3000)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, now I wonder ... do we actually need to reload the page, for VRM connections?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I think we can just add a check like: "if (!isVrm()) return;" at the start of BackendConnection::securityProtocolChanged(), as I don't think we need to reload the page if we are connected to VRM (rather than to the cerbo's web server directly). See for example the similar check in BackendConnection::onNetworkConfigChanged().
Then, I think here in this code, we should just raise the toast notification you originally had, but ONLY if we are NOT connected via VRM. e.g.: add a condition && !BackendConnection.isVrm
to the if statement above.
67f3a33
to
c92c207
Compare
For wasm builds only. "Page will automatically reload in 5 seconds" Part of #1881
c92c207
to
8efc8e8
Compare
For wasm builds only. "Page will automatically reload in 5 seconds" Fixes 1881