Skip to content
Snippets Groups Projects
Commit 66f52864 authored by Neuber, Eugen Ramon's avatar Neuber, Eugen Ramon :speech_balloon:
Browse files

Add a lightweight "page not found" message (en/de)

See issue #33
parent ed92bea5
No related branches found
No related tags found
No related merge requests found
Pipeline #18297 failed
...@@ -815,7 +815,7 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) { ...@@ -815,7 +815,7 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) {
// We hide the app until we are either fully logged in or logged out // We hide the app until we are either fully logged in or logged out
// At the same time when we hide the main app we show the main slot (e.g. a loading spinner) // At the same time when we hide the main app we show the main slot (e.g. a loading spinner)
const appHidden = (this._loginStatus == 'unknown' || this._loginStatus == 'logging-in'); const appHidden = (this._loginStatus === 'unknown' || this._loginStatus === 'logging-in');
const mainClassMap = classMap({hidden: appHidden}); const mainClassMap = classMap({hidden: appHidden});
const slotClassMap = classMap({hidden: !appHidden}); const slotClassMap = classMap({hidden: !appHidden});
...@@ -885,6 +885,10 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) { ...@@ -885,6 +885,10 @@ export class AppShell extends ScopedElementsMixin(AdapterLitElement) {
</aside> </aside>
<main> <main>
<div style="display: ${this.description === null ? 'none' : 'block'};">
  • More, Stefan Josef @104B75699A112D3F ·

    @euneuber I think this condition is the wrong way around. right now it always displays this error when the description exists, and no error, when it does not exist. ;-)

    the check could actually read:

    ${this.description === null ? 'block' : 'none'};
  • Neuber, Eugen Ramon :speech_balloon: @398EE57581B44C9A ·
    Author Maintainer

    Yes, you are correct. Also my test for a non existing page is too simple. I will correct this as soon as possible!

  • Please register or sign in to reply
<h2>${i18n.t('page-not-found')}</h2>
<p>${i18n.t('choose-from-menu')}</p>
</div>
<p class="description">${this.description}</p> <p class="description">${this.description}</p>
${ this._renderActivity() } ${ this._renderActivity() }
</main> </main>
......
...@@ -15,5 +15,7 @@ ...@@ -15,5 +15,7 @@
"headline": "Willkommen bei der Applikation '{{appname}}'." "headline": "Willkommen bei der Applikation '{{appname}}'."
}, },
"login": "Einloggen", "login": "Einloggen",
"logout": "Ausloggen" "logout": "Ausloggen",
"page-not-found": "Die gewünschte Seite wurde nicht gefunden",
"choose-from-menu": "Bitte wählen Sie eine Aktivität aus dem Menu."
} }
\ No newline at end of file
...@@ -15,5 +15,7 @@ ...@@ -15,5 +15,7 @@
"headline": "Welcome to the '{{appname}}' application." "headline": "Welcome to the '{{appname}}' application."
}, },
"login": "Login", "login": "Login",
"logout": "Logout" "logout": "Logout",
"page-not-found": "Requested Page Not Found",
"choose-from-menu": "Please choose an activity from the menu."
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment