From 3712d5aee282c76dfc5a966f857ec65a9ab93ca3 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 4 Nov 2021 15:16:08 +0100 Subject: [PATCH] web/user: fix empty page when no sources to connect exist Signed-off-by: Jens Langhammer --- web/src/locales/en.po | 4 ++++ web/src/locales/fr_FR.po | 4 ++++ web/src/locales/pseudo-LOCALE.po | 4 ++++ web/src/user/user-settings/sources/SourceSettings.ts | 5 +++++ 4 files changed, 17 insertions(+) diff --git a/web/src/locales/en.po b/web/src/locales/en.po index 916db56d7..2c491cd7b 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -2932,6 +2932,10 @@ msgstr "No policies are currently bound to this object." msgid "No recovery flow is configured." msgstr "No recovery flow is configured." +#: src/user/user-settings/sources/SourceSettings.ts +msgid "No services available." +msgstr "No services available." + #: src/pages/flows/BoundStagesList.ts msgid "No stages are currently bound to this flow." msgstr "No stages are currently bound to this flow." diff --git a/web/src/locales/fr_FR.po b/web/src/locales/fr_FR.po index e19a0a461..f0e769787 100644 --- a/web/src/locales/fr_FR.po +++ b/web/src/locales/fr_FR.po @@ -2912,6 +2912,10 @@ msgstr "Aucune politique n'est actuellement lié à cet objet." msgid "No recovery flow is configured." msgstr "Aucun flux de récupération n'est configuré." +#: src/user/user-settings/sources/SourceSettings.ts +msgid "No services available." +msgstr "" + #: src/pages/flows/BoundStagesList.ts msgid "No stages are currently bound to this flow." msgstr "Aucune étape n'est actuellement liée à ce flux." diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index 97d8204fc..e0d87b7cb 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -2924,6 +2924,10 @@ msgstr "" msgid "No recovery flow is configured." msgstr "" +#: src/user/user-settings/sources/SourceSettings.ts +msgid "No services available." +msgstr "" + #: src/pages/flows/BoundStagesList.ts msgid "No stages are currently bound to this flow." msgstr "" diff --git a/web/src/user/user-settings/sources/SourceSettings.ts b/web/src/user/user-settings/sources/SourceSettings.ts index 9929376a9..6f36ca065 100644 --- a/web/src/user/user-settings/sources/SourceSettings.ts +++ b/web/src/user/user-settings/sources/SourceSettings.ts @@ -59,6 +59,11 @@ export class UserSourceSettingsPage extends LitElement { return html`
${until( this.sourceSettings?.then((source) => { + if (source.length < 1) { + return html``; + } return source.map((stage) => { return html`
${this.renderSourceSettings(stage)}