merged mainline

This commit is contained in:
Nikita Podvirnyi 2024-05-27 14:25:43 +02:00
commit b33ef5d178
No known key found for this signature in database
GPG key ID: 859D416E5142AFF3
4 changed files with 31 additions and 49 deletions

View file

@ -1,9 +0,0 @@
{
"recommendations": [
"vivaxy.vscode-conventional-commits",
"gruntfuggly.todo-tree",
"rust-lang.rust-analyzer",
"bungcip.better-toml",
"serayuzgur.crates"
]
}

26
.vscode/launch.json vendored
View file

@ -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}"
}
]
}

10
.vscode/settings.json vendored
View file

@ -1,10 +0,0 @@
{
"conventionalCommits.scopes": [
"tracing",
"core",
"ui",
"i18n"
],
"editor.tabCompletion": "on",
"diffEditor.codeLens": true
}

View file

@ -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<Self>) -> AsyncComponentParts<Self> {
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 }