minor UI fixes
This commit is contained in:
@@ -61,7 +61,7 @@
|
||||
<span class="txt" class:txt-hint={isAdminOnly}>
|
||||
{label}
|
||||
</span>
|
||||
<span class="label label-sm" class:label-danger={!isAdminOnly}>
|
||||
<span class="label label-sm">
|
||||
{isAdminOnly ? "Admins only" : "Custom rule"}
|
||||
</span>
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
<style>
|
||||
label .label {
|
||||
margin: -5px 0;
|
||||
background: rgba(53, 71, 104, 0.12);
|
||||
}
|
||||
.lock-toggle {
|
||||
position: absolute;
|
||||
@@ -123,6 +124,6 @@
|
||||
padding: 10px;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
background: rgba(53, 71, 104, 0.08);
|
||||
background: rgba(53, 71, 104, 0.09);
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -121,35 +121,25 @@
|
||||
{#if !isSingle}
|
||||
<div class="col-sm-6">
|
||||
<Field class="form-field" name="schema.{key}.options.minSelect" let:uniqueId>
|
||||
<label for={uniqueId}>
|
||||
<span class="txt">Min select</span>
|
||||
<i
|
||||
class="ri-information-line link-hint"
|
||||
use:tooltip={{
|
||||
text: "Leave empty for no limit.",
|
||||
position: "top",
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
<input type="number" id={uniqueId} step="1" min="1" bind:value={options.minSelect} />
|
||||
</Field>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<Field class="form-field" name="schema.{key}.options.maxSelect" let:uniqueId>
|
||||
<label for={uniqueId}>
|
||||
<span class="txt">Max select</span>
|
||||
<i
|
||||
class="ri-information-line link-hint"
|
||||
use:tooltip={{
|
||||
text: "Leave empty for no limit.",
|
||||
position: "top",
|
||||
}}
|
||||
/>
|
||||
</label>
|
||||
<label for={uniqueId}>Min select</label>
|
||||
<input
|
||||
type="number"
|
||||
id={uniqueId}
|
||||
step="1"
|
||||
min="1"
|
||||
placeholder="No min limit"
|
||||
bind:value={options.minSelect}
|
||||
/>
|
||||
</Field>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<Field class="form-field" name="schema.{key}.options.maxSelect" let:uniqueId>
|
||||
<label for={uniqueId}>Max select</label>
|
||||
<input
|
||||
type="number"
|
||||
id={uniqueId}
|
||||
step="1"
|
||||
placeholder="No max limit"
|
||||
min={options.minSelect || 2}
|
||||
bind:value={options.maxSelect}
|
||||
/>
|
||||
|
||||
@@ -487,7 +487,7 @@
|
||||
>
|
||||
<span class="txt">Clear filters</span>
|
||||
</button>
|
||||
{:else}
|
||||
{:else if !collection?.isView}
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-secondary btn-expanded m-t-sm"
|
||||
|
||||
@@ -45,7 +45,6 @@
|
||||
isSaving = true;
|
||||
|
||||
try {
|
||||
console.log(CommonHelper.filterRedactedProps(formSettings).oidcAuth);
|
||||
const result = await ApiClient.settings.update(CommonHelper.filterRedactedProps(formSettings));
|
||||
initSettings(result);
|
||||
setErrors({});
|
||||
|
||||
@@ -454,17 +454,18 @@ a,
|
||||
--labelHPadding: 8px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
vertical-align: top;
|
||||
gap: 5px;
|
||||
padding: var(--labelVPadding) var(--labelHPadding);
|
||||
min-height: 23px;
|
||||
max-width: 100%;
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
font-size: var(--smFontSize);
|
||||
line-height: var(--smLineHeight);
|
||||
border-radius: 30px;
|
||||
background: var(--baseAlt2Color);
|
||||
color: var(--txtPrimaryColor);
|
||||
white-space: nowrap;
|
||||
border-radius: 30px;
|
||||
|
||||
.btn:last-child {
|
||||
margin-right: calc(-0.5 * var(--labelHPadding));
|
||||
|
||||
@@ -1176,27 +1176,27 @@ export default class CommonHelper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Groups and sorts collections array by type (auth, single, base).
|
||||
* Groups and sorts collections array by type (auth, base, view).
|
||||
*
|
||||
* @param {Array} collections
|
||||
* @return {Array}
|
||||
*/
|
||||
static sortCollections(collections = []) {
|
||||
const authCollections = [];
|
||||
const singleCollections = [];
|
||||
const baseCollections = [];
|
||||
const auth = [];
|
||||
const base = [];
|
||||
const view = [];
|
||||
|
||||
for (const collection of collections) {
|
||||
if (collection.type === 'auth') {
|
||||
authCollections.push(collection);
|
||||
auth.push(collection);
|
||||
} else if (collection.type === 'base') {
|
||||
singleCollections.push(collection);
|
||||
base.push(collection);
|
||||
} else {
|
||||
baseCollections.push(collection);
|
||||
view.push(collection);
|
||||
}
|
||||
}
|
||||
|
||||
return [].concat(authCollections, singleCollections, baseCollections);
|
||||
return [].concat(auth, base, view);
|
||||
}
|
||||
|
||||
|
||||
@@ -1377,7 +1377,7 @@ export default class CommonHelper {
|
||||
for (let expr of expressions) {
|
||||
const column = expr.trim().split(" ").pop(); // get only the alias
|
||||
if (column != "" && column != groupReplacement) {
|
||||
result.push(column);
|
||||
result.push(column.replace(/[\'\"\`\[\]]/g, ""));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user