feat: relation field and picker

This commit is contained in:
Florian Sylvain committed 2026-10-23 00:13:42 +02:00
1 parent b45c99be3b
commit 37a77c9c22
92 files changed
+6826 -80

No files matched your search

+6
View File
@@ -26,6 +26,8 @@ function requiredMessage(field: BuiltinField) {
return t('Choose yes or no for {0}.', [field.label])
case 'media':
return t('Pick an image for {0}.', [field.label])
case 'relation':
return t('Choose a {0}.', [field.label])
default:
return t('Fill in {0}.', [field.label])
}
@@ -43,6 +45,8 @@ function typeMessage(field: BuiltinField) {
return t('{0} must be one of the choices.', [field.label])
case 'media':
return t('{0} must be an image from the library.', [field.label])
case 'relation':
return t('{0} must point to an existing entry.', [field.label])
default:
return t('{0} must be text.', [field.label])
}
@@ -76,6 +80,8 @@ function uniqueMessage(field: BuiltinField) {
return t('Another entry already uses this choice for {0}.', [field.label])
case 'date':
return t('Another entry already uses this date for {0}.', [field.label])
case 'relation':
return t('That {0} is already used by another entry.', [field.label])
default:
return t('Another entry already uses this {0}. Enter a different one.', [field.label])
}