mirror of
https://github.com/Corfirean/coa-server-manager.git
synced 2026-11-22 03:25:56 +00:00
Prepare Manager 0.9.2 with database startup and configuration fixes
This commit is contained in:
1 parent
81f031b30f
commit
ce83f04d9d
21 files changed
+470
-83
No files matched your search
@@ -1,19 +1,34 @@
|
||||
{
|
||||
"manager": {
|
||||
"ru": {
|
||||
"Existing unsupported character records no longer block unrelated server updates": "Старые неподдерживаемые записи персонажей больше не блокируют несвязанные обновления сервера"
|
||||
"Existing unsupported character records no longer block unrelated server updates": "Старые неподдерживаемые записи персонажей больше не блокируют несвязанные обновления сервера",
|
||||
"New server installation waits for slower database startup": "Установка нового сервера дольше ожидает запуска базы на медленных дисках",
|
||||
"Find and edit CoA options in the existing server settings": "Параметры CoA доступны для поиска и редактирования в настройках сервера",
|
||||
"Simultaneous update checks share results or wait their turn": "Одновременные проверки обновлений используют общий результат или ожидают своей очереди"
|
||||
},
|
||||
"de": {
|
||||
"Existing unsupported character records no longer block unrelated server updates": "Bestehende nicht unterstützte Charakterdatensätze blockieren keine unabhängigen Serverupdates mehr"
|
||||
"Existing unsupported character records no longer block unrelated server updates": "Bestehende nicht unterstützte Charakterdatensätze blockieren keine unabhängigen Serverupdates mehr",
|
||||
"New server installation waits for slower database startup": "Die Neuinstallation wartet länger auf einen langsamen Datenbankstart",
|
||||
"Find and edit CoA options in the existing server settings": "CoA-Optionen in den bestehenden Servereinstellungen suchen und bearbeiten",
|
||||
"Simultaneous update checks share results or wait their turn": "Gleichzeitige Updateprüfungen teilen Ergebnisse oder warten aufeinander"
|
||||
},
|
||||
"fr": {
|
||||
"Existing unsupported character records no longer block unrelated server updates": "Les anciennes fiches de personnage non prises en charge ne bloquent plus les mises à jour sans rapport"
|
||||
"Existing unsupported character records no longer block unrelated server updates": "Les anciennes fiches de personnage non prises en charge ne bloquent plus les mises à jour sans rapport",
|
||||
"New server installation waits for slower database startup": "L’installation attend le démarrage de la base sur les disques plus lents",
|
||||
"Find and edit CoA options in the existing server settings": "Recherchez et modifiez les options CoA dans les paramètres du serveur",
|
||||
"Simultaneous update checks share results or wait their turn": "Les vérifications simultanées partagent leurs résultats ou attendent leur tour"
|
||||
},
|
||||
"es": {
|
||||
"Existing unsupported character records no longer block unrelated server updates": "Los registros antiguos de personajes no compatibles ya no bloquean actualizaciones del servidor no relacionadas"
|
||||
"Existing unsupported character records no longer block unrelated server updates": "Los registros antiguos de personajes no compatibles ya no bloquean actualizaciones del servidor no relacionadas",
|
||||
"New server installation waits for slower database startup": "La instalación espera más tiempo al inicio de la base de datos en discos lentos",
|
||||
"Find and edit CoA options in the existing server settings": "Busca y edita opciones de CoA en la configuración actual del servidor",
|
||||
"Simultaneous update checks share results or wait their turn": "Las comprobaciones simultáneas comparten resultados o esperan su turno"
|
||||
},
|
||||
"zh": {
|
||||
"Existing unsupported character records no longer block unrelated server updates": "已有的不受支持角色记录不再阻止无关的服务器更新"
|
||||
"Existing unsupported character records no longer block unrelated server updates": "已有的不受支持角色记录不再阻止无关的服务器更新",
|
||||
"New server installation waits for slower database startup": "安装新服务器时会等待较慢的数据库启动",
|
||||
"Find and edit CoA options in the existing server settings": "在现有服务器设置中查找和编辑 CoA 选项",
|
||||
"Simultaneous update checks share results or wait their turn": "同时进行的更新检查会共用结果或依次执行"
|
||||
}
|
||||
},
|
||||
"server": {}
|
||||
|
||||
+7
-1
@@ -1,4 +1,7 @@
|
||||
import { invoke } from "@tauri-apps/api/core";
|
||||
import { updateCheckQueue } from "./updateCheckQueue";
|
||||
|
||||
const queuedUpdateCheck = updateCheckQueue<UpdatePreview>();
|
||||
|
||||
export const REMOTE_CLIENT_ID = "@remote-client";
|
||||
export interface RemoteConnection { host: string; client_path: string | null }
|
||||
@@ -539,7 +542,10 @@ export const api = {
|
||||
createAccount: (id: string, username: string, password: string, administrator: boolean) =>
|
||||
invoke<void>("create_account", { id, username, password, administrator }),
|
||||
/** `background`: the repeating check, which must not start the database of a stopped server. */
|
||||
checkUpdate: (id: string, source?: string, background?: boolean) => invoke<UpdatePreview>("check_update", { id, source: source ?? null, background: background ?? false }),
|
||||
checkUpdate: (id: string, source?: string, background?: boolean) => queuedUpdateCheck(
|
||||
id, JSON.stringify([source ?? null, background ?? false]),
|
||||
() => invoke<UpdatePreview>("check_update", { id, source: source ?? null, background: background ?? false }),
|
||||
),
|
||||
pendingUpdate: (id: string) => invoke<UpdateTxn | null>("pending_update", { id }),
|
||||
applyUpdate: (id: string, resolutions: Record<string, "keep" | "replace">, source?: string) =>
|
||||
invoke<{ txn: UpdateTxn; preexisting_character_count?: number }>("apply_update", { id, source: source ?? null, resolutions }),
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
export function updateCheckQueue<T>() {
|
||||
const requests = new Map<string, Promise<T>>();
|
||||
const servers = new Map<string, Promise<unknown>>();
|
||||
return (server: string, request: string, run: () => Promise<T>): Promise<T> => {
|
||||
const key = JSON.stringify([server, request]);
|
||||
const existing = requests.get(key);
|
||||
if (existing) return existing;
|
||||
const previous = servers.get(server) ?? Promise.resolve();
|
||||
const result = previous.catch(() => undefined).then(run);
|
||||
requests.set(key, result);
|
||||
servers.set(server, result);
|
||||
const clear = () => {
|
||||
if (requests.get(key) === result) requests.delete(key);
|
||||
if (servers.get(server) === result) servers.delete(server);
|
||||
};
|
||||
void result.then(clear, clear);
|
||||
return result;
|
||||
};
|
||||
}
|
||||
@@ -284,8 +284,8 @@ export function SettingsPage(props: {
|
||||
const q = query.trim().toLowerCase();
|
||||
const searching = q !== "";
|
||||
const hit = (...parts: string[]) => parts.some((x) => x.toLowerCase().includes(q));
|
||||
const curatedKeys = new Set(view.settings.map((s) => s.key));
|
||||
const collections = collectionsOf(cols);
|
||||
const curatedKeys = new Set([...view.settings.map((s) => s.key), ...collections.map((c) => c.item.key)]);
|
||||
const curatedHits = searching ? view.settings.filter((s) => hit(s.key, sx.title(s), sx.description(s))) : [];
|
||||
const collectionHits = searching ? collections.filter((c) => hit(c.item.key, t(c.label), t(c.text))) : [];
|
||||
const rawHits = (raw ?? []).filter(
|
||||
|
||||
Reference in new issue
Block a user