mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-19 11:25:56 +00:00
Add a configurable backup folder and drop-down bot settings
Backups can be stored in a chosen folder (new backups go there, older ones stay listed), and a backups folder that is a link to another drive no longer fails the update's safety backup check. SQUID settings that declare a fixed list of choices are edited as a drop-down and validated against it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f920ff8a59
commit
337418afe0
15 files changed
+253
-11
No files matched your search
@@ -353,6 +353,18 @@ impl Drop for BusyGuard<'_> {
|
||||
}
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn backup_location(state: State<'_, AppState>, id: String) -> std::result::Result<backup::BackupLocation, UiError> {
|
||||
let root = path_of(&state, &id)?;
|
||||
Ok(backup::location(&meta_dir(&root)?))
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
async fn set_backup_location(state: State<'_, AppState>, id: String, path: Option<String>) -> std::result::Result<backup::BackupLocation, UiError> {
|
||||
let root = path_of(&state, &id)?;
|
||||
blocking(move || backup::set_location(&root, &meta_dir(&root)?, path.as_deref())).await
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
fn list_backups(state: State<'_, AppState>, id: String) -> std::result::Result<Vec<RecoveryPoint>, UiError> {
|
||||
let root = path_of(&state, &id)?;
|
||||
@@ -1559,6 +1571,8 @@ pub fn run() {
|
||||
list_config_snapshots,
|
||||
restore_config_snapshot,
|
||||
list_backups,
|
||||
backup_location,
|
||||
set_backup_location,
|
||||
create_backup,
|
||||
verify_backup,
|
||||
delete_backup,
|
||||
|
||||
Reference in new issue
Block a user