Merge branch 'master' into beacon

This commit is contained in:
Héctor Ramón Jiménez 2025-04-05 18:20:31 +02:00
commit 3f67044977
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
62 changed files with 713 additions and 780 deletions

View file

@ -112,9 +112,7 @@ impl Download {
pub fn start(&mut self) -> Task<Update> {
match self.state {
State::Idle { .. }
| State::Finished { .. }
| State::Errored { .. } => {
State::Idle | State::Finished | State::Errored => {
let (task, handle) = Task::sip(
download(
"https://huggingface.co/\
@ -156,10 +154,10 @@ impl Download {
pub fn view(&self) -> Element<Message> {
let current_progress = match &self.state {
State::Idle { .. } => 0.0,
State::Idle => 0.0,
State::Downloading { progress, .. } => *progress,
State::Finished { .. } => 100.0,
State::Errored { .. } => 0.0,
State::Finished => 100.0,
State::Errored => 0.0,
};
let progress_bar = progress_bar(0.0..=100.0, current_progress);