add SettingsField struct and repeater field type for block settings
All checks were successful
deploy / deploy (push) Successful in 1m23s
All checks were successful
deploy / deploy (push) Successful in 1m23s
Introduces typed settings schema with SettingsField struct, replaces the read-only JSON textarea with a full repeater UI for info_card items. Supports add, remove, reorder and inline editing of repeater items. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1346,16 +1346,55 @@
|
||||
gap: 0.625rem;
|
||||
}
|
||||
|
||||
.block-settings-json {
|
||||
font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace;
|
||||
font-size: 0.75rem;
|
||||
opacity: 0.7;
|
||||
/* Repeater fields */
|
||||
|
||||
.repeater-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.block-settings-hint {
|
||||
font-size: 0.75rem;
|
||||
color: color-mix(in oklch, var(--t-text-primary) 50%, transparent);
|
||||
margin-top: 0.25rem;
|
||||
.repeater-items {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.repeater-item {
|
||||
border: 1px solid var(--t-border-default);
|
||||
border-radius: 0.375rem;
|
||||
padding: 0.5rem;
|
||||
|
||||
& fieldset {
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.repeater-item-fields {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.375rem;
|
||||
}
|
||||
|
||||
.repeater-item-controls {
|
||||
display: flex;
|
||||
gap: 0.125rem;
|
||||
justify-content: flex-end;
|
||||
margin-top: 0.375rem;
|
||||
}
|
||||
|
||||
.repeater-remove-btn {
|
||||
color: var(--t-danger);
|
||||
}
|
||||
|
||||
.repeater-add-btn {
|
||||
align-self: flex-start;
|
||||
border-style: dashed;
|
||||
}
|
||||
|
||||
} /* @layer admin */
|
||||
|
||||
Reference in New Issue
Block a user