Minor updates
This commit is contained in:
parent
8b83e47311
commit
a44a875a95
|
@ -8,7 +8,6 @@
|
||||||
export let invalid = false
|
export let invalid = false
|
||||||
export let disabled = false
|
export let disabled = false
|
||||||
export let closable = false
|
export let closable = false
|
||||||
export let onClick
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
@ -32,7 +31,7 @@
|
||||||
{/if}
|
{/if}
|
||||||
<span class="spectrum-Tags-itemLabel"><slot /></span>
|
<span class="spectrum-Tags-itemLabel"><slot /></span>
|
||||||
{#if closable}
|
{#if closable}
|
||||||
<ClearButton on:click={onClick} />
|
<ClearButton on:click />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
OIDC: "oidc",
|
OIDC: "oidc",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const HasSpacesRegex = /[\\"\s]/
|
||||||
|
|
||||||
// Some older google configs contain a manually specified value - retain the functionality to edit the field
|
// Some older google configs contain a manually specified value - retain the functionality to edit the field
|
||||||
// When there is no value or we are in the cloud - prohibit editing the field, must use platform url to change
|
// When there is no value or we are in the cloud - prohibit editing the field, must use platform url to change
|
||||||
$: googleCallbackUrl = undefined
|
$: googleCallbackUrl = undefined
|
||||||
|
@ -462,7 +464,7 @@
|
||||||
|
|
||||||
let update = scopesFields[0].inputText.trim()
|
let update = scopesFields[0].inputText.trim()
|
||||||
|
|
||||||
if (/[\\"\s]/.test(update)) {
|
if (HasSpacesRegex.test(update)) {
|
||||||
scopesFields[0].error =
|
scopesFields[0].error =
|
||||||
"Auth scopes cannot contain spaces, double quotes or backslashes"
|
"Auth scopes cannot contain spaces, double quotes or backslashes"
|
||||||
return
|
return
|
||||||
|
@ -475,13 +477,10 @@
|
||||||
return
|
return
|
||||||
} else {
|
} else {
|
||||||
scopesFields[0].error = null
|
scopesFields[0].error = null
|
||||||
}
|
|
||||||
|
|
||||||
if (scopes.indexOf(update) == -1) {
|
|
||||||
scopes.push(update)
|
scopes.push(update)
|
||||||
providers.oidc.config.configs[0]["scopes"] = scopes
|
providers.oidc.config.configs[0]["scopes"] = scopes
|
||||||
|
scopesFields[0].inputText = null
|
||||||
}
|
}
|
||||||
scopesFields[0].inputText = null
|
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
@ -493,7 +492,7 @@
|
||||||
{#each providers.oidc.config.configs[0]["scopes"] || [...defaultScopes] as tag, idx}
|
{#each providers.oidc.config.configs[0]["scopes"] || [...defaultScopes] as tag, idx}
|
||||||
<Tag
|
<Tag
|
||||||
closable={scopesFields[0].editing}
|
closable={scopesFields[0].editing}
|
||||||
onClick={() => {
|
on:click={() => {
|
||||||
let idxScopes = providers.oidc.config.configs[0]["scopes"]
|
let idxScopes = providers.oidc.config.configs[0]["scopes"]
|
||||||
if (idxScopes.length == 1) {
|
if (idxScopes.length == 1) {
|
||||||
idxScopes.pop()
|
idxScopes.pop()
|
||||||
|
|
Loading…
Reference in New Issue