Leave a team, delete a vault; keep tests out of the real settings

- A hub test unset LUNE_HOME for the whole test run, so later tests saved
  into the real user's config. Tests now always keep their own settings
  folder.
- Leaving a team: `lunesync leave` and the app's Leave hand over and remove
  this device there; a hub that's gone can be forgotten (folders stay).
- Deleting a vault (owner): everyone is removed the usual way, the history
  is archived on the hub and the name is freed. Canvas asks first.
- Connect this Mac says what to do when Lune isn't installed.
- Update checks skip http hubs instead of failing for all of them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-29 14:36:46 +07:00
parent 7d1437e3ec
commit 4f6414b256
16 changed files with 278 additions and 10 deletions

View File

@@ -241,6 +241,12 @@ impl HubLink {
Ok(v["message"].as_str().unwrap_or_default().to_string())
}
/// Deletes a vault (team owner); returns how many devices will hand over and remove their copy.
pub fn delete_vault(&self, vault: &str) -> Result<usize> {
let v: Value = self.post("/api/vaults/delete", json!({ "vault": vault }))?;
Ok(v["devices"].as_u64().unwrap_or(0) as usize)
}
pub fn vault_setting(&self, vault: &str, delete_from_devices: bool) -> Result<()> {
let _: Value = self.post("/api/vaults/settings", json!({"vault": vault, "delete_from_devices": delete_from_devices}))?;
Ok(())