mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-20 03:25:56 +00:00
feat(client): add native login & password prefill for Ascension client (0.7.0)
- Implement LibSerialize v1, raw DEFLATE and print base64 codec in glue_config - Prefill login credentials in join_realm, portable_launch and play - Preserve all existing saved client accounts without loss - Rebuild production 0.7.0 NSIS artifacts and update SHA-256 checksums
This commit is contained in:
1 parent
d828c982de
commit
e60b5e2e5a
9 files changed
+573
-37
No files matched your search
+20
-1
@@ -212,7 +212,9 @@ async fn portable_launch(
|
||||
state: State<'_, AppState>,
|
||||
realm: String,
|
||||
) -> std::result::Result<(), ServiceError> {
|
||||
let (install, address) = portable_call(&state, move |s| s.realm_launch_info(&realm)).await?;
|
||||
let realm_launch = realm.clone();
|
||||
let (install, address) =
|
||||
portable_call(&state, move |s| s.realm_launch_info(&realm_launch)).await?;
|
||||
let other = |e: UiError| ServiceError {
|
||||
code: "launch".into(),
|
||||
message: e.technical,
|
||||
@@ -227,6 +229,19 @@ async fn portable_launch(
|
||||
coa_core::remote_client::load(&dir).map_err(|e| other(e.into()))?;
|
||||
profile.host = address;
|
||||
coa_core::remote_client::save(&dir, &profile).map_err(|e| other(e.into()))?;
|
||||
if let Some(ref cp) = profile.client_path {
|
||||
if let Ok(pc) = control_cmds::player(&state) {
|
||||
if let Ok(rid) = control_cmds::realm_id(&realm) {
|
||||
if let Ok(Some(creds)) = pc.credentials(&rid) {
|
||||
let _ = coa_core::glue_config::prefill_login(
|
||||
std::path::Path::new(cp),
|
||||
&creds.username,
|
||||
&creds.password,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
play(state, REMOTE_CLIENT_ID.to_string())
|
||||
.await
|
||||
@@ -2190,6 +2205,10 @@ async fn play(
|
||||
.into(),
|
||||
));
|
||||
}
|
||||
let existing = coa_core::glue_config::read_glue_config(&client).unwrap_or_default();
|
||||
if existing.is_empty() {
|
||||
let _ = coa_core::glue_config::prefill_login(&client, "local", "local");
|
||||
}
|
||||
coa_core::client::launch(&client)?;
|
||||
Ok(DriverOutcome {
|
||||
ok: true,
|
||||
|
||||
Reference in new issue
Block a user