added password requirement

This commit is contained in:
Philip Duong 2024-11-19 22:33:03 +01:00
parent af76b65366
commit 64e04b673b
4 changed files with 26 additions and 1 deletions

View file

@ -180,6 +180,29 @@
"one_tracker": "1 Tracker",
"n_tracker": "{n} Tracker",
"tracking": "Verfolgung",
"syncing": "Synchronisierung",
"sync_password": "Passwort (mind. 8 Zeichen)",
"sync_logged": "Login erfolgreich!",
"syncing_subtitle": "Sync your progress across multiple devices via a self-hosted \nserver. Make sure to upload first if this is your first time \nsyncing or download before using (auto) sync on this device!",
"last_sync": "Zuletzt synchronisiert: ",
"last_upload": "Zuletzt hochgeladen: ",
"last_download": "Zuletzt heruntergeladen: ",
"sync_server": "Sync Server IP Adresse / Domain",
"sync_login_invalid_creds": "Ungültiger Email oder Passwort",
"sync_checking": "Synchronisierung wird vorbereitet...",
"sync_uploading": "Hochladen...",
"sync_downloading": "Herunterladen...",
"sync_upload_finished": "Hochladen erfolgreich",
"sync_download_finished": "Herunterladen erfolgreich",
"sync_up_to_date": "Synchronisierung ist auf den neuesten Stand",
"sync_upload_failed": "Hochladen fehlgeschlagen",
"sync_download_failed": "Herunterladen fehlgeschlagen",
"sync_button_sync": "Jetzt synchronisieren",
"sync_button_upload": "Alles hochladen",
"sync_button_download": "Alles herunterladen",
"sync_confirm_upload": "Deine Daten auf dem Server werden jetzt durch deinen lokalen Daten ersetzt!",
"sync_confirm_download": "Deine lokalen Daten werden jetzt durch den Daten vom Server ersetzt!",
"dialog_confirm": "Fortfahren",
"description": "Beschreibung",
"episode_progress": "Fortschritt: {n}",
"n_episodes": "{n} Episoden",

View file

@ -182,6 +182,7 @@
"n_tracker": "{n} trackers",
"tracking": "Tracking",
"syncing": "Sync",
"sync_password": "Password (at least 8 characters)",
"sync_logged": "Login successful",
"syncing_subtitle": "Sync your progress across multiple devices via a self-hosted \nserver. Make sure to upload first if this is your first time \nsyncing or download before using (auto) sync on this device!",
"last_sync": "Last sync at: ",

View file

@ -407,7 +407,7 @@ void _showDialogLogin(BuildContext context, WidgetRef ref) {
password = value;
}),
decoration: InputDecoration(
hintText: l10n.password,
hintText: l10n.sync_password,
suffixIcon: IconButton(
onPressed: () => setState(() {
obscureText = !obscureText;

View file

@ -40,6 +40,7 @@ class SyncServer extends _$SyncServer {
Future<(bool, String)> login(AppLocalizations l10n, String server,
String username, String password) async {
server = server[server.length - 1] == '/' ? server.substring(0, server.length - 1) : server;
try {
var response = await http.post(
Uri.parse('$server$_loginUrl'),