Merge pull request #11309 from Budibase/cheeks-fixes

Misc fixes
This commit is contained in:
Andrew Kingston 2023-07-21 13:28:09 +01:00 committed by GitHub
commit 5bbf6dc1c8
7 changed files with 23 additions and 21 deletions

View File

@ -12,23 +12,24 @@
export let getOptionValue = option => option export let getOptionValue = option => option
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
const onChange = e => { const onChange = e => {
let tempValue = value const optionValue = e.target.value
let isChecked = e.target.checked if (e.target.checked && !value.includes(optionValue)) {
if (!tempValue.includes(e.target.value) && isChecked) { dispatch("change", [...value, optionValue])
tempValue.push(e.target.value) } else {
}
value = tempValue
dispatch( dispatch(
"change", "change",
tempValue.filter(val => val !== e.target.value || isChecked) value.filter(x => x !== optionValue)
) )
} }
}
</script> </script>
<div class={`spectrum-FieldGroup spectrum-FieldGroup--${direction}`}> <div class={`spectrum-FieldGroup spectrum-FieldGroup--${direction}`}>
{#if options && Array.isArray(options)} {#if options && Array.isArray(options)}
{#each options as option} {#each options as option}
{@const optionValue = getOptionValue(option)}
<div <div
title={getOptionLabel(option)} title={getOptionLabel(option)}
class="spectrum-Checkbox spectrum-FieldGroup-item" class="spectrum-Checkbox spectrum-FieldGroup-item"
@ -39,11 +40,11 @@
> >
<input <input
on:change={onChange} on:change={onChange}
value={getOptionValue(option)}
type="checkbox" type="checkbox"
class="spectrum-Checkbox-input" class="spectrum-Checkbox-input"
value={optionValue}
checked={value.includes(optionValue)}
{disabled} {disabled}
checked={value.includes(getOptionValue(option))}
/> />
<span class="spectrum-Checkbox-box"> <span class="spectrum-Checkbox-box">
<svg <svg

View File

@ -109,6 +109,7 @@
{disableSorting} {disableSorting}
{customPlaceholder} {customPlaceholder}
allowEditRows={allowEditing} allowEditRows={allowEditing}
allowEditColumns={allowEditing}
showAutoColumns={!hideAutocolumns} showAutoColumns={!hideAutocolumns}
{allowClickRows} {allowClickRows}
on:clickrelationship={e => selectRelationship(e.detail)} on:clickrelationship={e => selectRelationship(e.detail)}

View File

@ -95,9 +95,9 @@
{#if !creating} {#if !creating}
<div> <div>
A user's email, role, first and last names cannot be changed from within A user's email, role, first and last names cannot be changed from within
the app builder. Please go to the <Link the app builder. Please go to the
on:click={$goto("/builder/portal/manage/users")}>user portal</Link <Link on:click={$goto("/builder/portal/users/users")}>user portal</Link>
> to do this. to do this.
</div> </div>
{/if} {/if}
<RowFieldControl <RowFieldControl

View File

@ -132,7 +132,6 @@
flex-direction: row; flex-direction: row;
justify-content: flex-start; justify-content: flex-start;
align-items: stretch; align-items: stretch;
position: relative;
} }
.nav-item.scrollable { .nav-item.scrollable {
flex-direction: column; flex-direction: column;

View File

@ -74,11 +74,12 @@
border: 1px solid var(--spectrum-global-color-gray-300); border: 1px solid var(--spectrum-global-color-gray-300);
border-radius: 5px; border-radius: 5px;
width: 100%; width: 100%;
background-color: #00000047; background: var(--spectrum-global-color-gray-50);
color: white; color: white;
overflow: hidden; overflow: hidden;
padding: 12px 16px; padding: 12px 16px;
box-sizing: border-box; box-sizing: border-box;
transition: background 130ms ease-out;
} }
.left { .left {
flex: 1; flex: 1;
@ -94,7 +95,7 @@
} }
.button:hover { .button:hover {
cursor: pointer; cursor: pointer;
filter: brightness(1.2); background: var(--spectrum-global-color-gray-100);
} }
.connected { .connected {
display: flex; display: flex;

View File

@ -38,7 +38,7 @@
return [] return []
} }
if (Array.isArray(values)) { if (Array.isArray(values)) {
return values return values.slice()
} }
return values.split(",").map(value => value.trim()) return values.split(",").map(value => value.trim())
} }

View File

@ -507,17 +507,17 @@ export async function configChecklist(ctx: Ctx) {
smtp: { smtp: {
checked: !!smtpConfig, checked: !!smtpConfig,
label: "Set up email", label: "Set up email",
link: "/builder/portal/manage/email", link: "/builder/portal/settings/email",
}, },
adminUser: { adminUser: {
checked: userExists, checked: userExists,
label: "Create your first user", label: "Create your first user",
link: "/builder/portal/manage/users", link: "/builder/portal/users/users",
}, },
sso: { sso: {
checked: !!googleConfig || !!oidcConfig, checked: !!googleConfig || !!oidcConfig,
label: "Set up single sign-on", label: "Set up single sign-on",
link: "/builder/portal/manage/auth", link: "/builder/portal/settings/auth",
}, },
} }
} }