ui: simplify helper copy and center page loading feedback
This commit is contained in:
@@ -122,7 +122,6 @@ export function control(field, {get, set, onError = () => {}}) {
|
||||
};
|
||||
}
|
||||
root.dataset.configPath = pathKey(path);
|
||||
root.title = field.help || field.description || label;
|
||||
root.disabled = Boolean(field.disabled || field.readonly);
|
||||
sync();
|
||||
return {root, sync, field};
|
||||
@@ -156,7 +155,7 @@ export class PolicyForm {
|
||||
entry.root.classList.add('field-input');
|
||||
const boolean = ['boolean', 'bool', 'checkbox'].includes(field.type);
|
||||
const wide = ['id_counts', 'counts', 'reserves', 'multiselect'].includes(field.type);
|
||||
const row = el('label', {class: `field${boolean ? ' checkbox-field' : ''}${wide ? ' field-wide' : ''}`, title: field.help || field.description || ''});
|
||||
const row = el('label', {class: `field${boolean ? ' checkbox-field' : ''}${wide ? ' field-wide' : ''}`});
|
||||
if (entry.root.tagName === 'DIV') {
|
||||
const fieldRow = el('div', {class: `field${wide ? ' field-wide' : ''}`}, el('span', {class: 'field-label', text: field.label}), entry.root);
|
||||
groups.get(group).append(fieldRow);
|
||||
@@ -166,7 +165,6 @@ export class PolicyForm {
|
||||
groups.get(group).append(row);
|
||||
entry.row = row;
|
||||
}
|
||||
if (field.help || field.description) groups.get(group).append(el('span', {class: 'field-help', text: field.help || field.description}));
|
||||
this.controls.push(entry);
|
||||
});
|
||||
this.signature = signature;
|
||||
|
||||
Reference in New Issue
Block a user