From 9257f3c919c1750d3ccc22e2b19c7fba92b1b437 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 17 Sep 2021 10:04:47 +0200 Subject: [PATCH] web/user: add missing stop impersonation button Signed-off-by: Jens Langhammer --- web/src/interfaces/UserInterface.ts | 51 +++++++++++++++++++---------- web/src/locales/en.po | 24 +++++++++----- web/src/locales/pseudo-LOCALE.po | 24 +++++++++----- 3 files changed, 65 insertions(+), 34 deletions(-) diff --git a/web/src/interfaces/UserInterface.ts b/web/src/interfaces/UserInterface.ts index 7dd11ebd0..a33e155c2 100644 --- a/web/src/interfaces/UserInterface.ts +++ b/web/src/interfaces/UserInterface.ts @@ -198,26 +198,41 @@ export class UserInterface extends LitElement { }), )} + ${until( + me().then((u) => { + if (u.original) { + return html``; + } + return html``; + }), + )}
- ${until( - uiConfig().then((config) => { - return me().then((me) => { - switch (config.navbar.userDisplay) { - case "username": - return me.user.username; - case "name": - return me.user.name; - case "email": - return me.user.email; - default: - return me.user.username; - } - }); - }), - )} - + ${until( + uiConfig().then((config) => { + return me().then((me) => { + switch (config.navbar.userDisplay) { + case "username": + return me.user.username; + case "name": + return me.user.name; + case "email": + return me.user.email; + default: + return me.user.username; + } + }); + }), + )}
${until( diff --git a/web/src/locales/en.po b/web/src/locales/en.po index e8b5e7478..d587f4d24 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -869,9 +869,9 @@ msgstr "Connection error, reconnecting..." msgid "Connection settings" msgstr "Connection settings" -#: -#~ msgid "Consent" -#~ msgstr "Consent" +#: src/user/user-settings/UserSettingsPage.ts +msgid "Consent" +msgstr "Consent" #: src/pages/stages/consent/ConsentStageForm.ts msgid "Consent expires in" @@ -1548,11 +1548,11 @@ msgstr "Error when creating credential: {err}" msgid "Error when validating assertion on server: {err}" msgstr "Error when validating assertion on server: {err}" -#: src/user/user-settings/SourceSettings.ts +#: src/user/user-settings/sources/SourceSettings.ts msgid "Error: unsupported source settings: {0}" msgstr "Error: unsupported source settings: {0}" -#: src/user/user-settings/StageSettings.ts +#: src/user/user-settings/stages/StageSettings.ts msgid "Error: unsupported stage settings: {0}" msgstr "Error: unsupported stage settings: {0}" @@ -2345,9 +2345,9 @@ msgstr "Load servers" #: src/flows/stages/prompt/PromptStage.ts #: src/pages/applications/ApplicationViewPage.ts #: src/pages/applications/ApplicationViewPage.ts -#: src/user/user-settings/SourceSettings.ts -#: src/user/user-settings/StageSettings.ts #: src/user/user-settings/UserSelfForm.ts +#: src/user/user-settings/sources/SourceSettings.ts +#: src/user/user-settings/stages/StageSettings.ts #: src/utils.ts msgid "Loading" msgstr "Loading" @@ -3545,6 +3545,10 @@ msgstr "SSO URL" msgid "Same identifier is used for all providers" msgstr "Same identifier is used for all providers" +#: src/user/user-settings/UserSelfForm.ts +msgid "Save" +msgstr "Save" + #: src/pages/property-mappings/PropertyMappingScopeForm.ts msgid "Scope name" msgstr "Scope name" @@ -3735,6 +3739,7 @@ msgid "Session(s)" msgstr "Session(s)" #: src/pages/users/UserViewPage.ts +#: src/user/user-settings/UserSettingsPage.ts msgid "Sessions" msgstr "Sessions" @@ -3961,6 +3966,10 @@ msgstr "Status: Disabled" msgid "Status: Enabled" msgstr "Status: Enabled" +#: src/interfaces/UserInterface.ts +msgid "Stop impersonation" +msgstr "Stop impersonation" + #: src/pages/events/EventInfo.ts #: src/pages/stages/email/EmailStageForm.ts msgid "Subject" @@ -4725,7 +4734,6 @@ msgstr "Up-to-date!" #: src/pages/users/UserActiveForm.ts #: src/pages/users/UserListPage.ts #: src/pages/users/UserViewPage.ts -#: src/user/user-settings/UserSelfForm.ts #: src/user/user-settings/stages/UserSettingsAuthenticatorWebAuthn.ts #: src/user/user-settings/stages/UserSettingsAuthenticatorWebAuthn.ts #: src/user/user-settings/stages/UserSettingsAuthenticatorWebAuthn.ts diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index 2b7ea0deb..b51696342 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -863,9 +863,9 @@ msgstr "" msgid "Connection settings" msgstr "" -#: -#~ msgid "Consent" -#~ msgstr "" +#: src/user/user-settings/UserSettingsPage.ts +msgid "Consent" +msgstr "" #: src/pages/stages/consent/ConsentStageForm.ts msgid "Consent expires in" @@ -1540,11 +1540,11 @@ msgstr "" msgid "Error when validating assertion on server: {err}" msgstr "" -#: src/user/user-settings/SourceSettings.ts +#: src/user/user-settings/sources/SourceSettings.ts msgid "Error: unsupported source settings: {0}" msgstr "" -#: src/user/user-settings/StageSettings.ts +#: src/user/user-settings/stages/StageSettings.ts msgid "Error: unsupported stage settings: {0}" msgstr "" @@ -2337,9 +2337,9 @@ msgstr "" #: src/flows/stages/prompt/PromptStage.ts #: src/pages/applications/ApplicationViewPage.ts #: src/pages/applications/ApplicationViewPage.ts -#: src/user/user-settings/SourceSettings.ts -#: src/user/user-settings/StageSettings.ts #: src/user/user-settings/UserSelfForm.ts +#: src/user/user-settings/sources/SourceSettings.ts +#: src/user/user-settings/stages/StageSettings.ts #: src/utils.ts msgid "Loading" msgstr "" @@ -3537,6 +3537,10 @@ msgstr "" msgid "Same identifier is used for all providers" msgstr "" +#: src/user/user-settings/UserSelfForm.ts +msgid "Save" +msgstr "" + #: src/pages/property-mappings/PropertyMappingScopeForm.ts msgid "Scope name" msgstr "" @@ -3727,6 +3731,7 @@ msgid "Session(s)" msgstr "" #: src/pages/users/UserViewPage.ts +#: src/user/user-settings/UserSettingsPage.ts msgid "Sessions" msgstr "" @@ -3953,6 +3958,10 @@ msgstr "" msgid "Status: Enabled" msgstr "" +#: src/interfaces/UserInterface.ts +msgid "Stop impersonation" +msgstr "" + #: src/pages/events/EventInfo.ts #: src/pages/stages/email/EmailStageForm.ts msgid "Subject" @@ -4710,7 +4719,6 @@ msgstr "" #: src/pages/users/UserActiveForm.ts #: src/pages/users/UserListPage.ts #: src/pages/users/UserViewPage.ts -#: src/user/user-settings/UserSelfForm.ts #: src/user/user-settings/stages/UserSettingsAuthenticatorWebAuthn.ts #: src/user/user-settings/stages/UserSettingsAuthenticatorWebAuthn.ts #: src/user/user-settings/stages/UserSettingsAuthenticatorWebAuthn.ts