Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Disconnect and sign out: where the server refuses the device, the question about unsent changes says Pair again or Sign in again, matching the button under it, instead of Try again with no Try again button

Duarte Santos86fc7ca15874
diff --git a/frontend/src/components/ServerSync.jsx b/frontend/src/components/ServerSync.jsx
index ff22fb4fa..aa3d124ee 100644
--- a/frontend/src/components/ServerSync.jsx
+++ b/frontend/src/components/ServerSync.jsx
@@ -191,8 +191,13 @@ export function OwedSheet({ kind, count: count0, exportBackup, done, close }) {
{count > 0 ? t('Not on your server yet: {0}', changeCount(count)) : t('Some changes on this device have not reached your server.')}
</div>
{(tried || refused) && view && <div className="small" style={{ color: 'var(--red)', marginBottom: 6 }}>{view.line}</div>}
+ {/* It names the button below it: Try again, or Pair again / Sign in where the server refuses. */}
<div className="muted small" style={{ marginBottom: 18, lineHeight: 1.5 }}>
- {t('Try again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.')}
+ {refused
+ ? (MOBILE
+ ? t('Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.')
+ : t('Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.'))
+ : t('Try again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.')}
</div>
{refused && MOBILE && <><button className="btn primary" disabled={busy} onClick={() => { close(); pairAgain() }}>{t('Pair again')}</button><div style={{ height: 8 }} /></>}
{refused && !MOBILE && canSignIn() && <><button className="btn primary" disabled={busy} onClick={() => { close(); signInAgain() }}>{pwOn() ? t('Sign in') : t('Sign in with passkey')}</button><div style={{ height: 8 }} /></>}
diff --git a/frontend/src/locales/ar.js b/frontend/src/locales/ar.js
index 19a51ed31..e8c31e853 100644
--- a/frontend/src/locales/ar.js
+++ b/frontend/src/locales/ar.js
@@ -1601,4 +1601,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'تعذّر الوصول إلى خادمك — تُحفظ تغييراتك على هذا الجهاز وتتزامن عندما يستجيب مجددًا.',
'Your server cannot be reached — showing the last copy synced with it.': 'تعذّر الوصول إلى خادمك — يُعرض آخر نسخة متزامنة معه.',
'Server address unknown': 'عنوان الخادم غير معروف',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'أقرِن الهاتف مجددًا، أو صدّر نسخة احتياطية أولًا. إذا تابعت على أي حال، فستبقى نسخة من هذه التغييرات على هذا الجهاز حتى يتصل بهذا الخادم بهذا الحساب مجددًا — وعندها تُضاف من جديد.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'سجّل الدخول مجددًا، أو صدّر نسخة احتياطية أولًا. إذا تابعت على أي حال، فستبقى نسخة من هذه التغييرات على هذا الجهاز حتى يتصل بهذا الخادم بهذا الحساب مجددًا — وعندها تُضاف من جديد.',
}
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 9339b3270..b25fb92cf 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -1568,4 +1568,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Dein Server ist nicht erreichbar — deine Änderungen sind auf diesem Gerät gespeichert und werden synchronisiert, sobald er wieder antwortet.',
'Your server cannot be reached — showing the last copy synced with it.': 'Dein Server ist nicht erreichbar — zeigt die zuletzt mit ihm synchronisierte Kopie.',
'Server address unknown': 'Serveradresse unbekannt',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Kopple neu oder exportiere zuerst ein Backup. Machst du trotzdem weiter, bleibt eine Kopie dieser Änderungen auf diesem Gerät, bis es sich wieder mit diesem Konto mit diesem Server verbindet — dann werden sie wieder hinzugefügt.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Melde dich wieder an oder exportiere zuerst ein Backup. Machst du trotzdem weiter, bleibt eine Kopie dieser Änderungen auf diesem Gerät, bis es sich wieder mit diesem Konto mit diesem Server verbindet — dann werden sie wieder hinzugefügt.',
}
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index b1fc0a708..37e4ba2a4 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -1548,4 +1548,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'No se puede llegar a tu servidor: tus cambios se guardan en este dispositivo y se sincronizarán cuando vuelva a responder.',
'Your server cannot be reached — showing the last copy synced with it.': 'No se puede llegar a tu servidor: se muestra la última copia sincronizada con él.',
'Server address unknown': 'Dirección del servidor desconocida',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Vuelve a emparejar o exporta antes una copia. Si continúas de todos modos, se guarda una copia de estos cambios en este dispositivo hasta que vuelva a conectarse a este servidor con esta cuenta; entonces se vuelven a añadir.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Vuelve a iniciar sesión o exporta antes una copia. Si continúas de todos modos, se guarda una copia de estos cambios en este dispositivo hasta que vuelva a conectarse a este servidor con esta cuenta; entonces se vuelven a añadir.',
}
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index b57df512c..8e2914b46 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -1548,4 +1548,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Votre serveur est injoignable — vos modifications sont enregistrées sur cet appareil et seront synchronisées dès qu\'il répondra à nouveau.',
'Your server cannot be reached — showing the last copy synced with it.': 'Votre serveur est injoignable — affichage de la dernière copie synchronisée avec lui.',
'Server address unknown': 'Adresse du serveur inconnue',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Associez à nouveau, ou exportez d\'abord une sauvegarde. Si vous continuez quand même, une copie de ces modifications reste sur cet appareil jusqu\'à ce qu\'il se reconnecte à ce serveur avec ce compte — elles sont alors rajoutées.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Reconnectez-vous, ou exportez d\'abord une sauvegarde. Si vous continuez quand même, une copie de ces modifications reste sur cet appareil jusqu\'à ce qu\'il se reconnecte à ce serveur avec ce compte — elles sont alors rajoutées.',
}
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index 7449e26cc..481d3483d 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -1548,4 +1548,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'आपके सर्वर तक नहीं पहुँचा जा सकता — आपके बदलाव इस डिवाइस पर सहेजे गए हैं और उसके फिर से जवाब देते ही सिंक हो जाएँगे।',
'Your server cannot be reached — showing the last copy synced with it.': 'आपके सर्वर तक नहीं पहुँचा जा सकता — उससे सिंक की गई आख़िरी प्रति दिखाई जा रही है।',
'Server address unknown': 'सर्वर का पता अज्ञात',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'फिर से पेयर करें, या पहले बैकअप निर्यात करें। फिर भी आगे बढ़ने पर इन बदलावों की एक कॉपी इस डिवाइस पर तब तक रहती है जब तक यह इसी खाते से इस सर्वर से फिर कनेक्ट नहीं होता — तब वे वापस जोड़ दिए जाते हैं।',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'फिर से साइन इन करें, या पहले बैकअप निर्यात करें। फिर भी आगे बढ़ने पर इन बदलावों की एक कॉपी इस डिवाइस पर तब तक रहती है जब तक यह इसी खाते से इस सर्वर से फिर कनेक्ट नहीं होता — तब वे वापस जोड़ दिए जाते हैं।',
}
diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.js
index 280aa9530..28372f151 100644
--- a/frontend/src/locales/hu.js
+++ b/frontend/src/locales/hu.js
@@ -1551,4 +1551,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'A szervered nem érhető el — a módosításaid ezen az eszközön vannak mentve, és szinkronizálódnak, amint újra válaszol.',
'Your server cannot be reached — showing the last copy synced with it.': 'A szervered nem érhető el — a vele utoljára szinkronizált másolat látható.',
'Server address unknown': 'A szerver címe ismeretlen',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Párosítsd újra, vagy előbb exportálj egy biztonsági mentést. Ha mégis folytatod, a módosítások másolata ezen az eszközön marad, amíg újra nem csatlakozik ehhez a szerverhez ezzel a fiókkal — akkor visszakerülnek.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Jelentkezz be újra, vagy előbb exportálj egy biztonsági mentést. Ha mégis folytatod, a módosítások másolata ezen az eszközön marad, amíg újra nem csatlakozik ehhez a szerverhez ezzel a fiókkal — akkor visszakerülnek.',
}
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index e8d5e204b..e59fe1731 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -1548,4 +1548,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Il tuo server non è raggiungibile — le tue modifiche sono salvate su questo dispositivo e verranno sincronizzate quando risponderà di nuovo.',
'Your server cannot be reached — showing the last copy synced with it.': 'Il tuo server non è raggiungibile — viene mostrata l’ultima copia sincronizzata con esso.',
'Server address unknown': 'Indirizzo del server sconosciuto',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Abbina di nuovo, oppure esporta prima un backup. Se procedi comunque, una copia di queste modifiche resta su questo dispositivo finché non si ricollega a questo server con questo account — poi vengono aggiunte di nuovo.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Accedi di nuovo, oppure esporta prima un backup. Se procedi comunque, una copia di queste modifiche resta su questo dispositivo finché non si ricollega a questo server con questo account — poi vengono aggiunte di nuovo.',
}
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index f5f7c4eef..63378736f 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -1548,4 +1548,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': '서버에 연결할 수 없습니다 — 변경 사항은 이 기기에 저장되며 서버가 다시 응답하면 동기화됩니다.',
'Your server cannot be reached — showing the last copy synced with it.': '서버에 연결할 수 없습니다 — 서버와 마지막으로 동기화된 사본을 표시합니다.',
'Server address unknown': '서버 주소를 알 수 없음',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': '다시 페어링하거나 먼저 백업을 내보내세요. 그래도 계속하면 이 기기가 이 계정으로 이 서버에 다시 연결될 때까지 변경 사항의 사본이 이 기기에 보관되며, 그때 다시 추가됩니다.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': '다시 로그인하거나 먼저 백업을 내보내세요. 그래도 계속하면 이 기기가 이 계정으로 이 서버에 다시 연결될 때까지 변경 사항의 사본이 이 기기에 보관되며, 그때 다시 추가됩니다.',
}
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index 6e78f9d27..cd203c23e 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -1548,4 +1548,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Twój serwer jest nieosiągalny — zmiany są zapisane na tym urządzeniu i zsynchronizują się, gdy znów odpowie.',
'Your server cannot be reached — showing the last copy synced with it.': 'Twój serwer jest nieosiągalny — wyświetlana jest ostatnia kopia z nim zsynchronizowana.',
'Server address unknown': 'Nieznany adres serwera',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Sparuj ponownie albo najpierw wyeksportuj kopię. Jeśli mimo to przejdziesz dalej, kopia tych zmian zostanie na tym urządzeniu, aż ponownie połączy się z tym serwerem na tym koncie — wtedy zostaną dodane z powrotem.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Zaloguj się ponownie albo najpierw wyeksportuj kopię. Jeśli mimo to przejdziesz dalej, kopia tych zmian zostanie na tym urządzeniu, aż ponownie połączy się z tym serwerem na tym koncie — wtedy zostaną dodane z powrotem.',
}
diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.js
index 04fac75d3..f85fe5f17 100644
--- a/frontend/src/locales/pt-BR.js
+++ b/frontend/src/locales/pt-BR.js
@@ -906,6 +906,8 @@ export const PT_BR_OVERRIDES = {
'The server cannot be reached': 'Não é possível acessar o servidor',
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Não é possível acessar o seu servidor — suas alterações ficam salvas neste dispositivo e sincronizam assim que ele voltar a responder.',
'Your server cannot be reached — showing the last copy synced with it.': 'Não é possível acessar o seu servidor — mostrando a última cópia sincronizada com ele.',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Pareie de novo ou exporte um backup antes. Se continuar mesmo assim, uma cópia dessas alterações fica neste dispositivo até ele se conectar de novo a este servidor com esta conta — aí elas são adicionadas de volta.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Entre de novo ou exporte um backup antes. Se continuar mesmo assim, uma cópia dessas alterações fica neste dispositivo até ele se conectar de novo a este servidor com esta conta — aí elas são adicionadas de volta.',
}
export default { ...pt, ...PT_BR_OVERRIDES }
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index a239afcfc..aaabf4800 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -1548,4 +1548,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Não é possível chegar ao teu servidor — as tuas alterações ficam guardadas neste dispositivo e sincronizam assim que ele voltar a responder.',
'Your server cannot be reached — showing the last copy synced with it.': 'Não é possível chegar ao teu servidor — a mostrar a última cópia sincronizada com ele.',
'Server address unknown': 'Endereço do servidor desconhecido',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Emparelha de novo, ou exporta primeiro uma cópia. Se continuares mesmo assim, fica uma cópia destas alterações neste dispositivo até ele voltar a ligar-se a este servidor com esta conta — aí são novamente adicionadas.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Inicia sessão de novo, ou exporta primeiro uma cópia. Se continuares mesmo assim, fica uma cópia destas alterações neste dispositivo até ele voltar a ligar-se a este servidor com esta conta — aí são novamente adicionadas.',
}
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index e0a335511..04e63ab11 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -1548,4 +1548,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Ваш сервер недоступен — изменения сохранены на этом устройстве и синхронизируются, как только он снова ответит.',
'Your server cannot be reached — showing the last copy synced with it.': 'Ваш сервер недоступен — показана последняя копия, синхронизированная с ним.',
'Server address unknown': 'Адрес сервера неизвестен',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Выполните сопряжение заново или сначала экспортируйте резервную копию. Если всё равно продолжить, копия этих изменений останется на этом устройстве, пока оно снова не подключится к этому серверу с этим аккаунтом, — тогда они будут добавлены обратно.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Войдите снова или сначала экспортируйте резервную копию. Если всё равно продолжить, копия этих изменений останется на этом устройстве, пока оно снова не подключится к этому серверу с этим аккаунтом, — тогда они будут добавлены обратно.',
}
diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.js
index a9486ebd2..a9a3f8d61 100644
--- a/frontend/src/locales/th.js
+++ b/frontend/src/locales/th.js
@@ -1559,4 +1559,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'เชื่อมต่อเซิร์ฟเวอร์ของคุณไม่ได้ — การเปลี่ยนแปลงถูกบันทึกไว้ในอุปกรณ์นี้และจะซิงค์เมื่อเซิร์ฟเวอร์ตอบกลับอีกครั้ง',
'Your server cannot be reached — showing the last copy synced with it.': 'เชื่อมต่อเซิร์ฟเวอร์ของคุณไม่ได้ — แสดงสำเนาล่าสุดที่ซิงค์กับเซิร์ฟเวอร์',
'Server address unknown': 'ไม่ทราบที่อยู่เซิร์ฟเวอร์',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'จับคู่ใหม่ หรือส่งออกข้อมูลสำรองก่อน หากดำเนินการต่อ สำเนาของการเปลี่ยนแปลงเหล่านี้จะอยู่ในอุปกรณ์นี้จนกว่าจะเชื่อมต่อกับเซิร์ฟเวอร์นี้ด้วยบัญชีนี้อีกครั้ง — แล้วจะถูกเพิ่มกลับเข้าไป',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'เข้าสู่ระบบอีกครั้ง หรือส่งออกข้อมูลสำรองก่อน หากดำเนินการต่อ สำเนาของการเปลี่ยนแปลงเหล่านี้จะอยู่ในอุปกรณ์นี้จนกว่าจะเชื่อมต่อกับเซิร์ฟเวอร์นี้ด้วยบัญชีนี้อีกครั้ง — แล้วจะถูกเพิ่มกลับเข้าไป',
}
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index a7e88ead5..141869445 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -1548,4 +1548,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Sunucuna ulaşılamıyor — değişikliklerin bu cihazda kayıtlı, sunucu yeniden yanıt verince eşitlenecek.',
'Your server cannot be reached — showing the last copy synced with it.': 'Sunucuna ulaşılamıyor — sunucuyla en son eşitlenen kopya gösteriliyor.',
'Server address unknown': 'Sunucu adresi bilinmiyor',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Yeniden eşleştir ya da önce bir yedek dışa aktar. Yine de devam edersen bu değişikliklerin bir kopyası, cihaz bu hesapla bu sunucuya yeniden bağlanana kadar bu cihazda kalır — sonra geri eklenir.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Yeniden giriş yap ya da önce bir yedek dışa aktar. Yine de devam edersen bu değişikliklerin bir kopyası, cihaz bu hesapla bu sunucuya yeniden bağlanana kadar bu cihazda kalır — sonra geri eklenir.',
}
diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.js
index 0b5637c5d..f2adee85b 100644
--- a/frontend/src/locales/uk.js
+++ b/frontend/src/locales/uk.js
@@ -1545,4 +1545,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': 'Твій сервер недоступний — зміни збережено на цьому пристрої, вони синхронізуються, щойно він знову відповість.',
'Your server cannot be reached — showing the last copy synced with it.': 'Твій сервер недоступний — показано останню копію, синхронізовану з ним.',
'Server address unknown': 'Адреса сервера невідома',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Спаруй знову або спершу експортуй резервну копію. Якщо все одно продовжити, копія цих змін залишиться на цьому пристрої, доки він знову не підключиться до цього сервера з цим акаунтом, — тоді їх буде додано назад.',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': 'Увійди знову або спершу експортуй резервну копію. Якщо все одно продовжити, копія цих змін залишиться на цьому пристрої, доки він знову не підключиться до цього сервера з цим акаунтом, — тоді їх буде додано назад.',
}
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index 3b8f78a3f..684f1ea50 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -1548,4 +1548,6 @@ export default {
'Your server cannot be reached — your changes are saved on this device and sync once it answers again.': '无法连接你的服务器 — 你的更改已保存在此设备上,服务器恢复响应后会自动同步。',
'Your server cannot be reached — showing the last copy synced with it.': '无法连接你的服务器 — 正在显示最后一次与它同步的副本。',
'Server address unknown': '服务器地址未知',
+ 'Pair again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': '请重新配对,或先导出备份。如果仍然继续,这些更改的副本会保留在此设备上,直到它再次以此账号连接到此服务器——届时会重新加入。',
+ 'Sign in again, or export a backup first. Going ahead anyway keeps a copy of these changes on this device until it connects to this server as this account again — then they are added back.': '请重新登录,或先导出备份。如果仍然继续,这些更改的副本会保留在此设备上,直到它再次以此账号连接到此服务器——届时会重新加入。',
}
diff --git a/frontend/src/views/Settings.server-sync.test.jsx b/frontend/src/views/Settings.server-sync.test.jsx
index 0fdd9d9bb..e63008b13 100644
--- a/frontend/src/views/Settings.server-sync.test.jsx
+++ b/frontend/src/views/Settings.server-sync.test.jsx
@@ -240,10 +240,36 @@ describe('leaving the server', () => {
const sheet = openSheet()
expect(sheet.textContent).toContain('Some changes on this device have not reached your server.')
expect(buttonByText(sheet, 'Try again')).toBeUndefined()
+ // The sentence names the button that is there (it said "Try again" beside "Pair again").
+ expect(sheet.textContent).toContain('Pair again, or export a backup first.')
+ expect(sheet.textContent).not.toContain('Try again')
act(() => buttonByText(sheet, 'Pair again').click())
expect(openSheet().querySelector('.connect').dataset.again).toBe('true')
})
+ it('a browser the server refuses is told to sign in again, next to the button that does', async () => {
+ mocks.MOBILE = false
+ mocks.sync = sync('auth', { auth: true, pending: true, lastError: { status: 401, code: 'auth' } })
+ mocks.signOut.mockResolvedValueOnce({ owed: true, count: 2 })
+ const page = mount(<Settings />)
+ act(() => rowByTitle(page, 'Sign out').click())
+ await act(async () => { await confirm().onConfirm() })
+ const sheet = openSheet()
+ expect(sheet.textContent).toContain('Sign in again, or export a backup first.')
+ expect(sheet.textContent).not.toContain('Try again')
+ expect(buttonByText(sheet, 'Sign in with passkey')).toBeTruthy()
+ })
+
+ it('a server that is only out of reach still offers Try again, and says so', async () => {
+ mocks.disconnectServer.mockResolvedValueOnce({ owed: true, count: 1 })
+ const page = mount(<Settings />)
+ act(() => rowByTitle(page, 'Disconnect').click())
+ await act(async () => { await confirm().onConfirm() })
+ const sheet = openSheet()
+ expect(sheet.textContent).toContain('Try again, or export a backup first.')
+ expect(buttonByText(sheet, 'Try again')).toBeTruthy()
+ })
+
it('a copy that cannot be kept aside is not wiped either, and it says so', async () => {
mocks.disconnectServer.mockResolvedValueOnce({ owed: true, count: 1 })
const page = mount(<Settings />)