Skip to content

Commit

Permalink
Display cache and config dirs in settings window
Browse files Browse the repository at this point in the history
  • Loading branch information
trumank committed Aug 3, 2023
1 parent 9e397cf commit 54c5357
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 2 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
/target
/hook/target
/data
.env
32 changes: 32 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ image = { version = "0.24.6", default-features = false, features = ["png"] }
inventory = "0.3.6"
lazy_static = "1.4.0"
modio = { version = "0.7.1", features = ["rustls-tls"] }
opener = "0.6.1"
regex = "1.8.3"
repak = { git = "https://github.com/trumank/repak.git", version = "0.1.3" }
reqwest = { version = "0.11.18", features = ["blocking"] }
Expand Down
14 changes: 14 additions & 0 deletions src/gui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,20 @@ impl App {
}
});
ui.end_row();

let config_dir = self.state.project_dirs.config_dir();
ui.label("Config directory:");
if ui.link(config_dir.display().to_string()).clicked() {
opener::open(config_dir).ok();
}
ui.end_row();

let cache_dir = self.state.project_dirs.cache_dir();
ui.label("Cache directory:");
if ui.link(cache_dir.display().to_string()).clicked() {
opener::open(cache_dir).ok();
}
ui.end_row();
});

ui.with_layout(egui::Layout::right_to_left(egui::Align::TOP), |ui| {
Expand Down

0 comments on commit 54c5357

Please sign in to comment.