feat(gui-client): set a different tray icon when signed out#5817
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
@jamilbk You can replace this file, I'm planning to package this in the binary and extract it to a cache dir the same way we unpack this is the placeholder signed-out iconwintun.dll. It ends up writing redundant data to disk but it looks easy and it's only 20 KB
Also 2 other questions:
- Do we need a "signing in" icon in addition to "signed in" and "signed out"? There are actually 5 possible menu states, the other 3 are "Waiting on browser", "Waiting on connlib", and "Loading" https://github.com/firezone/firezone/pull/5817/files#diff-f99d43b72eb35bc908c93849dd50e0b2be5e2c676b72e4f9266f1c3caeca9deaR57-R62
- While we're fixing the icons, can we fix bug(gui-client): the tray icon has poor contrast against the default dark Ubuntu task bar #5014? It came up again with Fix favicon #5822
Terraform Cloud Plan Output |
Performance Test ResultsTCP
UDP
|
| Ok(()) | ||
| } | ||
|
|
||
| fn tray_menu() -> Result<()> { |
There was a problem hiding this comment.
Wasn't needed anymore
…icon Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
| run: pnpm tailwindcss -i src/input.css -o src/output.css | ||
| - name: Build client | ||
| run: cargo build -p firezone-gui-client | ||
| run: cargo build -p firezone-gui-client --all-targets |
There was a problem hiding this comment.
This allows us to remove cargo build invocations from the gui-smoke-test Rust binary
…c' into feat/tauri-set-icon
…icon Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
conectado
left a comment
There was a problem hiding this comment.
LGTM!
Left a few comments but nothing pressing/blocking, feel free to merge
| pub(crate) enum Cmd { | ||
| SetAutostart(SetAutostartArgs), | ||
| TrayMenu, | ||
| } |
There was a problem hiding this comment.
can we not have a subdommand now?
There was a problem hiding this comment.
This was for debugging a previous PR and I didn't need it anymore
| .await | ||
| .context("Failed to send ClearLogs request")?; | ||
|
|
||
| // Tray icon stress test |
There was a problem hiding this comment.
what's the purpose of this stress test?
There was a problem hiding this comment.
There is a strange part deep inside Tauri that exports the icon as a PNG to /run every time we call set_icon: https://github.com/tauri-apps/tao/blob/tao-v0.16.7/src/platform_impl/linux/system_tray.rs#L119
I wanted to make sure this doesn't take too long or use too much disk. It looks fine, and /run is supposed to be a RAM disk, so it won't use real disk space. But in case there's a performance regression or something, it could show up here.
| // TODO: Show some "Waiting for portal..." state if we got the deep link but | ||
| // haven't got `on_tunnel_ready` yet. | ||
| if let Some(auth_session) = self.auth.session() { | ||
| let menu = if let Some(auth_session) = self.auth.session() { |
There was a problem hiding this comment.
We can reduce indentation a bit by using a let Some(auth_session) = self.auth.session() else { ... } here
There was a problem hiding this comment.
I'm having trouble seeing it because there's 3 branches, it returns menu and then calls self.tray.update
Closes #5810