feat: complete hosted mod sync and launcher interface updates
Some checks failed
Axolotl desktop CI / guardrails (push) Has been cancelled
Axolotl desktop CI / desktop (macos-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (ubuntu-latest) (push) Has been cancelled
Axolotl desktop CI / desktop (windows-latest) (push) Has been cancelled
Axolotl desktop CI / website (push) Has been cancelled
Repository checks / typos (push) Has been cancelled
Repository checks / tombi (push) Has been cancelled
Rust checks / shear (push) Has been cancelled
Sync source to CNB / Sync Git ref (push) Has been cancelled

Add pack sync markers, tagged mod updates, parallel progress, JWT downloads and retry recovery. Include pending onboarding, about scene, compatibility data pack and download fixes.
This commit is contained in:
2026-09-15 19:06:56 +08:00
parent 5d473ebfbc
commit bc904065c3
63 changed files with 3516 additions and 1059 deletions

View File

@ -168,6 +168,7 @@ pub fn emit_loading(
.to_string(),
event: loading_bar.bar_type.clone(),
loader_uuid: loading_bar.loading_bar_uuid,
total: Some(loading_bar.total),
},
)
.map_err(EventError::from)?;
@ -181,6 +182,64 @@ pub fn emit_loading(
Ok(())
}
/// Set measured phase progress without completing the task at a phase boundary.
/// A zero total represents a phase whose amount of work is not yet known.
pub fn set_loading(
key: &LoadingBarId,
current: u64,
total: u64,
message: &str,
) -> crate::Result<()> {
let event_state = crate::EventState::get()?;
let Some(mut bar) = event_state.loading_bars.get_mut(&key.0) else {
return Err(EventError::NoLoadingBar(key.0).into());
};
bar.current = current.min(total) as f64;
bar.total = total as f64;
bar.message = message.to_owned();
let fraction = if total == 0 {
0.0
} else {
bar.current / bar.total
};
bar.last_sent = fraction;
#[cfg(feature = "tauri")]
event_state
.app
.emit(
"loading",
LoadingPayload {
fraction: Some(fraction),
message: bar.message.clone(),
event: bar.bar_type.clone(),
loader_uuid: bar.loading_bar_uuid,
total: Some(bar.total),
},
)
.map_err(EventError::from)?;
#[cfg(feature = "cli")]
{
bar.cli_progress_bar.set_message(bar.message.clone());
bar.cli_progress_bar
.set_position((fraction * CLI_PROGRESS_BAR_TOTAL as f64) as u64);
}
Ok(())
}
pub fn fail_hosted_loading(key: &LoadingBarId, error: &str) {
if let Ok(state) = crate::EventState::get()
&& let Some(mut bar) = state.loading_bars.get_mut(&key.0)
{
match &mut bar.bar_type {
LoadingBarType::HostedPackSync { error: failure, .. }
| LoadingBarType::HostedModDownload { error: failure, .. } => {
*failure = Some(error.to_owned())
}
_ => {}
}
}
}
// emit_warning(message)
pub async fn emit_warning(message: &str) -> crate::Result<()> {
#[cfg(feature = "tauri")]