Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion console/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<div class="meta">
<span class="cluster" id="cluster-label"></span>
<span class="status" id="poll-status"></span>
<button class="update-btn" id="update-btn" hidden>檢查更新</button>
<button class="update-btn" id="update-btn" hidden>Check for updates</button>
</div>
</header>
<main class="content">
Expand Down
22 changes: 11 additions & 11 deletions console/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ async function startCore(): Promise<void> {
}
}

// Remote upgrade: the topbar "檢查更新" button. First click checks the nightly
// Remote upgrade: the topbar "Check for updates" button. First click checks the nightly
// release; if a newer signed build exists, the button turns into an install
// action that downloads, verifies, and restarts into it. Desktop-only — hidden
// in the browser build (no command bridge).
Expand All @@ -257,43 +257,43 @@ function setupUpdater(): void {

const reset = (): void => {
pending = null;
el.textContent = "檢查更新";
el.textContent = "Check for updates";
el.classList.remove("has-update");
};

async function check(btn: HTMLButtonElement, inv: Invoke): Promise<void> {
btn.disabled = true;
btn.textContent = "檢查中…";
btn.textContent = "Checking…";
try {
const info = await inv<UpdateInfo | null>("check_update");
if (info) {
pending = info;
btn.textContent = `更新到 v${info.version} ↻`;
btn.textContent = `Update to v${info.version} ↻`;
btn.classList.add("has-update");
note("info", `發現新版 v${info.version}(目前 v${info.current})— 按按鈕安裝並重啟`);
note("info", `New version v${info.version} available (current v${info.current}) — click to install and restart`);
} else {
note("info", "已是最新版");
btn.textContent = "已是最新版";
note("info", "Already up to date");
btn.textContent = "Up to date";
window.setTimeout(reset, 4000);
}
} catch (e) {
reset();
note("error", `檢查更新失敗:${errText(e)}`);
note("error", `Update check failed: ${errText(e)}`);
} finally {
btn.disabled = false;
}
}

async function install(btn: HTMLButtonElement, inv: Invoke): Promise<void> {
btn.disabled = true;
btn.textContent = "安裝中…";
btn.textContent = "Installing…";
try {
// On success the backend restarts the app, so this may never resolve.
await inv("install_update");
} catch (e) {
btn.disabled = false;
btn.textContent = pending ? `更新到 v${pending.version} ↻` : "檢查更新";
note("error", `安裝更新失敗:${errText(e)}`);
btn.textContent = pending ? `Update to v${pending.version} ↻` : "Check for updates";
note("error", `Update install failed: ${errText(e)}`);
}
}

Expand Down
2 changes: 1 addition & 1 deletion crates/oabctl/src/scale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ mod tests {
#[test]
fn test_schedule_name_sanitization_unicode() {
// Unicode chars are NOT valid in AWS schedule names — replaced with '-'
let alias = "bot名前";
let alias = "botéé";
let safe_alias = alias.replace(
|c: char| !c.is_ascii_alphanumeric() && c != '-' && c != '_' && c != '.',
"-",
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ struct UpdateInfo {
}

/// Ask the release endpoint whether a newer signed build exists. Returns `None`
/// when we're already current. Drives the topbar "檢查更新" button.
/// when we're already current. Drives the topbar "Check for updates" button.
#[tauri::command]
async fn check_update(app: tauri::AppHandle) -> Result<Option<UpdateInfo>, String> {
let updater = app.updater().map_err(|e| e.to_string())?;
Expand Down
Loading