diff --git a/.vscode/extensions.json b/.vscode/extensions.json deleted file mode 100644 index f8d40f3..0000000 --- a/.vscode/extensions.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "recommendations": [ - "vivaxy.vscode-conventional-commits", - "gruntfuggly.todo-tree", - "rust-lang.rust-analyzer", - "bungcip.better-toml", - "serayuzgur.crates" - ] -} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index 939424b..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - // Use IntelliSense to learn about possible attributes. - // Hover to view descriptions of existing attributes. - // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 - "version": "0.2.0", - "configurations": [ - { - "type": "lldb", - "request": "launch", - "name": "Debug", - "cargo": { - "args": [ - "build", - "--bin=honkers-railway-launcher", - "--package=honkers-railway-launcher" - ], - "filter": { - "name": "honkers-railway-launcher", - "kind": "bin" - } - }, - "args": [], - "cwd": "${workspaceFolder}" - } - ] -} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index 9210ffa..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "conventionalCommits.scopes": [ - "tracing", - "core", - "ui", - "i18n" - ], - "editor.tabCompletion": "on", - "diffEditor.codeLens": true -} \ No newline at end of file diff --git a/src/ui/first_run/dependencies.rs b/src/ui/first_run/dependencies.rs index e43883a..0f5490e 100644 --- a/src/ui/first_run/dependencies.rs +++ b/src/ui/first_run/dependencies.rs @@ -10,7 +10,8 @@ use super::main::FirstRunAppMsg; pub struct DependenciesApp { show_arch: bool, show_debian: bool, - show_fedora: bool + show_fedora: bool, + show_list: bool } #[derive(Debug, Clone)] @@ -21,9 +22,9 @@ pub enum DependenciesAppMsg { #[relm4::component(async, pub)] impl SimpleAsyncComponent for DependenciesApp { - type Init = (); type Input = DependenciesAppMsg; type Output = FirstRunAppMsg; + type Init = (); view! { adw::PreferencesPage { @@ -104,6 +105,28 @@ impl SimpleAsyncComponent for DependenciesApp { set_text: "sudo dnf install git xdelta p7zip", set_editable: false } + }, + + gtk::Box { + set_orientation: gtk::Orientation::Vertical, + set_spacing: 16, + + #[watch] + set_visible: model.show_list, + + adw::PreferencesGroup { + adw::ActionRow { + set_title: "git" + }, + + adw::ActionRow { + set_title: "xdelta3" + }, + + adw::ActionRow { + set_title: "p7zip" + } + } } } }, @@ -138,7 +161,7 @@ impl SimpleAsyncComponent for DependenciesApp { async fn init(_init: Self::Init, root: Self::Root, _sender: AsyncComponentSender) -> AsyncComponentParts { let distro = whatadistro::identify(); - let model = Self { + let mut model = Self { show_arch: match &distro { Some(distro) => distro.is_similar("arch"), None => false @@ -152,9 +175,13 @@ impl SimpleAsyncComponent for DependenciesApp { show_fedora: match &distro { Some(distro) => distro.is_similar("fedora"), None => false - } + }, + + show_list: false }; + model.show_list = !model.show_arch && !model.show_debian && !model.show_fedora; + let widgets = view_output!(); AsyncComponentParts { model, widgets }