feat(admin): render mltextarea fields per locale
- MLField.vue is the one locale-switching wrapper; MLTextField, MLMarkdownField and the new MLTextareaField are shells around it - isMLFieldType replaces the inline ML type-name checks in formState, FormView and RelationChildModal - register mltextarea as a group-labelled control; rebuild dist
This commit is contained in:
@@ -1,3 +1,11 @@
|
||||
/** The multilingual field types: their value is a locale -> text map. */
|
||||
export const ML_FIELD_TYPES: ReadonlySet<string> = new Set(['mltext', 'mltextarea', 'mlmarkdown'])
|
||||
|
||||
/** Reports whether a field type holds a locale -> text map. */
|
||||
export function isMLFieldType(type: string | undefined): boolean {
|
||||
return type !== undefined && ML_FIELD_TYPES.has(type)
|
||||
}
|
||||
|
||||
/** Window event that keeps every ML control on one active locale. */
|
||||
export const ML_LOCALE_CHANGE = 'summer:ml-locale'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user