Add a setting to hide community apps (#1136)

This commit is contained in:
Dylan M. Taylor
2026-11-01 12:28:36 -05:00
committed by GitHub
parent c3b6a8dfc2
commit 9a9a1004b4
14 changed files with 50 additions and 0 deletions
+1
View File
@@ -869,6 +869,7 @@ impl LauncherUi {
.enumerate()
.filter(|(_, e)| {
self.in_filter(e, self.settings.filter)
&& !(self.settings.hide_community_apps && e.app.kind == artcraft_launcher_core::catalog::AppKind::Community)
&& (needle.is_empty() || e.app.name.to_lowercase().contains(&needle) || e.app.tagline.to_lowercase().contains(&needle))
})
.collect();
+1
View File
@@ -370,3 +370,4 @@ texturecraft Materials Materiály
texturecraft Mesh maps Mapy sítí
texturecraft Bake mesh maps and use smart materials. Vypékejte mapy sítí a používejte inteligentní materiály.
texturecraft Paint textures on 3D models. Malujte textury na 3D modely.
Hide community apps Skrýt komunitní aplikace
1 # Czech (cs) catalog for ArtCraft Launcher.
370 texturecraft
371 texturecraft
372
373
+1
View File
@@ -402,3 +402,4 @@ texturecraft Materials Materialien
texturecraft Mesh maps Mesh-Maps
texturecraft Bake mesh maps and use smart materials. Mesh-Maps backen und intelligente Materialien verwenden.
texturecraft Paint textures on 3D models. Texturen auf 3D-Modelle malen.
Hide community apps Community-Apps ausblenden
Can't render this file because it contains an unexpected character in line 11 and column 16.
+1
View File
@@ -383,3 +383,4 @@ texturecraft Materials Materiales
texturecraft Mesh maps Mapas de malla
texturecraft Bake mesh maps and use smart materials. Hornea mapas de malla y usa materiales inteligentes.
texturecraft Paint textures on 3D models. Pinta texturas en modelos 3D.
Hide community apps Ocultar aplicaciones de la comunidad
Can't render this file because it contains an unexpected character in line 5 and column 48.
+1
View File
@@ -400,3 +400,4 @@ texturecraft Materials Matériaux
texturecraft Mesh maps Cartes de maillage
texturecraft Bake mesh maps and use smart materials. Calculez des cartes de maillage et utilisez des matériaux intelligents.
texturecraft Paint textures on 3D models. Peignez des textures sur des modèles 3D.
Hide community apps Masquer les applications communautaires
Can't render this file because it contains an unexpected character in line 5 and column 50.
+1
View File
@@ -403,3 +403,4 @@ texturecraft Materials Anyagok
texturecraft Mesh maps Hálótérképek
texturecraft Bake mesh maps and use smart materials. Süss ki hálótérképeket, és használj intelligens anyagokat.
texturecraft Paint textures on 3D models. Fess textúrákat 3D modellekre.
Hide community apps Közösségi alkalmazások elrejtése
Can't render this file because it contains an unexpected character in line 11 and column 16.
+1
View File
@@ -405,3 +405,4 @@ texturecraft Materials マテリアル
texturecraft Mesh maps メッシュマップ
texturecraft Bake mesh maps and use smart materials. メッシュマップをベイクし、スマートマテリアルを使用します。
texturecraft Paint textures on 3D models. 3Dモデルにテクスチャを描きます。
Hide community apps コミュニティアプリを非表示
Can't render this file because it contains an unexpected character in line 14 and column 44.
+1
View File
@@ -404,3 +404,4 @@ texturecraft Materials Materiały
texturecraft Mesh maps Mapy siatki
texturecraft Bake mesh maps and use smart materials. Wypiekaj mapy siatki i używaj inteligentnych materiałów.
texturecraft Paint textures on 3D models. Maluj tekstury na modelach 3D.
Hide community apps Ukryj aplikacje społeczności
Can't render this file because it contains an unexpected character in line 11 and column 15.
+1
View File
@@ -390,3 +390,4 @@ texturecraft Materials Materiais
texturecraft Mesh maps Mapas de malha
texturecraft Bake mesh maps and use smart materials. Gere mapas de malha e use materiais inteligentes.
texturecraft Paint textures on 3D models. Pinte texturas em modelos 3D.
Hide community apps Ocultar aplicativos da comunidade
Can't render this file because it contains an unexpected character in line 258 and column 66.
+1
View File
@@ -398,3 +398,4 @@ texturecraft Materials Материалы
texturecraft Mesh maps Карты сетки
texturecraft Bake mesh maps and use smart materials. Запекайте карты сетки и используйте умные материалы.
texturecraft Paint textures on 3D models. Рисуйте текстуры на 3D-моделях.
Hide community apps Скрыть приложения сообщества
Can't render this file because it contains an unexpected character in line 13 and column 44.
+1
View File
@@ -370,3 +370,4 @@ texturecraft Materials 材质
texturecraft Mesh maps 网格贴图
texturecraft Bake mesh maps and use smart materials. 烘焙网格贴图并使用智能材质。
texturecraft Paint textures on 3D models. 在 3D 模型上绘制纹理。
Hide community apps 隐藏社区应用
Can't render this file because it contains an unexpected character in line 4 and column 3.
+3
View File
@@ -119,6 +119,8 @@ pub struct Settings {
pub notified: BTreeMap<String, String>,
/// Unix seconds of the last finished check.
pub last_check: Option<i64>,
/// Hide community apps from the catalog without changing their installation or update settings.
pub hide_community_apps: bool,
/// Catalog ids of apps hidden from the main lists (`photocraft`, …).
pub hidden: std::collections::BTreeSet<String>,
/// The one-time notice that closing the window keeps the launcher in the tray has been shown.
@@ -206,6 +208,7 @@ impl Default for Settings {
dismissed_notices: std::collections::BTreeSet::new(),
notified: BTreeMap::new(),
last_check: None,
hide_community_apps: false,
hidden: std::collections::BTreeSet::new(),
tray_hint_shown: false,
launches: BTreeMap::new(),
+1
View File
@@ -361,6 +361,7 @@ impl LauncherUi {
ui.horizontal(|ui| {
widgets::cells(ui, &mut theme_choice, &ThemeChoice::ALL.map(|c| (c, Cell { label: c.label(), tip: c.label(), count: None })));
});
ui.checkbox(&mut self.settings.hide_community_apps, tl!("Hide community apps"));
});
self.settings.theme = theme_choice;
}
+35
View File
@@ -1538,6 +1538,41 @@ fn the_first_close_to_the_tray_is_explained_once() {
assert!(host.0[0].1.contains("tray icon"), "{}", host.0[0].1);
}
#[test]
fn community_apps_can_be_hidden_and_restored_in_settings() {
for view in [ViewMode::Grid, ViewMode::Table] {
let (mut h, _) = harness(view, egui::Theme::Dark, true);
h.run_steps(6);
assert!(!h.state().as_ref().unwrap().settings.hide_community_apps);
assert!(h.query_by_label("SolidCraft details").is_some());
h.get_by_label("Settings").click();
h.run_steps(4);
h.get_by_label("Hide community apps").click();
h.run_steps(2);
assert!(h.state().as_ref().unwrap().settings.hide_community_apps);
h.get_by_label("Done").click();
h.run_steps(4);
assert!(h.query_by_label("SolidCraft details").is_none());
assert!(h.query_by_label("PhotoCraft details").is_some());
h.get_by_label("Settings").click();
h.run_steps(4);
h.get_by_label("Hide community apps").click();
h.run_steps(2);
h.get_by_label("Done").click();
h.run_steps(4);
assert!(h.query_by_label("SolidCraft details").is_some());
}
}
#[test]
fn community_visibility_preference_round_trips_and_defaults_off_for_old_settings() {
let old: Settings = serde_json::from_str("{}").unwrap();
assert!(!old.hide_community_apps);
let settings = Settings { hide_community_apps: true, ..old };
let restored: Settings = serde_json::from_str(&serde_json::to_string(&settings).unwrap()).unwrap();
assert!(restored.hide_community_apps);
}
#[test]
/// The Settings dialog announces its heading once and shows the community section's Discord
/// entry alongside the footer's.