Skip to content

Local, full Windows search replacement, clipboard manager, and launcher: files, apps, settings and semantic media search with Google's EmbeddingGemma 2.

Merge branch 'codex/localization' into codex/search-index-stability

ampersandruc278446e776c
diff --cc native/src/app.rs
index 508aab5,958ecd6..080874b
--- a/native/src/app.rs
+++ b/native/src/app.rs
@@@ -7100,10 -6939,10 +7093,10 @@@ impl eframe::App for App
}
}
if let Some(key) = self.remove_component.clone() {
- egui::Window::new("Uninstall downloaded item?").collapsible(false).resizable(false).show(ctx,|ui|{
+ dialog_window(ctx, "Uninstall downloaded item?", 440.0).collapsible(false).resizable(false).show(ctx,|ui|{
ui.label(format!("Remove the downloaded {key} files? Index data is kept. Active indexing and model work will stop."));
ui.horizontal(|ui|{
- if ui.button("Uninstall").clicked(){
+ if ui.button(t("Uninstall")).clicked(){
self.remove_component=None;self.setup_busy=true;self.dictation_cancel.store(true,Ordering::Release);self.engine.control.cancel_by_user();
let home=self.home.clone();let settings=self.s.clone();let models=self.engine.models.clone();let tx=self.engine.tx.clone();
std::thread::spawn(move||{let result=models.stop().and_then(|_|{
@@@ -7339,10 -7178,10 +7332,10 @@@
});
}
if self.uninstall_confirm {
- egui::Window::new("Uninstall downloaded models and runtimes?").collapsible(false).show(ctx,|ui|{
+ dialog_window(ctx, "Uninstall downloaded models and runtimes?", 440.0).collapsible(false).show(ctx,|ui|{
ui.label("Remove managed downloads from the current and legacy VectorDash folders? Source files, external tools and the index are kept. Automatic indexing will pause.");
if ui.button("Uninstall downloads").clicked(){self.uninstall_downloads();}
- if ui.button("Cancel").clicked(){self.uninstall_confirm=false;}
+ if ui.button(t("Cancel")).clicked(){self.uninstall_confirm=false;}
});
}
if self.clear_index_confirm {
@@@ -7476,27 -7288,9 +7471,27 @@@
self.mcp = None;
}
}
+fn dialog_window<'a>(ctx: &egui::Context, title: &'a str, width: f32) -> egui::Window<'a> {
+ let bounds = ctx.content_rect().shrink(12.0);
+ let width = width.min((bounds.width() - 24.0).max(120.0));
+ egui::Window::new(title)
+ .id(egui::Id::new(("app-dialog", title)))
+ .constrain_to(bounds)
+ .default_pos(egui::pos2(
+ (bounds.center().x - width * 0.5).max(bounds.left()),
+ bounds.top(),
+ ))
+ .default_width(width)
+ .min_width(120.0)
+ .max_width((bounds.width() - 24.0).max(120.0))
+ .min_height(0.0)
+ .max_height((bounds.height() - 48.0).max(40.0))
+ .vscroll(true)
+}
+
fn combo(ui: &mut egui::Ui, id: &str, value: &mut String, items: &[&str]) -> egui::Response {
egui::ComboBox::from_id_salt(id)
- .selected_text(if *value == "Both" {
+ .selected_text(t(if *value == "Both" {
"Hybrid"
} else if *value == "Names" {
"File/Folder Names"