Content-Length: 292362 | pFad | https://github.com/sebadob/rauthy/commit/2600005be81649083103051a5bfc7b7ec49c9c3c

E0 Merge pull request #300 from sebadob/bug-ui-client-name-undefined · sebadob/rauthy@2600005 · GitHub
Skip to content

Commit

Permalink
Merge pull request #300 from sebadob/bug-ui-client-name-undefined
Browse files Browse the repository at this point in the history
bug: UI `client_name` showing undefined
  • Loading branch information
sebadob authored Apr 7, 2024
2 parents a3e62ab + 20265a6 commit 2600005
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 13 deletions.
25 changes: 17 additions & 8 deletions frontend/src/components/admin/clients/ClientConfig.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
let validateRedirectUris;
let validatePostLogoutUris;
// This hook is needed to not show `undefined` in inputs after some
// values have been emptied manually
$: if (client.id) {
checkUndefinedValues();
}
$: if (success) {
timer = setTimeout(() => {
success = false;
Expand All @@ -51,6 +57,16 @@
}
onMount(() => {
return () => clearTimeout(timer);
});
let formErrors = {};
const schema = yup.object().shape({
name: yup.string().trim().matches(REGEX_CLIENT_NAME, "Can only contain characters, numbers and '-'"),
access_token_lifetime: yup.number().required('Token Lifetime is required').min(60, 'Cannot be lower than 60').max(86400, 'Cannot be higher than 86400'),
});
function checkUndefinedValues() {
if (client.redirect_uris[0] === '') {
client.redirect_uris = [];
}
Expand All @@ -60,14 +76,7 @@
if (!client.name) {
client.name = '';
}
return () => clearTimeout(timer);
});
let formErrors = {};
const schema = yup.object().shape({
name: yup.string().trim().matches(REGEX_CLIENT_NAME, "Can only contain characters, numbers and '-'"),
access_token_lifetime: yup.number().required('Token Lifetime is required').min(60, 'Cannot be lower than 60').max(86400, 'Cannot be higher than 86400'),
});
}
function handleKeyPress(event) {
if (event.code === 'Enter') {
Expand Down
10 changes: 5 additions & 5 deletions frontend/src/lib/inputs/Input.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
<div class="container" style:width="calc({width} + 12px)">
<div class="label">
<div
class="labelInner font-label noselect"
style:background={disabled ? 'var(--col-gmid)' : 'var(--col-bg)'}
class="labelInner font-label noselect"
style:background={disabled ? 'var(--col-gmid)' : 'var(--col-bg)'}
>
<label for={name}>
<slot></slot>
Expand All @@ -60,9 +60,9 @@

{#if error}
<div
class="err font-label"
style:width={width}
transition:slide|global={{ duration: 250 }}
class="err font-label"
style:width={width}
transition:slide|global={{ duration: 250 }}
>
{error}
</div>
Expand Down

0 comments on commit 2600005

Please sign in to comment.








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/sebadob/rauthy/commit/2600005be81649083103051a5bfc7b7ec49c9c3c

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy