feat(Ui): First stable ui

This commit is contained in:
Black_Raven committed 2026-03-29 13:07:35 +03:00
1 parent a5e4244ed4
commit 65698c0a2a
3 files changed
+446 -385

No files matched your search

+17
View File
@@ -24,3 +24,20 @@ pub fn stats(app: &RcloneApp) -> Result<Value, String> {
serde_json::from_str(&output).map_err(|e| format!("Ошибка парсинга статистики: {}", e))?;
Ok(stats)
}
/// Получить список поддерживаемых бэкендов (типов хранилищ)
pub fn backends(app: &RcloneApp) -> Result<Vec<String>, String> {
let output = app.run_command(&["help", "backends"])?;
let mut backends = Vec::new();
for line in output.lines() {
let line = line.trim();
if line.is_empty() {
continue;
}
// Формат строки: " drive Google Drive"
if let Some(first_word) = line.split_whitespace().next() {
backends.push(first_word.to_string());
}
}
Ok(backends)
}