to web
This commit is contained in:
2569
src/Cargo.lock
generated
2569
src/Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -9,5 +9,5 @@ edition = "2021"
|
|||||||
dioxus = "0.4.3"
|
dioxus = "0.4.3"
|
||||||
lib = { path = "../src-lib" }
|
lib = { path = "../src-lib" }
|
||||||
base64 = "0.21.5"
|
base64 = "0.21.5"
|
||||||
#dioxus-web = "0.4.3"
|
dioxus-web = "0.4.3"
|
||||||
dioxus-desktop = "0.4.3"
|
#dioxus-desktop = "0.4.3"
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ use base64::{engine::general_purpose, Engine as _};
|
|||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// launch the dioxus app in a webview
|
// launch the dioxus app in a webview
|
||||||
dioxus_desktop::launch(App); // TODO desktop
|
//dioxus_desktop::launch(App); // TODO desktop
|
||||||
//dioxus_web::launch(App);
|
dioxus_web::launch(App);
|
||||||
}
|
}
|
||||||
|
|
||||||
// define a component that renders a div with the text "Hello, world!"
|
// define a component that renders a div with the text "Hello, world!"
|
||||||
@@ -29,7 +29,6 @@ fn App(cx: Scope) -> Element {
|
|||||||
if let Some(file_engine) = &evt.files {
|
if let Some(file_engine) = &evt.files {
|
||||||
for f in &file_engine.files() {
|
for f in &file_engine.files() {
|
||||||
file.set(f.clone()); // TODO swap to .path() on desktop
|
file.set(f.clone()); // TODO swap to .path() on desktop
|
||||||
//file.set(f.path().clone()); // TODO swap to .path() on desktop
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -72,8 +71,8 @@ struct Analyzed {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn analyze(file: String) -> Vec<Analyzed> {
|
fn analyze(file: String) -> Vec<Analyzed> {
|
||||||
let content_spans = lib::video::inspect(&file); // TODO desktop
|
//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),
|
||||||
|
|||||||
Reference in New Issue
Block a user