web/user: fix empty page when no sources to connect exist

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-11-04 15:16:08 +01:00
parent dd82d55725
commit 3712d5aee2
4 changed files with 17 additions and 0 deletions

View File

@ -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."

View File

@ -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."

View File

@ -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 ""

View File

@ -59,6 +59,11 @@ export class UserSourceSettingsPage extends LitElement {
return html`<div class="pf-l-grid pf-m-gutter">
${until(
this.sourceSettings?.then((source) => {
if (source.length < 1) {
return html`<ak-empty-state
header=${t`No services available.`}
></ak-empty-state>`;
}
return source.map((stage) => {
return html`<div class="pf-l-grid__item pf-m-6-col pf-m-4-col-on-xl">
${this.renderSourceSettings(stage)}