From: PhiTux Date: Mon, 13 Oct 2025 09:14:32 +0000 (+0200) Subject: added frontend notification on failed migration X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=46f5fa15e61147f7af19bfeab39348db6ff99598;p=DailyTxT.git added frontend notification on failed migration --- diff --git a/README.md b/README.md index 1344869..7fc61f1 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,9 @@ The old version 1 is moved to the [v1 branch](https://github.com/PhiTux/DailyTxT ### Newest Testing Versions: ``` +2.0.0-testing.3 (2025-10-13) +- Updated the migration process in the frontend. When migration fails on serverside, the user now gets notified. + 2.0.0-testing.2 (2025-10-13) - Trying to fix a bug in the migration process by removing unnecessary code (that should validate some data, but was probably harmful instead). ``` diff --git a/backend/version b/backend/version index 343d310..5570fd7 100644 --- a/backend/version +++ b/backend/version @@ -1 +1 @@ -2.0.0-testing.2 +2.0.0-testing.3 diff --git a/frontend/src/i18n/de.json b/frontend/src/i18n/de.json index 99c3337..28d3606 100644 --- a/frontend/src/i18n/de.json +++ b/frontend/src/i18n/de.json @@ -73,6 +73,7 @@ "alert": { "empty_fields": "Eingabefelder dürfen nicht leer sein!", "login_failed": "Login fehlgeschlagen!
\nBitte Eingabedaten überprüfen.", + "migration_failed": "Die Migration ist fehlgeschlagen! Schaue in den Serverlogs nach (z. B. mit docker logs dailytxt), ob du dort genauere Informationen findest!", "passwords_do_not_match": "Passwörter stimmen nicht überein!", "registration_allowed_until": "Registrierung temporär geöffnet bis {date_and_time} (Serverzeit).", "registration_failed": "Registrierung fehlgeschlagen - bitte Fehlermeldungen analysieren!", diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index 3ab6c52..ecf09ef 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -73,6 +73,7 @@ "alert": { "empty_fields": "Fields must not be empty!", "login_failed": "Login failed!
\nPlease check your input data.", + "migration_failed": "The migration failed! Check the server logs (e.g., with docker logs dailytxt) to see if you can find more detailed information there!", "passwords_do_not_match": "Passwords do not match!", "registration_allowed_until": "Registration temporarily open until {date_and_time} (Server time).", "registration_failed": "Registration failed - please analyze the error messages!", diff --git a/frontend/src/routes/login/+page.svelte b/frontend/src/routes/login/+page.svelte index ebded22..fa71562 100644 --- a/frontend/src/routes/login/+page.svelte +++ b/frontend/src/routes/login/+page.svelte @@ -123,6 +123,7 @@ }); } + let show_migration_failed = $state(false); function handleMigrationProgress(username) { // Poll the server for migration progress const interval = setInterval(() => { @@ -146,10 +147,12 @@ if ( !response.data.migration_in_progress && - !response.data.progress.phase === 'not_started' + response.data.progress?.phase !== 'not_started' && + response.data.progress?.phase !== 'completed' ) { console.log('Migration stopped'); is_migrating = false; + show_migration_failed = true; clearInterval(interval); } }) @@ -166,6 +169,7 @@ show_login_failed = false; show_login_warning_empty_fields = false; is_migrating = false; + show_migration_failed = false; const username = document.getElementById('loginUsername').value; const password = document.getElementById('loginPassword').value; @@ -432,6 +436,11 @@ {/if} {/if} + {#if show_migration_failed} + + {/if} {#if show_login_failed}