Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

file-explorer opens files #43

Merged
merged 2 commits into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ members = [
# It is not meant to be published, but is used so "cargo run --example XYZ" works properly
[package]
name = "dioxus-example-projects"
version = "0.0.0"
version = "0.0.1"
edition = "2021"
description = "Top level crate for the Dioxus examples repository"
authors = ["Jonathan Kelley"]
Expand Down
8 changes: 4 additions & 4 deletions dog-app/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dog-app"
version = "0.1.0"
version = "0.1.1"
edition = "2021"
description = "Search the Dog CEO API for your favorite doggo"
license = "MIT/Apache-2.0"
Expand All @@ -10,15 +10,15 @@ documentation = "https://dioxuslabs.com"
keywords = ["dom", "ui", "gui", "react", "wasm"]

[dependencies]
dioxus = "0.3"
dioxus-desktop = "0.3"
dioxus = "0.4.0"
dioxus-desktop = "0.4.0"
reqwest = { version = "0.11.8", features = ["json"] }
serde = { version = "1.0.132", features = ["derive"] }

[package.metadata.bundle]
name = "Dog Search Engine"
identifier = "com.jon.dogsearch"
version = "1.0.0"
version = "1.0.1"
copyright = "Copyright (c) Jane Doe 2016. All rights reserved."
category = "Developer Tool"
short_description = "An example application."
Expand Down
4 changes: 2 additions & 2 deletions ecommerce-site/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "ecommerce-site"
version = "0.1.0"
version = "0.1.1"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axum = { version = "0.6.16", features = ["ws"] }
cached = "0.43.0"
cached = "0.44.0"
dioxus = { git = "https://github.com/DioxusLabs/dioxus" }
dioxus-ssr = { git = "https://github.com/DioxusLabs/dioxus" }
dioxus-liveview = { git = "https://github.com/DioxusLabs/dioxus", features = ["axum"] }
Expand Down
9 changes: 5 additions & 4 deletions file-explorer/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
[package]
name = "file-explorer"
version = "0.1.0"
version = "0.1.1"
edition = "2018"
description = "File Explorer with Dioxus"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dioxus = { version = "0.3" }
dioxus-desktop = { version = "0.3" }
dioxus = { version = "0.4.0" }
dioxus-desktop = { version = "0.4.0" }
log = "0.4.14"
simple_logger = "1.13.0"
open = "5.0.0"
simple_logger = "4.2.0"


[package.metadata.bundle]
Expand Down
22 changes: 16 additions & 6 deletions file-explorer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
use dioxus::prelude::*;
use dioxus_desktop::{Config, WindowBuilder};


fn main() {
// simple_logger::init_with_level(log::Level::Debug).unwrap();
dioxus_desktop::launch_cfg(
Expand Down Expand Up @@ -87,11 +88,20 @@ impl Files {
log::info!("Reloading path list for {:?}", cur_path);
let paths = match std::fs::read_dir(cur_path) {
Ok(e) => e,
Err(err) => {
let err = format!("An error occurred: {:?}", err);
self.err = Some(err);
self.path_stack.pop();
return;
Err(err) => { //Likely we're trying to open a file, so let's open it!
match open::that(cur_path){
Ok(_) => {
log::info!("Opened file");
return;
},
Err(err) => {
let err = format!("An error occurred: {:?}", err);
self.err = Some(err);
self.path_stack.pop();
return;
}
}

}
};
let collected = paths.collect::<Vec<_>>();
Expand All @@ -105,7 +115,7 @@ impl Files {
self.path_names
.push(path.unwrap().path().display().to_string());
}
log::info!("path namees are {:#?}", self.path_names);
log::info!("path names are {:#?}", self.path_names);
}

fn go_up(&mut self) {
Expand Down
6 changes: 3 additions & 3 deletions image_generator_open_ai/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[package]
name = "image_generator_open_ai"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]

dioxus = { version = "0.3" }
dioxus-desktop = { version = "0.3" }
dioxus = { version = "0.4.0" }
dioxus-desktop = { version = "0.4.0" }
reqwest = "0.11.13"
tokio = { version = "1", features = ["full"] }
serde_json = "1.0.91"
Expand Down
8 changes: 4 additions & 4 deletions ios_demo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "dioxus-ios-demo"
version = "0.1.0"
version = "0.1.1"
authors = ["Jonathan Kelley <[email protected]>"]
edition = "2018"

Expand All @@ -13,9 +13,9 @@ path = "gen/bin/desktop.rs"

[dependencies]
mobile-entry-point = "0.1.0"
dioxus = { version = "0.3" }
dioxus-mobile = { version = "0.3" }
simple_logger = "1.11.0"
dioxus = { version = "0.4.0" }
dioxus-mobile = { version = "0.4.0" }
simple_logger = "4.2.0"
im-rc = "15.0.0"


Expand Down
6 changes: 3 additions & 3 deletions jsframework-benchmark/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "jsframework-benchmark"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -12,5 +12,5 @@ wasm-bindgen = { version = "0.2.79", features = ["enable-interning"] }

# for local iteration
# dioxus = { path = "../../../dioxus", features = ["web"] }
dioxus = { version = "0.3" }
dioxus-web = { version = "0.3" }
dioxus = { version = "0.4.0" }
dioxus-web = { version = "0.4.0" }
6 changes: 3 additions & 3 deletions todomvc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "todomvc"
version = "0.1.0"
version = "0.1.1"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
dioxus = { version = "0.3" }
dioxus-web = { version = "0.3" }
dioxus = { version = "0.4.0" }
dioxus-web = { version = "0.4.0" }
wasm-logger = "0.2.0"
wasm-bindgen = "0.2.78"
log = "0.4.14"
Expand Down
6 changes: 3 additions & 3 deletions weatherapp/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "weatherapp"
version = "0.1.0"
version = "0.1.1"
edition = "2021"

[dependencies]
chrono = { version = "0.4.26", features = ["serde"] }
dioxus = "0.3"
dioxus-web = "0.3"
dioxus = "0.4.0"
dioxus-web = "0.4.0"
reqwest = { version = "0.11.18", features = ["json"] }
serde = "1.0.171"
serde_json = "1.0.102"
8 changes: 4 additions & 4 deletions wifi-scanner/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
[package]
name = "wifi-scanner"
version = "0.1.0"
version = "0.1.1"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
anyhow = "1.0.52"
pretty_env_logger = "0.4.0"
pretty_env_logger = "0.5.0"
tokio = { version = "1.12.0", features = ["full"] }
dioxus = { version = "0.3" }
dioxus-desktop = { version = "0.3" }
dioxus = { version = "0.4.0" }
dioxus-desktop = { version = "0.4.0" }
wifiscanner = "0.5.1"
futures-channel = "0.3.19"
futures = "0.3.19"
Loading