Skip to content

Commit 73d7f41

Browse files
authored
Merge branch 'main' into lucas/no-verbose
2 parents 5c13452 + e066013 commit 73d7f41

File tree

8 files changed

+1235
-326
lines changed

8 files changed

+1235
-326
lines changed

Cargo.lock

Lines changed: 1024 additions & 150 deletions
Large diffs are not rendered by default.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ eframe = { version = "0.33.0", features = ["glow", "default", "persistence", "ro
2626
egui_extras = { version = "0.33.0", features = ["image", "file", "http"] }
2727
egui_inbox = { version = "0.10.0", features = ["async", "tokio"] }
2828
ehttp = { version = "0.5.0", features = ["native-async"] }
29-
env_logger = { version = "0.11.8", default-features=false, features = ["auto-color", "humantime"] }
29+
env_logger = { version = "0.11.8", default-features = false, features = ["auto-color", "humantime"] }
3030
flate2 = { version = "1.1" }
3131
futures = "0.3.31"
3232
getrandom = { version = "0.3", features = ["wasm_js"] }
@@ -38,7 +38,7 @@ octocrab = { version = "0.47.0", default-features = false, features = ["stream"]
3838
octocrab-wasm = { path = "crates/octocrab-wasm" }
3939
re_ui = { git = "https://github.com/rerun-io/rerun", branch = "main" }
4040
reqwest = { version = "0.12.23", default-features = false, features = [
41-
"rustls-tls",
41+
"rustls-tls", "rustls-tls-webpki-roots"
4242
] }
4343
serde = "1.0"
4444
serde_json = "1.0"
@@ -54,7 +54,7 @@ zip = { version = "6.0.0", default-features = false, features = ["deflate"] }
5454
axum = "0.8.6"
5555
clap = { version = "4.5", features = ["derive"] }
5656
env_logger = "0.11.8"
57-
git2 = { version = "0.20.2" }
57+
gix = { version = "0.73", default-features = false, features = ["blocking-network-client", "blob-diff", "merge"] }
5858
ignore = { version = "0.4" }
5959
tokio = { version = "1.47", features = ["full"] }
6060

src/app.rs

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
use crate::config::Config;
21
use crate::diff_image_loader::DiffImageLoader;
32
use crate::settings::Settings;
43
use crate::state::{AppState, AppStateRef, PageRef, SystemCommand, ViewerSystemCommand};
54
use crate::{DiffSource, bar, home, viewer};
6-
use eframe::egui::{Context, Key, Modifiers};
5+
use crate::{config::Config, state::View};
6+
use eframe::egui::{Context, Modifiers};
77
use eframe::{Frame, Storage, egui};
88
use egui_extras::install_image_loaders;
99
use egui_inbox::UiInbox;
@@ -172,21 +172,15 @@ impl App {
172172
state.send(ViewerSystemCommand::SelectSnapshot(new_index));
173173
}
174174

175-
let handle_key = |key: Key, toggle: &mut bool| {
176-
if ctx.input_mut(|i| i.key_pressed(key)) {
177-
*toggle = true;
175+
let mut new_view = vs.state.view;
176+
for view in View::ALL {
177+
if ctx.input_mut(|i| i.consume_key(Default::default(), view.key())) {
178+
new_view = view;
178179
}
179-
if ctx.input_mut(|i| i.key_released(key)) {
180-
*toggle = false;
181-
}
182-
};
183-
184-
let mut view_filter = vs.state.view_filter;
185-
handle_key(Key::Num1, &mut view_filter.show_old);
186-
handle_key(Key::Num2, &mut view_filter.show_new);
187-
handle_key(Key::Num3, &mut view_filter.show_diff);
188-
if view_filter != vs.state.view_filter {
189-
state.send(ViewerSystemCommand::SetViewFilter(view_filter));
180+
}
181+
182+
if new_view != vs.state.view {
183+
state.send(ViewerSystemCommand::SetView(new_view));
190184
}
191185
}
192186
}

src/cli.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub enum Commands {
1818
Files { directory: Option<String> },
1919
/// Compare images between current branch and default branch
2020
Git { repo_path: Option<String> },
21-
/// Compare images between PR branches from GitHub PR URL (needs to be run from within the repo)
21+
/// Compare images between PR branches from GitHub PR URL
2222
Pr { url: String },
2323
/// Load and compare snapshot files from a zip archive (URL or local file)
2424
Archive { source: String },

0 commit comments

Comments
 (0)