main
Bel LaPointe 2023-12-27 21:54:54 -05:00
parent 49d811fc65
commit 01887f061a
2 changed files with 6 additions and 5 deletions

View File

@ -7,8 +7,8 @@ edition = "2021"
[dependencies] [dependencies]
dioxus = "0.4.3" dioxus = "0.4.3"
dioxus-web = "0.4.3"
rfd = "0.12.1" rfd = "0.12.1"
lib = { path = "../src-lib" } lib = { path = "../src-lib" }
base64 = "0.21.5" base64 = "0.21.5"
#dioxus-desktop = "0.4.3" #dioxus-web = "0.4.3"
dioxus-desktop = "0.4.3"

View File

@ -31,7 +31,8 @@ fn App(cx: Scope) -> Element {
.pick_file() .pick_file()
.await { .await {
Some(f) => { Some(f) => {
file.set(f.file_name().clone()); // TODO swap to .path() on desktop //file.set(f.file_name().clone()); // TODO swap to .path() on desktop
file.set(f.path().clone()); // TODO swap to .path() on desktop
}, },
None => { file.set(format!("<<failed to pick a file>>")); }, None => { file.set(format!("<<failed to pick a file>>")); },
}; };
@ -72,8 +73,8 @@ struct Analyzed {
} }
fn analyze(file: String) -> Vec<Analyzed> { fn analyze(file: String) -> Vec<Analyzed> {
//let content_spans = lib::video::inspect(&file); // TODO let content_spans = lib::video::inspect(&file); // TODO desktop
let content_spans: Result<Vec<lib::video::ContentSpan>, String> = Ok(vec![lib::video::ContentSpan{start: 0.5, stop: 20.2}]); //let content_spans: Result<Vec<lib::video::ContentSpan>, String> = Ok(vec![lib::video::ContentSpan{start: 0.5, stop: 20.2}]);
if content_spans.is_err() { if content_spans.is_err() {
return vec![Analyzed{ return vec![Analyzed{
start: format!("<<err analyzing {}", file), start: format!("<<err analyzing {}", file),