mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-22 11:25:56 +00:00
Remove-server card, Accounts tab, quiet background update check, safer install cleanup
- Settings: a card removes a stopped server from the Manager (no files deleted). - The Players tab is now Accounts in all languages. - The five-minute background check no longer starts and stops MySQL on a stopped server; only an explicit check may start it. - A failed install keeps its marker until the folder is complete, cleans up after a failure that happens after the move, and reports the launcher's output; install and update errors have a Copy button. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c6e8a34509
commit
072a657649
17 files changed
+185
-50
No files matched your search
@@ -34,12 +34,12 @@ function set(id: string, next: Partial<ServerUpdateState>) {
|
||||
listeners.forEach((l) => l());
|
||||
}
|
||||
|
||||
export async function checkServerUpdate(id: string): Promise<void> {
|
||||
export async function checkServerUpdate(id: string, background = false): Promise<void> {
|
||||
const cur = get(id);
|
||||
if (cur.applying || cur.checking) return;
|
||||
set(id, { checking: true });
|
||||
try {
|
||||
const p = await api.checkUpdate(id);
|
||||
const p = await api.checkUpdate(id, undefined, background);
|
||||
set(id, { preview: p, available: !isUpdateCurrent(p), error: null });
|
||||
} catch (e) {
|
||||
// A cached offer is no longer safe after an update or failed recheck.
|
||||
@@ -51,8 +51,8 @@ export async function checkServerUpdate(id: string): Promise<void> {
|
||||
|
||||
/** Check now and then every five minutes. Returns the function that stops it. */
|
||||
export function startServerUpdatePolling(id: string): () => void {
|
||||
void checkServerUpdate(id);
|
||||
const t = setInterval(() => void checkServerUpdate(id), CHECK_EVERY_MS);
|
||||
void checkServerUpdate(id, true);
|
||||
const t = setInterval(() => void checkServerUpdate(id, true), CHECK_EVERY_MS);
|
||||
return () => clearInterval(t);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user