diff --git a/web/src/App.tsx b/web/src/App.tsx index 987cf55..d935a35 100644 --- a/web/src/App.tsx +++ b/web/src/App.tsx @@ -6472,7 +6472,9 @@ function KontoPanel() { const [busy, setBusy] = useState(null); const [error, setError] = useState(""); const [withPassword, setWithPassword] = useState(true); - const [server, setServer] = useState(DEFAULT_SYNC_SERVER); + // Empty = the default server, whose address isn't shown. + const [serverInput, setServerInput] = useState(""); + const server = serverInput.trim() || DEFAULT_SYNC_SERVER; const [loginNumber, setLoginNumber] = useState(""); const [loginPassword, setLoginPassword] = useState(""); const [showPassword, setShowPassword] = useState(false); @@ -6517,7 +6519,7 @@ function KontoPanel() {

{t("sync.create.withPasswordHint")}

@@ -6543,8 +6545,8 @@ function KontoPanel() { onClick={() => void run("login", async () => { const password = loginPassword.trim() ? normalizePassword(loginPassword) : undefined; - if (!password && (await accountInfo(number!, server.trim())).hasPassword) throw new Error("password_required"); - await loginSyncAccount(number!, password, server.trim(), SYNC_CATEGORIES); + if (!password && (await accountInfo(number!, server)).hasPassword) throw new Error("password_required"); + await loginSyncAccount(number!, password, server, SYNC_CATEGORIES); window.location.reload(); }) } @@ -6554,7 +6556,11 @@ function KontoPanel() {

{t("sync.serverHint")}

{error &&

{error}

} @@ -6684,7 +6690,9 @@ function KontoPanel() { {t("sync.syncNow")} )} -

{t("sync.serverInfo", { server: account.server })}

+

{t("sync.serverInfo", { + server: account.server === DEFAULT_SYNC_SERVER ? t("sync.serverDefault") : account.server, + })}