diff --git a/packages/bbui/src/Tags/Tag.svelte b/packages/bbui/src/Tags/Tag.svelte index 9c4cb6e583..f7089decdb 100644 --- a/packages/bbui/src/Tags/Tag.svelte +++ b/packages/bbui/src/Tags/Tag.svelte @@ -8,7 +8,6 @@ export let invalid = false export let disabled = false export let closable = false - export let onClick
{#if closable} - + {/if}
diff --git a/packages/builder/src/pages/builder/portal/manage/auth/index.svelte b/packages/builder/src/pages/builder/portal/manage/auth/index.svelte index fc56c2cdef..733d7eee92 100644 --- a/packages/builder/src/pages/builder/portal/manage/auth/index.svelte +++ b/packages/builder/src/pages/builder/portal/manage/auth/index.svelte @@ -31,6 +31,8 @@ OIDC: "oidc", } + const HasSpacesRegex = /[\\"\s]/ + // 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 $: googleCallbackUrl = undefined @@ -462,7 +464,7 @@ let update = scopesFields[0].inputText.trim() - if (/[\\"\s]/.test(update)) { + if (HasSpacesRegex.test(update)) { scopesFields[0].error = "Auth scopes cannot contain spaces, double quotes or backslashes" return @@ -475,13 +477,10 @@ return } else { scopesFields[0].error = null - } - - if (scopes.indexOf(update) == -1) { scopes.push(update) 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} { + on:click={() => { let idxScopes = providers.oidc.config.configs[0]["scopes"] if (idxScopes.length == 1) { idxScopes.pop()