mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 18:31:52 +00:00
* start consolidating * add start-cli flash-os * combine install and setup and refactor all * use http * undo mock * fix translation * translations * use dialogservice wrapper * better ST messaging on setup * only warn on update if breakages (#3097) * finish setup wizard and ui language-keyboard feature * fix typo * wip: localization * remove start-tunnel readme * switch to posix strings for language internal * revert mock * translate backend strings * fix missing about text * help text for args * feat: add "Add new gateway" option (#3098) * feat: add "Add new gateway" option * Update web/projects/ui/src/app/routes/portal/components/form/controls/select.component.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * add translation --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Matt Hill <mattnine@protonmail.com> * fix dns selection * keyboard keymap also * ability to shutdown after install * revert mock * working setup flow + manifest localization * (mostly) redundant localization on frontend * version bump * omit live medium from disk list and better space management * ignore missing package archive on 035 migration * fix device migration * add i18n helper to sdk * fix install over 0.3.5.1 * fix grub config --------- Co-authored-by: Matt Hill <mattnine@protonmail.com> Co-authored-by: Matt Hill <MattDHill@users.noreply.github.com> Co-authored-by: Alex Inkin <alexander@inkin.ru> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
58 lines
1.5 KiB
Rust
58 lines
1.5 KiB
Rust
use std::collections::BTreeMap;
|
|
|
|
use rpc_toolkit::{Context, HandlerExt, ParentHandler, from_fn_async};
|
|
use serde::{Deserialize, Serialize};
|
|
|
|
use crate::PackageId;
|
|
use crate::context::CliContext;
|
|
#[allow(unused_imports)]
|
|
use crate::prelude::*;
|
|
|
|
pub mod backup_bulk;
|
|
pub mod os;
|
|
pub mod restore;
|
|
pub mod target;
|
|
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
pub struct BackupReport {
|
|
server: ServerBackupReport,
|
|
packages: BTreeMap<PackageId, PackageBackupReport>,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
pub struct ServerBackupReport {
|
|
attempted: bool,
|
|
error: Option<String>,
|
|
}
|
|
|
|
#[derive(Debug, Deserialize, Serialize)]
|
|
pub struct PackageBackupReport {
|
|
pub error: Option<String>,
|
|
}
|
|
|
|
// #[command(subcommands(backup_bulk::backup_all, target::target))]
|
|
pub fn backup<C: Context>() -> ParentHandler<C> {
|
|
ParentHandler::new()
|
|
.subcommand(
|
|
"create",
|
|
from_fn_async(backup_bulk::backup_all)
|
|
.no_display()
|
|
.with_about("about.create-backup-all-packages")
|
|
.with_call_remote::<CliContext>(),
|
|
)
|
|
.subcommand(
|
|
"target",
|
|
target::target::<C>().with_about("about.commands-backup-target"),
|
|
)
|
|
}
|
|
|
|
pub fn package_backup<C: Context>() -> ParentHandler<C> {
|
|
ParentHandler::new().subcommand(
|
|
"restore",
|
|
from_fn_async(restore::restore_packages_rpc)
|
|
.no_display()
|
|
.with_about("about.restore-packages-from-backup")
|
|
.with_call_remote::<CliContext>(),
|
|
)
|
|
}
|