From 36bd4b1e51cbe262089cee269ebe7a4188118bf6 Mon Sep 17 00:00:00 2001 From: Jens L Date: Sat, 6 May 2023 00:11:27 +0200 Subject: [PATCH] web/admin: use radio for client type (#5499) * web/admin: use radio for client type also fix search select not correctly passing all items in .selected callback Signed-off-by: Jens Langhammer * include unrelated typo fix Signed-off-by: Jens Langhammer --------- Signed-off-by: Jens Langhammer --- .../providers/oauth2/OAuth2ProviderForm.ts | 40 +++++++++---------- web/src/elements/forms/SearchSelect.ts | 2 +- web/src/locales/de.po | 12 +++++- web/src/locales/en.po | 12 +++++- web/src/locales/es.po | 12 +++++- web/src/locales/fr_FR.po | 12 +++++- web/src/locales/pl.po | 12 +++++- web/src/locales/pseudo-LOCALE.po | 10 ++++- web/src/locales/tr.po | 12 +++++- web/src/locales/zh-Hans.po | 12 +++++- web/src/locales/zh-Hant.po | 12 +++++- web/src/locales/zh_TW.po | 12 +++++- .../item.md | 2 +- 13 files changed, 119 insertions(+), 43 deletions(-) diff --git a/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts b/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts index 5a7cdd2a7..89ef723ae 100644 --- a/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts +++ b/web/src/admin/providers/oauth2/OAuth2ProviderForm.ts @@ -167,34 +167,30 @@ export class OAuth2ProviderFormPage extends ModelForm { ?required=${true} name="clientType" > - -

- ${t`Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable.`} -

+ extends AKElement { this.isFetchingData = true; this.fetchObjects(this.query).then((objects) => { objects.forEach((obj) => { - if (this.selected && this.selected(obj, this.objects || [])) { + if (this.selected && this.selected(obj, objects || [])) { this.selectedObject = obj; } }); diff --git a/web/src/locales/de.po b/web/src/locales/de.po index 670c8d897..df25f1571 100644 --- a/web/src/locales/de.po +++ b/web/src/locales/de.po @@ -1415,8 +1415,12 @@ msgid "Confidential" msgstr "Vertraulich" #: src/admin/providers/oauth2/OAuth2ProviderForm.ts -msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." -msgstr "Vertrauenswürde Clients sind in der Lage, die Vertraulichkeit ihrer Anmeldedaten zu wahren. Öffentliche Clients sind dazu nicht in der Lage." +msgid "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" +msgstr "" + +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +#~ msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +#~ msgstr "Vertrauenswürde Clients sind in der Lage, die Vertraulichkeit ihrer Anmeldedaten zu wahren. Öffentliche Clients sind dazu nicht in der Lage." #: src/admin/outposts/OutpostForm.ts msgid "Configuration" @@ -5050,6 +5054,10 @@ msgstr "Proxy-Details" msgid "Public" msgstr "Öffentlich" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +msgid "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." +msgstr "" + #: src/admin/stages/captcha/CaptchaStageForm.ts msgid "Public Key" msgstr "Öffentlicher Schlüssel" diff --git a/web/src/locales/en.po b/web/src/locales/en.po index 1c894bcee..4c746327d 100644 --- a/web/src/locales/en.po +++ b/web/src/locales/en.po @@ -1412,8 +1412,12 @@ msgid "Confidential" msgstr "Confidential" #: src/admin/providers/oauth2/OAuth2ProviderForm.ts -msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." -msgstr "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +msgid "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" +msgstr "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" + +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +#~ msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +#~ msgstr "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." #: src/admin/outposts/OutpostForm.ts msgid "Configuration" @@ -5150,6 +5154,10 @@ msgstr "Proxy details" msgid "Public" msgstr "Public" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +msgid "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." +msgstr "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." + #: src/admin/stages/captcha/CaptchaStageForm.ts msgid "Public Key" msgstr "Public Key" diff --git a/web/src/locales/es.po b/web/src/locales/es.po index c2bf2ad04..c5bc05cad 100644 --- a/web/src/locales/es.po +++ b/web/src/locales/es.po @@ -1391,8 +1391,12 @@ msgid "Confidential" msgstr "Confidencial" #: src/admin/providers/oauth2/OAuth2ProviderForm.ts -msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." -msgstr "Los clientes confidenciales son capaces de mantener la confidencialidad de sus credenciales. Los clientes públicos son incapaces." +msgid "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" +msgstr "" + +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +#~ msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +#~ msgstr "Los clientes confidenciales son capaces de mantener la confidencialidad de sus credenciales. Los clientes públicos son incapaces." #: src/admin/outposts/OutpostForm.ts msgid "Configuration" @@ -5026,6 +5030,10 @@ msgstr "" msgid "Public" msgstr "Público" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +msgid "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." +msgstr "" + #: src/admin/stages/captcha/CaptchaStageForm.ts msgid "Public Key" msgstr "Clave pública" diff --git a/web/src/locales/fr_FR.po b/web/src/locales/fr_FR.po index 7602bc62a..9150b6533 100644 --- a/web/src/locales/fr_FR.po +++ b/web/src/locales/fr_FR.po @@ -1396,8 +1396,12 @@ msgid "Confidential" msgstr "Confidentiel" #: src/admin/providers/oauth2/OAuth2ProviderForm.ts -msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." -msgstr "Les clients confidentiels sont capable de maintenir la confidentialité de leurs identifiants. Le clients publics n'en sont pas capables." +msgid "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" +msgstr "" + +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +#~ msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +#~ msgstr "Les clients confidentiels sont capable de maintenir la confidentialité de leurs identifiants. Le clients publics n'en sont pas capables." #: src/admin/outposts/OutpostForm.ts msgid "Configuration" @@ -5027,6 +5031,10 @@ msgstr "Informations du proxy" msgid "Public" msgstr "Public" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +msgid "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." +msgstr "" + #: src/admin/stages/captcha/CaptchaStageForm.ts msgid "Public Key" msgstr "Clé publique" diff --git a/web/src/locales/pl.po b/web/src/locales/pl.po index 7fae6104f..3a4da2dab 100644 --- a/web/src/locales/pl.po +++ b/web/src/locales/pl.po @@ -1397,8 +1397,12 @@ msgid "Confidential" msgstr "Poufny" #: src/admin/providers/oauth2/OAuth2ProviderForm.ts -msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." -msgstr "Poufni klienci są w stanie zachować poufność swoich danych uwierzytelniających. Klienci publiczni są niezdolni." +msgid "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" +msgstr "" + +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +#~ msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +#~ msgstr "Poufni klienci są w stanie zachować poufność swoich danych uwierzytelniających. Klienci publiczni są niezdolni." #: src/admin/outposts/OutpostForm.ts msgid "Configuration" @@ -5036,6 +5040,10 @@ msgstr "Dane proxy" msgid "Public" msgstr "Publiczny" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +msgid "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." +msgstr "" + #: src/admin/stages/captcha/CaptchaStageForm.ts msgid "Public Key" msgstr "Klucz publiczny" diff --git a/web/src/locales/pseudo-LOCALE.po b/web/src/locales/pseudo-LOCALE.po index 7f5c4fa22..5f7cdd15a 100644 --- a/web/src/locales/pseudo-LOCALE.po +++ b/web/src/locales/pseudo-LOCALE.po @@ -1400,9 +1400,13 @@ msgid "Confidential" msgstr "" #: src/admin/providers/oauth2/OAuth2ProviderForm.ts -msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +msgid "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" msgstr "" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +#~ msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +#~ msgstr "" + #: src/admin/outposts/OutpostForm.ts msgid "Configuration" msgstr "" @@ -5118,6 +5122,10 @@ msgstr "" msgid "Public" msgstr "" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +msgid "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." +msgstr "" + #: src/admin/stages/captcha/CaptchaStageForm.ts msgid "Public Key" msgstr "" diff --git a/web/src/locales/tr.po b/web/src/locales/tr.po index 32de0d639..7eefbc130 100644 --- a/web/src/locales/tr.po +++ b/web/src/locales/tr.po @@ -1391,8 +1391,12 @@ msgid "Confidential" msgstr "Gizli" #: src/admin/providers/oauth2/OAuth2ProviderForm.ts -msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." -msgstr "Gizli müşteriler kimlik bilgilerinin gizliliğini koruyabilir. Kamu müşterileri aciz." +msgid "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" +msgstr "" + +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +#~ msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +#~ msgstr "Gizli müşteriler kimlik bilgilerinin gizliliğini koruyabilir. Kamu müşterileri aciz." #: src/admin/outposts/OutpostForm.ts msgid "Configuration" @@ -5026,6 +5030,10 @@ msgstr "" msgid "Public" msgstr "Kamu" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +msgid "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." +msgstr "" + #: src/admin/stages/captcha/CaptchaStageForm.ts msgid "Public Key" msgstr "Genel Anahtar" diff --git a/web/src/locales/zh-Hans.po b/web/src/locales/zh-Hans.po index 6774057e2..f88135eb5 100644 --- a/web/src/locales/zh-Hans.po +++ b/web/src/locales/zh-Hans.po @@ -1365,8 +1365,12 @@ msgid "Confidential" msgstr "机密" #: src/admin/providers/oauth2/OAuth2ProviderForm.ts -msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." -msgstr "机密客户能够对其凭据进行保密。公共客户端无此能力。" +msgid "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" +msgstr "" + +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +#~ msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +#~ msgstr "机密客户能够对其凭据进行保密。公共客户端无此能力。" #: src/admin/outposts/OutpostForm.ts msgid "Configuration" @@ -4976,6 +4980,10 @@ msgstr "代理详情" msgid "Public" msgstr "公开" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +msgid "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." +msgstr "" + #: src/admin/stages/captcha/CaptchaStageForm.ts msgid "Public Key" msgstr "公钥" diff --git a/web/src/locales/zh-Hant.po b/web/src/locales/zh-Hant.po index 7566d3b83..15ad62f42 100644 --- a/web/src/locales/zh-Hant.po +++ b/web/src/locales/zh-Hant.po @@ -1399,8 +1399,12 @@ msgid "Confidential" msgstr "机密" #: src/admin/providers/oauth2/OAuth2ProviderForm.ts -msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." -msgstr "机密客户能够对其凭据进行保密。公共客户端无能为力。" +msgid "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" +msgstr "" + +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +#~ msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +#~ msgstr "机密客户能够对其凭据进行保密。公共客户端无能为力。" #: src/admin/outposts/OutpostForm.ts msgid "Configuration" @@ -5034,6 +5038,10 @@ msgstr "代理详情" msgid "Public" msgstr "公开" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +msgid "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." +msgstr "" + #: src/admin/stages/captcha/CaptchaStageForm.ts msgid "Public Key" msgstr "公钥" diff --git a/web/src/locales/zh_TW.po b/web/src/locales/zh_TW.po index f2d1a9508..abeda47d0 100644 --- a/web/src/locales/zh_TW.po +++ b/web/src/locales/zh_TW.po @@ -1399,8 +1399,12 @@ msgid "Confidential" msgstr "机密" #: src/admin/providers/oauth2/OAuth2ProviderForm.ts -msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." -msgstr "机密客户能够对其凭据进行保密。公共客户端无能为力。" +msgid "Confidential clients are capable of maintaining the confidentiality of their credentials such as client secrets" +msgstr "" + +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +#~ msgid "Confidential clients are capable of maintaining the confidentiality of their credentials. Public clients are incapable." +#~ msgstr "机密客户能够对其凭据进行保密。公共客户端无能为力。" #: src/admin/outposts/OutpostForm.ts msgid "Configuration" @@ -5034,6 +5038,10 @@ msgstr "代理详情" msgid "Public" msgstr "公开" +#: src/admin/providers/oauth2/OAuth2ProviderForm.ts +msgid "Public clients are incapable of maintaining the confidentiality and should use methods like PKCE." +msgstr "" + #: src/admin/stages/captcha/CaptchaStageForm.ts msgid "Public Key" msgstr "公钥" diff --git a/website/blog/2023-05-04-i-gambled-against-react-and-lost/item.md b/website/blog/2023-05-04-i-gambled-against-react-and-lost/item.md index a8b814d4b..3a6b89dfd 100644 --- a/website/blog/2023-05-04-i-gambled-against-react-and-lost/item.md +++ b/website/blog/2023-05-04-i-gambled-against-react-and-lost/item.md @@ -108,7 +108,7 @@ My choice of Lit came down to three factors, all of which emphasized that goal o - **Lit used a browser-native technology**. Traditional web development often involves a lot of clashing CSS files, making it difficult to use, say, a component from one library and a different component from another. Lit doesn’t have this problem because it uses a [shadow DOM](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_shadow_DOM) and the shadow DOM is a standard accepted by all browsers. We had flexibility on one end, with browsers, but on the other end, because these web components were browser-native, we could also use them across numerous frameworks (including React). - **Lit offered better modularity.** With the shadow DOM functionality, I was able to isolate individual components and apply CSS to only those components. That meant greater flexibility because I could mix and match but it also meant more modularity. I didn’t need a giant CSS file that could cause all kinds of effects when changed. Instead, I had modular bundles of isolated components and individual CSS files. -- **Lit didn’t require me to rebuild**. This was less an advantage of Lit and moreso a disadvantage of React. If I had chosen React, I would have had to rebuild authentik from the ground up, or use a lot of hacky workarounds to migrate at a slower pace. And once I had done that, I would have been limited, to a degree, to what React and the React community offered. There were things that were standard to browsers that I wouldn’t have had access to or would have only had access to if they had explicit React support. There were bridges between standard components and React components, but they were built by community projects and I didn’t want to get stuck relying on a project some [random person in Nebraska is thanklessly maintaining](https://xkcd.com/2347/). +- **Lit didn’t require me to rebuild**. This was less an advantage of Lit and more so a disadvantage of React. If I had chosen React, I would have had to rebuild authentik from the ground up, or use a lot of hacky workarounds to migrate at a slower pace. And once I had done that, I would have been limited, to a degree, to what React and the React community offered. There were things that were standard to browsers that I wouldn’t have had access to or would have only had access to if they had explicit React support. There were bridges between standard components and React components, but they were built by community projects and I didn’t want to get stuck relying on a project some [random person in Nebraska is thanklessly maintaining](https://xkcd.com/2347/). ### Lit and React is apples and oranges