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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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