Skip to content

Commit

Permalink
improvement: Streamlines FileSourceWidget and implements Restore
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomaz-Vieira committed Jul 1, 2024
1 parent 7db639d commit 5dbe6ca
Show file tree
Hide file tree
Showing 4 changed files with 215 additions and 146 deletions.
17 changes: 3 additions & 14 deletions bioimg_gui/src/project_data.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
use bioimg_runtime as rt;

#[derive(serde::Serialize, serde::Deserialize)]
pub struct AuthorWidgetRawData{
pub name_widget: String,
Expand Down Expand Up @@ -32,23 +30,14 @@ pub struct MaintainerWidgetRawData {
// }

#[derive(serde::Serialize, serde::Deserialize)]
pub enum FileWidgetResultRawData<OkRawData>{
pub enum LocalFileSourceWidgetRawData{
Empty,
AboutToLoad{path: String},
Finished{path: String, value: Result<OkRawData, String>}
AboutToLoad{path: String, inner_path: Option<String>}
}

#[derive(serde::Serialize, serde::Deserialize)]
pub enum LocalFileSourceRawData{
PickedNormalFile{path: String},
PickedEmptyZip{path: String},
PickingInner{outer: String, inner: String},
}


#[derive(serde::Serialize, serde::Deserialize)]
pub enum FileSourceWidgetRawData{
Path(LocalFileSourceRawData),
Local(LocalFileSourceWidgetRawData),
Url(String),
}

Expand Down
Loading

0 comments on commit 5dbe6ca

Please sign in to comment.