Feature/consolidate setup (#3092)

* 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>
This commit is contained in:
Aiden McClelland
2026-01-27 14:44:41 -08:00
committed by GitHub
parent 99871805bd
commit c65db31fd9
251 changed files with 12163 additions and 3966 deletions

View File

@@ -42,12 +42,13 @@ use crate::util::io::AtomicFile;
#[serde(rename_all = "camelCase")]
#[command(rename_all = "kebab-case")]
pub struct UpdateSystemParams {
#[arg(help = "help.arg.registry-url")]
#[ts(type = "string")]
registry: Url,
#[ts(type = "string | null")]
#[arg(long = "to")]
#[arg(long = "to", help = "help.arg.update-target-version")]
target: Option<VersionRange>,
#[arg(long = "no-progress", action = ArgAction::SetFalse)]
#[arg(long = "no-progress", action = ArgAction::SetFalse, help = "help.arg.no-progress")]
#[serde(default)]
progress: bool,
}
@@ -82,9 +83,7 @@ pub async fn update_system(
.de()?
{
return Err(Error::new(
eyre!(
"Server was already updated. Please restart your device before attempting to update again."
),
eyre!("{}", t!("update.already-updated-restart-required")),
ErrorKind::InvalidRequest,
));
}
@@ -143,7 +142,7 @@ pub async fn update_system(
}
.await
{
tracing::error!("Error returning progress of update: {e}");
tracing::error!("{}", t!("update.error-returning-progress", error = e.to_string()));
tracing::debug!("{e:?}")
}
},
@@ -176,11 +175,11 @@ pub async fn cli_update_system(
.await?,
)?;
match res.target {
None => println!("No updates available"),
None => println!("{}", t!("update.no-updates-available")),
Some(v) => {
if let Some(progress) = res.progress {
let mut ws = context.ws_continuation(progress).await?;
let mut progress = PhasedProgressBar::new(&format!("Updating to v{v}..."));
let mut progress = PhasedProgressBar::new(&t!("update.updating-to-version", version = v.to_string()));
let mut prev = None;
while let Some(msg) = ws.try_next().await.with_kind(ErrorKind::Network)? {
if let tokio_tungstenite::tungstenite::Message::Text(msg) = msg {
@@ -201,9 +200,9 @@ pub async fn cli_update_system(
prev.overall.set_complete();
progress.update(&prev);
}
println!("Update complete. Restart your server to apply the update.")
println!("{}", t!("update.complete-restart-to-apply"))
} else {
println!("Updating to v{v}...")
println!("{}", t!("update.updating-to-version", version = v.to_string()))
}
}
}
@@ -279,7 +278,7 @@ async fn maybe_do_update(
let mut status = peeked.as_public().as_server_info().as_status_info().de()?;
if status.update_progress.is_some() {
return Err(Error::new(
eyre!("Server is already updating!"),
eyre!("{}", t!("update.already-updating")),
crate::ErrorKind::InvalidRequest,
));
}
@@ -296,9 +295,7 @@ async fn maybe_do_update(
if status.updated {
return Err(Error::new(
eyre!(
"Server was already updated. Please restart your device before attempting to update again."
),
eyre!("{}", t!("update.already-updated-restart-required")),
crate::ErrorKind::InvalidRequest,
));
}
@@ -343,7 +340,7 @@ async fn maybe_do_update(
CIRCLE_OF_5THS_SHORT.play().await.log_err();
}
Err(e) => {
let err_string = format!("Update was not successful because of {}", e);
let err_string = t!("update.not-successful", error = e.to_string()).to_string();
ctx.db
.mutate(|db| {
db.as_public_mut()
@@ -355,7 +352,7 @@ async fn maybe_do_update(
db,
None,
NotificationLevel::Error,
"StartOS Update Failed".to_owned(),
t!("update.failed-title").to_string(),
err_string,
(),
)