feat: localize admin field labels and tighten forms

This commit is contained in:
Codex
2026-04-23 10:15:15 +08:00
parent c79e20bb23
commit 2cd71c0340
14 changed files with 375 additions and 224 deletions
+45 -5
View File
@@ -155,11 +155,11 @@ html[data-theme] .tabs-field__content-wrap {
html[data-theme] .document-fields,
html[data-theme] .collection-edit {
gap: 12px;
gap: 8px;
}
html[data-theme] .render-fields > .field-type {
margin-bottom: 10px;
margin-bottom: 6px;
}
html[data-theme] .tabs-field__tabs {
@@ -188,6 +188,21 @@ html[data-theme] .doc-controls {
backdrop-filter: blur(16px);
}
html[data-theme] .field-type .field-label {
margin-bottom: 4px;
}
html[data-theme] .field-type .field-description {
margin-top: 4px;
font-size: 12px;
line-height: 1.45;
}
html[data-theme] .field-type__wrap,
html[data-theme] .field-type__wrap > div {
gap: 6px;
}
html[data-theme] input,
html[data-theme] textarea,
html[data-theme] select,
@@ -223,11 +238,11 @@ html[data-theme] input,
html[data-theme] textarea,
html[data-theme] select,
html[data-theme] .rs__control {
min-height: 40px;
min-height: 36px;
}
html[data-theme] textarea {
min-height: 100px;
min-height: 88px;
}
html[data-theme] .field-type,
@@ -243,13 +258,38 @@ html[data-theme] .field-type:has(input[type='datetime-local']),
html[data-theme] .field-type:has(input[type='number']),
html[data-theme] .field-type:has(input[type='email']),
html[data-theme] .field-type:has(input[type='text']) {
max-width: 760px;
max-width: 620px;
}
html[data-theme] .row .field-type {
max-width: none;
}
html[data-theme] .row {
gap: 10px;
}
html[data-theme] .field-type.checkbox-field,
html[data-theme] .field-type:has(input[type='checkbox']) {
padding-top: 10px;
padding-bottom: 10px;
}
html[data-theme] .collapsible-field__content,
html[data-theme] .array-field__rows,
html[data-theme] .blocks-field__blocks {
gap: 8px;
}
html[data-theme] .array-field__row,
html[data-theme] .blocks-field__block {
border-radius: 8px;
}
html[data-theme] .render-fields > .field-type .render-fields > .field-type {
margin-bottom: 4px;
}
html[data-theme] .rich-text-lexical,
html[data-theme] .rich-text-lexical .editor-container,
html[data-theme] .rich-text-lexical .editor-scroller,
+14 -13
View File
@@ -30,28 +30,29 @@ export const Dealers: CollectionConfig = {
fields: [
{
name: 'docLocale',
label: { en: 'Doc Locale', zh: '文档语言' },
type: 'select',
required: true,
defaultValue: getDocLocaleDefault,
options: [
{ label: 'English Doc', value: 'en' },
{ label: '中文 Doc', value: 'zh' },
{ label: 'English / 英文', value: 'en' },
{ label: '简体中文', value: 'zh' },
],
admin: {
position: 'sidebar',
description: 'Independent document language for this dealer record.',
},
},
{ name: 'name', type: 'text', required: true, localized: true },
{ name: 'region', type: 'text', required: true, localized: true },
{ name: 'country', type: 'text', required: true, localized: true },
{ name: 'city', type: 'text', localized: true },
{ name: 'address', type: 'textarea', localized: true },
{ name: 'email', type: 'email', localized: true },
{ name: 'phone', type: 'text', localized: true },
{ name: 'website', type: 'text', localized: true },
{ name: 'logo', type: 'upload', relationTo: 'media', localized: true },
{ name: 'isAuthorized', type: 'checkbox', defaultValue: true },
{ name: 'order', type: 'number', defaultValue: 0 },
{ name: 'name', label: { en: 'Name', zh: '名称' }, type: 'text', required: true, localized: true },
{ name: 'region', label: { en: 'Region', zh: '区域' }, type: 'text', required: true, localized: true },
{ name: 'country', label: { en: 'Country', zh: '国家' }, type: 'text', required: true, localized: true },
{ name: 'city', label: { en: 'City', zh: '城市' }, type: 'text', localized: true },
{ name: 'address', label: { en: 'Address', zh: '地址' }, type: 'textarea', localized: true },
{ name: 'email', label: { en: 'Email', zh: '邮箱' }, type: 'email', localized: true },
{ name: 'phone', label: { en: 'Phone', zh: '电话' }, type: 'text', localized: true },
{ name: 'website', label: { en: 'Website', zh: '网站' }, type: 'text', localized: true },
{ name: 'logo', label: { en: 'Logo', zh: 'Logo' }, type: 'upload', relationTo: 'media', localized: true },
{ name: 'isAuthorized', label: { en: 'Authorized', zh: '授权经销商' }, type: 'checkbox', defaultValue: true },
{ name: 'order', label: { en: 'Order', zh: '排序' }, type: 'number', defaultValue: 0 },
],
}
+27 -12
View File
@@ -4,10 +4,16 @@ import { getDocLocaleDefault, resolveDocLocale, syncDocLocaleWithRequestLocale }
const statusField = {
name: 'status',
label: { en: 'Status', zh: '状态' },
type: 'select' as const,
localized: true,
defaultValue: 'draft',
options: ['draft', 'review', 'published', 'archived'],
options: [
{ label: 'Draft / 草稿', value: 'draft' },
{ label: 'Review / 待审核', value: 'review' },
{ label: 'Published / 已发布', value: 'published' },
{ label: 'Archived / 已归档', value: 'archived' },
],
required: true,
}
@@ -39,40 +45,49 @@ export const Downloads: CollectionConfig = {
fields: [
{
name: 'docLocale',
label: { en: 'Doc Locale', zh: '文档语言' },
type: 'select',
required: true,
defaultValue: getDocLocaleDefault,
options: [
{ label: 'English Doc', value: 'en' },
{ label: '中文 Doc', value: 'zh' },
{ label: 'English / 英文', value: 'en' },
{ label: '简体中文', value: 'zh' },
],
admin: {
position: 'sidebar',
description: 'Independent document language for this download entry.',
},
},
{ name: 'title', type: 'text', required: true, localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', required: true, localized: true },
{
name: 'type',
label: { en: 'Type', zh: '分类' },
type: 'select',
localized: true,
required: true,
options: ['firmware', 'manual', 'software', 'other'],
options: [
{ label: 'Firmware / 固件', value: 'firmware' },
{ label: 'Manual / 说明书', value: 'manual' },
{ label: 'Software / 软件', value: 'software' },
{ label: 'Other / 其他', value: 'other' },
],
},
{ name: 'product', type: 'relationship', relationTo: 'products', required: true },
{ name: 'version', type: 'text', localized: true },
{ name: 'releaseDate', type: 'date', localized: true },
{ name: 'file', type: 'upload', relationTo: 'files', localized: true },
{ name: 'checksum', type: 'text', localized: true },
{ name: 'changelog', type: 'richText', localized: true },
{ name: 'notes', type: 'richText', localized: true },
{ name: 'product', label: { en: 'Product', zh: '关联产品' }, type: 'relationship', relationTo: 'products', required: true },
{ name: 'version', label: { en: 'Version', zh: '版本号' }, type: 'text', localized: true },
{ name: 'releaseDate', label: { en: 'Release Date', zh: '发布日期' }, type: 'date', localized: true },
{ name: 'file', label: { en: 'File', zh: '安装包/文件' }, type: 'upload', relationTo: 'files', localized: true },
{ name: 'checksum', label: { en: 'Checksum', zh: '校验值' }, type: 'text', localized: true },
{ name: 'changelog', label: { en: 'Changelog', zh: '更新日志' }, type: 'richText', localized: true },
{ name: 'notes', label: { en: 'Notes', zh: '附加说明' }, type: 'richText', localized: true },
{
name: 'visibility',
label: { en: 'Visibility', zh: '显示设置' },
type: 'group',
localized: true,
fields: [
{
name: 'showInDownloadsCenter',
label: { en: 'Show in Downloads Center', zh: '在下载中心显示' },
type: 'checkbox',
defaultValue: true,
admin: {
+16 -6
View File
@@ -30,12 +30,13 @@ export const FAQs: CollectionConfig = {
fields: [
{
name: 'docLocale',
label: { en: 'Doc Locale', zh: '文档语言' },
type: 'select',
required: true,
defaultValue: getDocLocaleDefault,
options: [
{ label: 'English Doc', value: 'en' },
{ label: '中文 Doc', value: 'zh' },
{ label: 'English / 英文', value: 'en' },
{ label: '简体中文', value: 'zh' },
],
admin: {
position: 'sidebar',
@@ -44,20 +45,29 @@ export const FAQs: CollectionConfig = {
},
{
name: 'group',
label: { en: 'Group', zh: '分组' },
type: 'select',
localized: true,
required: true,
options: ['setup', 'streaming', 'connectivity', 'hardware', 'warranty', 'other'],
options: [
{ label: 'Setup / 初始设置', value: 'setup' },
{ label: 'Streaming / 串流播放', value: 'streaming' },
{ label: 'Connectivity / 连接', value: 'connectivity' },
{ label: 'Hardware / 硬件', value: 'hardware' },
{ label: 'Warranty / 保修', value: 'warranty' },
{ label: 'Other / 其他', value: 'other' },
],
},
{ name: 'question', type: 'text', localized: true, required: true },
{ name: 'answer', type: 'richText', localized: true, required: true },
{ name: 'question', label: { en: 'Question', zh: '问题' }, type: 'text', localized: true, required: true },
{ name: 'answer', label: { en: 'Answer', zh: '答案' }, type: 'richText', localized: true, required: true },
{
name: 'relatedProducts',
label: { en: 'Related Products', zh: '关联产品' },
type: 'relationship',
relationTo: 'products',
hasMany: true,
localized: true,
},
{ name: 'order', type: 'number', defaultValue: 0 },
{ name: 'order', label: { en: 'Order', zh: '排序' }, type: 'number', defaultValue: 0 },
],
}
+20 -12
View File
@@ -36,12 +36,13 @@ export const News: CollectionConfig = {
fields: [
{
name: 'docLocale',
label: { en: 'Doc Locale', zh: '文档语言' },
type: 'select',
required: true,
defaultValue: getDocLocaleDefault,
options: [
{ label: 'English Doc', value: 'en' },
{ label: '中文 Doc', value: 'zh' },
{ label: 'English / 英文', value: 'en' },
{ label: '简体中文', value: 'zh' },
],
admin: {
position: 'sidebar',
@@ -49,24 +50,31 @@ export const News: CollectionConfig = {
'Independent document language. Create one record for EN and one record for ZH, then keep this aligned with the admin locale while editing.',
},
},
{ name: 'slug', type: 'text', required: true, localized: true },
{ name: 'slug', label: { en: 'Slug', zh: '链接标识' }, type: 'text', required: true, localized: true },
{
name: 'category',
label: { en: 'Category', zh: '分类' },
type: 'select',
localized: true,
required: true,
options: ['announcement', 'press', 'review', 'event'],
options: [
{ label: 'Announcement / 公告', value: 'announcement' },
{ label: 'Press / 媒体', value: 'press' },
{ label: 'Review / 评测', value: 'review' },
{ label: 'Event / 活动', value: 'event' },
],
},
{ name: 'title', type: 'text', localized: true, required: true },
{ name: 'excerpt', type: 'textarea', localized: true },
{ name: 'coverImage', type: 'upload', relationTo: 'media', localized: true },
{ name: 'body', type: 'richText', localized: true, required: true },
{ name: 'author', type: 'text', localized: true },
{ name: 'source', type: 'text', localized: true },
{ name: 'sourceUrl', type: 'text', localized: true },
{ name: 'publishedAt', type: 'date', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true, required: true },
{ name: 'excerpt', label: { en: 'Excerpt', zh: '摘要' }, type: 'textarea', localized: true },
{ name: 'coverImage', label: { en: 'Cover Image', zh: '封面图' }, type: 'upload', relationTo: 'media', localized: true },
{ name: 'body', label: { en: 'Body', zh: '正文' }, type: 'richText', localized: true, required: true },
{ name: 'author', label: { en: 'Author', zh: '作者' }, type: 'text', localized: true },
{ name: 'source', label: { en: 'Source', zh: '来源' }, type: 'text', localized: true },
{ name: 'sourceUrl', label: { en: 'Source URL', zh: '来源链接' }, type: 'text', localized: true },
{ name: 'publishedAt', label: { en: 'Published At', zh: '发布时间' }, type: 'date', localized: true },
{
name: 'relatedProducts',
label: { en: 'Related Products', zh: '关联产品' },
type: 'relationship',
relationTo: 'products',
localized: true,
+20 -13
View File
@@ -4,10 +4,16 @@ import { getDocLocaleDefault, resolveDocLocale, syncDocLocaleWithRequestLocale }
const statusField = {
name: 'status',
label: { en: 'Status', zh: '状态' },
type: 'select' as const,
localized: true,
defaultValue: 'draft',
options: ['draft', 'review', 'published', 'archived'],
options: [
{ label: 'Draft / 草稿', value: 'draft' },
{ label: 'Review / 待审核', value: 'review' },
{ label: 'Published / 已发布', value: 'published' },
{ label: 'Archived / 已归档', value: 'archived' },
],
required: true,
}
@@ -39,28 +45,29 @@ export const ProductReviews: CollectionConfig = {
fields: [
{
name: 'docLocale',
label: { en: 'Doc Locale', zh: '文档语言' },
type: 'select',
required: true,
defaultValue: getDocLocaleDefault,
options: [
{ label: 'English Doc', value: 'en' },
{ label: '中文 Doc', value: 'zh' },
{ label: 'English / 英文', value: 'en' },
{ label: '简体中文', value: 'zh' },
],
admin: {
position: 'sidebar',
description: 'Independent document language for this review entry.',
},
},
{ name: 'title', type: 'text', localized: true, required: true },
{ name: 'product', type: 'relationship', relationTo: 'products', required: true },
{ name: 'sourceName', type: 'text', localized: true },
{ name: 'reviewUrl', type: 'text', required: true, localized: true },
{ name: 'thumbnail', type: 'upload', relationTo: 'media', localized: true },
{ name: 'excerpt', type: 'textarea', localized: true },
{ name: 'quote', type: 'textarea', localized: true },
{ name: 'publishedAt', type: 'date', localized: true },
{ name: 'sortOrder', type: 'number', defaultValue: 0, localized: true },
{ name: 'legacySourceUrl', type: 'text', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true, required: true },
{ name: 'product', label: { en: 'Product', zh: '关联产品' }, type: 'relationship', relationTo: 'products', required: true },
{ name: 'sourceName', label: { en: 'Source Name', zh: '来源名称' }, type: 'text', localized: true },
{ name: 'reviewUrl', label: { en: 'Review URL', zh: '评测链接' }, type: 'text', required: true, localized: true },
{ name: 'thumbnail', label: { en: 'Thumbnail', zh: '缩略图' }, type: 'upload', relationTo: 'media', localized: true },
{ name: 'excerpt', label: { en: 'Excerpt', zh: '摘要' }, type: 'textarea', localized: true },
{ name: 'quote', label: { en: 'Quote', zh: '引用语' }, type: 'textarea', localized: true },
{ name: 'publishedAt', label: { en: 'Published At', zh: '发布时间' }, type: 'date', localized: true },
{ name: 'sortOrder', label: { en: 'Sort Order', zh: '排序' }, type: 'number', defaultValue: 0, localized: true },
{ name: 'legacySourceUrl', label: { en: 'Legacy Source URL', zh: '旧站来源链接' }, type: 'text', localized: true },
statusField,
],
}
+26 -13
View File
@@ -4,10 +4,16 @@ import { getDocLocaleDefault, resolveDocLocale, syncDocLocaleWithRequestLocale }
const statusField = {
name: 'status',
label: { en: 'Status', zh: '状态' },
type: 'select' as const,
localized: true,
defaultValue: 'draft',
options: ['draft', 'review', 'published', 'archived'],
options: [
{ label: 'Draft / 草稿', value: 'draft' },
{ label: 'Review / 待审核', value: 'review' },
{ label: 'Published / 已发布', value: 'published' },
{ label: 'Archived / 已归档', value: 'archived' },
],
required: true,
}
@@ -39,35 +45,42 @@ export const ProductVideos: CollectionConfig = {
fields: [
{
name: 'docLocale',
label: { en: 'Doc Locale', zh: '文档语言' },
type: 'select',
required: true,
defaultValue: getDocLocaleDefault,
options: [
{ label: 'English Doc', value: 'en' },
{ label: '中文 Doc', value: 'zh' },
{ label: 'English / 英文', value: 'en' },
{ label: '简体中文', value: 'zh' },
],
admin: {
position: 'sidebar',
description: 'Independent document language for this video entry.',
},
},
{ name: 'title', type: 'text', localized: true, required: true },
{ name: 'product', type: 'relationship', relationTo: 'products', required: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true, required: true },
{ name: 'product', label: { en: 'Product', zh: '关联产品' }, type: 'relationship', relationTo: 'products', required: true },
{
name: 'provider',
label: { en: 'Provider', zh: '平台' },
type: 'select',
localized: true,
required: true,
defaultValue: 'youtube',
options: ['youtube', 'vimeo', 'bilibili', 'other'],
options: [
{ label: 'YouTube', value: 'youtube' },
{ label: 'Vimeo', value: 'vimeo' },
{ label: 'Bilibili', value: 'bilibili' },
{ label: 'Other / 其他', value: 'other' },
],
},
{ name: 'videoUrl', type: 'text', required: true, localized: true },
{ name: 'embedUrl', type: 'text', localized: true },
{ name: 'thumbnail', type: 'upload', relationTo: 'media', localized: true },
{ name: 'description', type: 'richText', localized: true },
{ name: 'publishedAt', type: 'date', localized: true },
{ name: 'sortOrder', type: 'number', defaultValue: 0, localized: true },
{ name: 'legacySourceUrl', type: 'text', localized: true },
{ name: 'videoUrl', label: { en: 'Video URL', zh: '视频链接' }, type: 'text', required: true, localized: true },
{ name: 'embedUrl', label: { en: 'Embed URL', zh: '嵌入链接' }, type: 'text', localized: true },
{ name: 'thumbnail', label: { en: 'Thumbnail', zh: '缩略图' }, type: 'upload', relationTo: 'media', localized: true },
{ name: 'description', label: { en: 'Description', zh: '说明' }, type: 'richText', localized: true },
{ name: 'publishedAt', label: { en: 'Published At', zh: '发布时间' }, type: 'date', localized: true },
{ name: 'sortOrder', label: { en: 'Sort Order', zh: '排序' }, type: 'number', defaultValue: 0, localized: true },
{ name: 'legacySourceUrl', label: { en: 'Legacy Source URL', zh: '旧站来源链接' }, type: 'text', localized: true },
statusField,
],
}
+65 -46
View File
@@ -5,19 +5,25 @@ import { getDocLocaleDefault, resolveDocLocale, syncDocLocaleWithRequestLocale }
const statusField = {
name: 'status',
label: { en: 'Status', zh: '状态' },
type: 'select' as const,
localized: true,
defaultValue: 'draft',
options: ['draft', 'review', 'published', 'archived'],
options: [
{ label: 'Draft / 草稿', value: 'draft' },
{ label: 'Review / 待审核', value: 'review' },
{ label: 'Published / 已发布', value: 'published' },
{ label: 'Archived / 已归档', value: 'archived' },
],
required: true,
}
const seoFields: Field[] = [
{ name: 'title', type: 'text' as const, localized: true },
{ name: 'description', type: 'textarea' as const, localized: true },
{ name: 'ogImage', type: 'upload' as const, relationTo: 'media' as const },
{ name: 'canonical', type: 'text' as const },
{ name: 'noIndex', type: 'checkbox' as const, defaultValue: false },
{ name: 'title', label: { en: 'SEO Title', zh: 'SEO 标题' }, type: 'text' as const, localized: true },
{ name: 'description', label: { en: 'SEO Description', zh: 'SEO 描述' }, type: 'textarea' as const, localized: true },
{ name: 'ogImage', label: { en: 'OG Image', zh: '分享图' }, type: 'upload' as const, relationTo: 'media' as const },
{ name: 'canonical', label: { en: 'Canonical URL', zh: '规范链接' }, type: 'text' as const },
{ name: 'noIndex', label: { en: 'No Index', zh: '禁止索引' }, type: 'checkbox' as const, defaultValue: false },
]
export const Products: CollectionConfig = {
@@ -51,29 +57,31 @@ export const Products: CollectionConfig = {
fields: [
{
name: 'docLocale',
label: { en: 'Doc Locale', zh: '文档语言' },
type: 'select',
required: true,
defaultValue: getDocLocaleDefault,
options: [
{ label: 'English Doc', value: 'en' },
{ label: '中文 Doc', value: 'zh' },
{ label: 'English / 英文', value: 'en' },
{ label: '简体中文', value: 'zh' },
],
admin: {
description: 'Independent document language for this product record.',
},
},
{ name: 'model', type: 'text', required: true },
{ name: 'slug', type: 'text', required: true, localized: true },
{ name: 'model', label: { en: 'Model', zh: '产品型号' }, type: 'text', required: true },
{ name: 'slug', label: { en: 'Slug', zh: '链接标识' }, type: 'text', required: true, localized: true },
statusField,
{ name: 'order', type: 'number', defaultValue: 0 },
{ name: 'order', label: { en: 'Order', zh: '排序' }, type: 'number', defaultValue: 0 },
],
},
{
type: 'row',
fields: [
{ name: 'category', type: 'relationship', relationTo: 'productCategories', required: true },
{ name: 'category', label: { en: 'Category', zh: '产品分类' }, type: 'relationship', relationTo: 'productCategories', required: true },
{
name: 'template',
label: { en: 'Template', zh: '模板目录' },
type: 'select',
defaultValue: 'default',
options: getProductTemplateOptions(),
@@ -84,6 +92,7 @@ export const Products: CollectionConfig = {
},
{
name: 'templateEnabled',
label: { en: 'Template Enabled', zh: '模板已启用' },
type: 'checkbox',
defaultValue: false,
admin: {
@@ -97,13 +106,14 @@ export const Products: CollectionConfig = {
type: 'tabs',
tabs: [
{
label: 'Overview',
label: { en: 'Overview', zh: '概览' },
fields: [
{ name: 'name', type: 'text', localized: true, required: true },
{ name: 'tagline', type: 'text', localized: true },
{ name: 'summary', type: 'richText', localized: true },
{ name: 'name', label: { en: 'Name', zh: '名称' }, type: 'text', localized: true, required: true },
{ name: 'tagline', label: { en: 'Tagline', zh: '副标题' }, type: 'text', localized: true },
{ name: 'summary', label: { en: 'Summary', zh: '摘要' }, type: 'richText', localized: true },
{
name: 'overview',
label: { en: 'Overview Body', zh: '概览正文' },
type: 'richText',
localized: true,
admin: {
@@ -114,10 +124,11 @@ export const Products: CollectionConfig = {
],
},
{
label: 'Legacy HTML',
label: { en: 'Legacy HTML', zh: '旧站 HTML' },
fields: [
{
name: 'legacyContentHtml',
label: { en: 'Legacy HTML Source', zh: '旧站 HTML 源码' },
type: 'code',
localized: true,
admin: {
@@ -129,57 +140,62 @@ export const Products: CollectionConfig = {
],
},
{
label: 'Media',
label: { en: 'Media', zh: '媒体素材' },
fields: [
{ name: 'heroImage', type: 'upload', relationTo: 'media', localized: true },
{ name: 'cardImage', type: 'upload', relationTo: 'media', localized: true },
{ name: 'lifestyleImage', type: 'upload', relationTo: 'media', localized: true },
{ name: 'heroImage', label: { en: 'Hero Image', zh: '头图' }, type: 'upload', relationTo: 'media', localized: true },
{ name: 'cardImage', label: { en: 'Card Image', zh: '卡片图' }, type: 'upload', relationTo: 'media', localized: true },
{ name: 'lifestyleImage', label: { en: 'Lifestyle Image', zh: '场景图' }, type: 'upload', relationTo: 'media', localized: true },
{
name: 'heroVideo',
label: { en: 'Hero Video', zh: '头图视频' },
type: 'group',
localized: true,
fields: [
{ name: 'src', type: 'upload', relationTo: 'videos' },
{ name: 'poster', type: 'upload', relationTo: 'media' },
{ name: 'src', label: { en: 'Video File', zh: '视频文件' }, type: 'upload', relationTo: 'videos' },
{ name: 'poster', label: { en: 'Poster', zh: '封面图' }, type: 'upload', relationTo: 'media' },
],
},
{
name: 'gallery',
label: { en: 'Gallery', zh: '相册' },
type: 'array',
localized: true,
fields: [{ name: 'image', type: 'upload', relationTo: 'media' }],
fields: [{ name: 'image', label: { en: 'Image', zh: '图片' }, type: 'upload', relationTo: 'media' }],
},
],
},
{
label: 'Content',
label: { en: 'Content', zh: '内容' },
fields: [
{
name: 'keyFeatures',
label: { en: 'Key Features', zh: '核心卖点' },
type: 'array',
localized: true,
fields: [
{ name: 'icon', type: 'upload', relationTo: 'media' },
{ name: 'image', type: 'upload', relationTo: 'media' },
{ name: 'title', type: 'text', localized: true, required: true },
{ name: 'description', type: 'richText', localized: true },
{ name: 'icon', label: { en: 'Icon', zh: '图标' }, type: 'upload', relationTo: 'media' },
{ name: 'image', label: { en: 'Image', zh: '配图' }, type: 'upload', relationTo: 'media' },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true, required: true },
{ name: 'description', label: { en: 'Description', zh: '说明' }, type: 'richText', localized: true },
],
},
{ name: 'technologyHighlights', type: 'richText', localized: true },
{ name: 'technologyHighlights', label: { en: 'Technology Highlights', zh: '技术亮点' }, type: 'richText', localized: true },
{
name: 'specifications',
label: { en: 'Specifications', zh: '规格参数' },
type: 'array',
localized: true,
fields: [
{ name: 'groupName', type: 'text', localized: true, required: true },
{ name: 'order', type: 'number', defaultValue: 0 },
{ name: 'groupName', label: { en: 'Group Name', zh: '分组名称' }, type: 'text', localized: true, required: true },
{ name: 'order', label: { en: 'Order', zh: '排序' }, type: 'number', defaultValue: 0 },
{
name: 'items',
label: { en: 'Items', zh: '参数项' },
type: 'array',
fields: [
{ name: 'label', type: 'text', localized: true, required: true },
{ name: 'value', type: 'text', localized: true, required: true },
{ name: 'note', type: 'text', localized: true },
{ name: 'label', label: { en: 'Label', zh: '名称' }, type: 'text', localized: true, required: true },
{ name: 'value', label: { en: 'Value', zh: '值' }, type: 'text', localized: true, required: true },
{ name: 'note', label: { en: 'Note', zh: '备注' }, type: 'text', localized: true },
],
},
],
@@ -187,40 +203,43 @@ export const Products: CollectionConfig = {
],
},
{
label: 'Distribution',
label: { en: 'Distribution', zh: '分发设置' },
fields: [
{
name: 'firmware',
label: { en: 'Downloads on Product Page', zh: '产品页下载按钮' },
type: 'group',
localized: true,
fields: [{ name: 'showOnProductPage', type: 'checkbox', defaultValue: false }],
fields: [{ name: 'showOnProductPage', label: { en: 'Show Download Button', zh: '显示下载按钮' }, type: 'checkbox', defaultValue: false }],
},
{ name: 'relatedProducts', type: 'relationship', relationTo: 'products', hasMany: true, localized: true },
{ name: 'accessories', type: 'relationship', relationTo: 'products', hasMany: true, localized: true },
{ name: 'featuredDealers', type: 'relationship', relationTo: 'dealers', hasMany: true, localized: true },
{ name: 'relatedProducts', label: { en: 'Related Products', zh: '相关产品' }, type: 'relationship', relationTo: 'products', hasMany: true, localized: true },
{ name: 'accessories', label: { en: 'Accessories', zh: '配件关联' }, type: 'relationship', relationTo: 'products', hasMany: true, localized: true },
{ name: 'featuredDealers', label: { en: 'Featured Dealers', zh: '推荐经销商' }, type: 'relationship', relationTo: 'dealers', hasMany: true, localized: true },
],
},
{
label: 'Awards',
label: { en: 'Awards', zh: '奖项' },
fields: [
{
name: 'awards',
label: { en: 'Awards', zh: '奖项列表' },
type: 'array',
localized: true,
fields: [
{ name: 'logo', type: 'upload', relationTo: 'media' },
{ name: 'label', type: 'text', localized: true },
{ name: 'year', type: 'number' },
{ name: 'url', type: 'text' },
{ name: 'logo', label: { en: 'Logo', zh: '标识图' }, type: 'upload', relationTo: 'media' },
{ name: 'label', label: { en: 'Label', zh: '奖项名称' }, type: 'text', localized: true },
{ name: 'year', label: { en: 'Year', zh: '年份' }, type: 'number' },
{ name: 'url', label: { en: 'URL', zh: '链接' }, type: 'text' },
],
},
],
},
{
label: 'SEO',
label: { en: 'SEO', zh: 'SEO' },
fields: [
{
name: 'seo',
label: { en: 'SEO', zh: 'SEO 设置' },
type: 'group',
fields: seoFields,
},
+27 -21
View File
@@ -12,71 +12,77 @@ export const AboutPage: GlobalConfig = {
fields: [
{
name: 'intro',
label: { en: 'Intro', zh: '首屏' },
type: 'group',
fields: [
{ name: 'eyebrow', type: 'text', localized: true },
{ name: 'title', type: 'text', localized: true },
{ name: 'body', type: 'richText', localized: true },
{ name: 'heroImage', type: 'upload', relationTo: 'media', localized: true },
{ name: 'eyebrow', label: { en: 'Eyebrow', zh: '眉题' }, type: 'text', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true },
{ name: 'body', label: { en: 'Body', zh: '正文' }, type: 'richText', localized: true },
{ name: 'heroImage', label: { en: 'Hero Image', zh: '首屏大图' }, type: 'upload', relationTo: 'media', localized: true },
],
},
{ name: 'brandStory', type: 'richText', localized: true },
{ name: 'philosophy', type: 'richText', localized: true },
{ name: 'brandStory', label: { en: 'Brand Story', zh: '品牌故事' }, type: 'richText', localized: true },
{ name: 'philosophy', label: { en: 'Philosophy', zh: '品牌理念' }, type: 'richText', localized: true },
{
name: 'editorialFocus',
label: { en: 'Editorial Focus', zh: '编辑导语' },
type: 'group',
fields: [
{ name: 'eyebrow', type: 'text', localized: true },
{ name: 'body', type: 'textarea', localized: true },
{ name: 'eyebrow', label: { en: 'Eyebrow', zh: '眉题' }, type: 'text', localized: true },
{ name: 'body', label: { en: 'Body', zh: '文案' }, type: 'textarea', localized: true },
],
},
{
name: 'storyMoments',
label: { en: 'Story Moments', zh: '内容段落' },
type: 'array',
admin: {
description: 'Editorial image-and-copy moments shown after the main brand and philosophy sections.',
},
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'body', type: 'textarea', localized: true },
{ name: 'image', type: 'upload', relationTo: 'media', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true },
{ name: 'body', label: { en: 'Body', zh: '文案' }, type: 'textarea', localized: true },
{ name: 'image', label: { en: 'Image', zh: '配图' }, type: 'upload', relationTo: 'media', localized: true },
],
},
{
name: 'capabilityPillars',
label: { en: 'Capability Pillars', zh: '能力支柱' },
type: 'array',
admin: {
description: 'Three core capability pillars shown in the technical direction section.',
},
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'body', type: 'textarea', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true },
{ name: 'body', label: { en: 'Body', zh: '文案' }, type: 'textarea', localized: true },
],
},
{
name: 'awardHighlights',
label: { en: 'Award Highlights', zh: '奖项高光' },
type: 'array',
admin: {
description: 'Awards and recognition shown in the About page credibility section.',
},
fields: [
{ name: 'label', type: 'text', localized: true },
{ name: 'year', type: 'number' },
{ name: 'url', type: 'text', localized: true },
{ name: 'logo', type: 'upload', relationTo: 'media', localized: true },
{ name: 'label', label: { en: 'Label', zh: '奖项名称' }, type: 'text', localized: true },
{ name: 'year', label: { en: 'Year', zh: '年份' }, type: 'number' },
{ name: 'url', label: { en: 'URL', zh: '链接' }, type: 'text', localized: true },
{ name: 'logo', label: { en: 'Logo', zh: '标识图' }, type: 'upload', relationTo: 'media', localized: true },
],
},
{
name: 'mediaQuotes',
label: { en: 'Media Quotes', zh: '媒体引述' },
type: 'array',
admin: {
description: 'Selected media quotes and source logos shown near the bottom of the About page.',
},
fields: [
{ name: 'sourceName', type: 'text', localized: true },
{ name: 'quote', type: 'textarea', localized: true },
{ name: 'url', type: 'text', localized: true },
{ name: 'sourceLogo', type: 'upload', relationTo: 'media', localized: true },
{ name: 'sourceName', label: { en: 'Source Name', zh: '媒体名称' }, type: 'text', localized: true },
{ name: 'quote', label: { en: 'Quote', zh: '引用内容' }, type: 'textarea', localized: true },
{ name: 'url', label: { en: 'URL', zh: '链接' }, type: 'text', localized: true },
{ name: 'sourceLogo', label: { en: 'Source Logo', zh: '媒体 Logo' }, type: 'upload', relationTo: 'media', localized: true },
],
},
],
+15 -11
View File
@@ -12,38 +12,42 @@ export const ContactPage: GlobalConfig = {
fields: [
{
name: 'intro',
label: { en: 'Intro', zh: '首屏' },
type: 'group',
fields: [
{ name: 'eyebrow', type: 'text', localized: true },
{ name: 'title', type: 'text', localized: true },
{ name: 'body', type: 'richText', localized: true },
{ name: 'heroImage', type: 'upload', relationTo: 'media', localized: true },
{ name: 'eyebrow', label: { en: 'Eyebrow', zh: '眉题' }, type: 'text', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true },
{ name: 'body', label: { en: 'Body', zh: '正文' }, type: 'richText', localized: true },
{ name: 'heroImage', label: { en: 'Hero Image', zh: '顶部大图' }, type: 'upload', relationTo: 'media', localized: true },
],
},
{
name: 'submissionGuidance',
label: { en: 'Submission Guidance', zh: '提交说明' },
type: 'group',
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'description', type: 'textarea', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true },
{ name: 'description', label: { en: 'Description', zh: '说明文案' }, type: 'textarea', localized: true },
{
name: 'items',
label: { en: 'Items', zh: '提示项' },
type: 'array',
localized: true,
fields: [{ name: 'text', type: 'text', localized: true }],
fields: [{ name: 'text', label: { en: 'Text', zh: '文案' }, type: 'text', localized: true }],
},
{
name: 'quickLinks',
label: { en: 'Quick Links', zh: '快捷链接' },
type: 'array',
localized: true,
fields: [
{ name: 'label', type: 'text', localized: true },
{ name: 'href', type: 'text', localized: true },
{ name: 'label', label: { en: 'Label', zh: '名称' }, type: 'text', localized: true },
{ name: 'href', label: { en: 'Link', zh: '链接' }, type: 'text', localized: true },
],
},
],
},
{ name: 'formDisabledMessage', type: 'textarea', localized: true },
{ name: 'formEnabled', type: 'checkbox', defaultValue: true },
{ name: 'formDisabledMessage', label: { en: 'Form Disabled Message', zh: '表单关闭提示' }, type: 'textarea', localized: true },
{ name: 'formEnabled', label: { en: 'Form Enabled', zh: '启用表单' }, type: 'checkbox', defaultValue: true },
],
}
+39 -28
View File
@@ -12,101 +12,112 @@ export const GlobalSettings: GlobalConfig = {
fields: [
{
name: 'site',
label: { en: 'Site', zh: '站点信息' },
type: 'group',
fields: [
{ name: 'name', type: 'text', localized: true },
{ name: 'tagline', type: 'text', localized: true },
{ name: 'logoLight', type: 'upload', relationTo: 'media' },
{ name: 'logoDark', type: 'upload', relationTo: 'media' },
{ name: 'favicon', type: 'upload', relationTo: 'media' },
{ name: 'name', label: { en: 'Site Name', zh: '站点名称' }, type: 'text', localized: true },
{ name: 'tagline', label: { en: 'Tagline', zh: '站点标语' }, type: 'text', localized: true },
{ name: 'logoLight', label: { en: 'Light Logo', zh: '浅底 Logo' }, type: 'upload', relationTo: 'media' },
{ name: 'logoDark', label: { en: 'Dark Logo', zh: '深底 Logo' }, type: 'upload', relationTo: 'media' },
{ name: 'favicon', label: { en: 'Favicon', zh: '站点图标' }, type: 'upload', relationTo: 'media' },
],
},
{
name: 'navigation',
label: { en: 'Navigation', zh: '导航' },
type: 'group',
fields: [
{
name: 'primary',
label: { en: 'Primary Navigation', zh: '主导航' },
type: 'array',
localized: true,
fields: [
{ name: 'label', type: 'text', localized: true, required: true },
{ name: 'href', type: 'text', localized: true, required: true },
{ name: 'external', type: 'checkbox', defaultValue: false },
{ name: 'openInNewTab', type: 'checkbox', defaultValue: false },
{ name: 'iconKey', type: 'text' },
{ name: 'label', label: { en: 'Label', zh: '名称' }, type: 'text', localized: true, required: true },
{ name: 'href', label: { en: 'Link', zh: '链接' }, type: 'text', localized: true, required: true },
{ name: 'external', label: { en: 'External Link', zh: '外部链接' }, type: 'checkbox', defaultValue: false },
{ name: 'openInNewTab', label: { en: 'Open in New Tab', zh: '新窗口打开' }, type: 'checkbox', defaultValue: false },
{ name: 'iconKey', label: { en: 'Icon Key', zh: '图标键名' }, type: 'text' },
],
},
{
name: 'app',
label: { en: 'App Button', zh: 'APP 按钮' },
type: 'group',
fields: [
{ name: 'label', type: 'text', localized: true, defaultValue: 'APP' },
{ name: 'label', label: { en: 'Label', zh: '按钮文字' }, type: 'text', localized: true, defaultValue: 'APP' },
{
name: 'href',
label: { en: 'Link', zh: '链接' },
type: 'text',
localized: true,
defaultValue: 'https://www.eversolo.com/controlapp/index.html',
required: true,
},
{ name: 'openInNewTab', type: 'checkbox', defaultValue: true },
{ name: 'showOnDesktop', type: 'checkbox', defaultValue: true },
{ name: 'showOnMobile', type: 'checkbox', defaultValue: true },
{ name: 'openInNewTab', label: { en: 'Open in New Tab', zh: '新窗口打开' }, type: 'checkbox', defaultValue: true },
{ name: 'showOnDesktop', label: { en: 'Show on Desktop', zh: '桌面端显示' }, type: 'checkbox', defaultValue: true },
{ name: 'showOnMobile', label: { en: 'Show on Mobile', zh: '移动端显示' }, type: 'checkbox', defaultValue: true },
],
},
],
},
{
name: 'footer',
label: { en: 'Footer', zh: '页脚' },
type: 'group',
fields: [
{
name: 'columns',
label: { en: 'Footer Columns', zh: '页脚栏目' },
type: 'array',
localized: true,
fields: [
{ name: 'title', type: 'text', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true },
{
name: 'items',
label: { en: 'Items', zh: '链接项' },
type: 'array',
localized: true,
fields: [
{ name: 'label', type: 'text', localized: true, required: true },
{ name: 'href', type: 'text', localized: true, required: true },
{ name: 'external', type: 'checkbox', defaultValue: false },
{ name: 'openInNewTab', type: 'checkbox', defaultValue: false },
{ name: 'label', label: { en: 'Label', zh: '名称' }, type: 'text', localized: true, required: true },
{ name: 'href', label: { en: 'Link', zh: '链接' }, type: 'text', localized: true, required: true },
{ name: 'external', label: { en: 'External Link', zh: '外部链接' }, type: 'checkbox', defaultValue: false },
{ name: 'openInNewTab', label: { en: 'Open in New Tab', zh: '新窗口打开' }, type: 'checkbox', defaultValue: false },
],
},
],
},
{
name: 'legalLinks',
label: { en: 'Legal Links', zh: '法律链接' },
type: 'array',
localized: true,
fields: [
{ name: 'label', type: 'text', localized: true, required: true },
{ name: 'href', type: 'text', localized: true, required: true },
{ name: 'label', label: { en: 'Label', zh: '名称' }, type: 'text', localized: true, required: true },
{ name: 'href', label: { en: 'Link', zh: '链接' }, type: 'text', localized: true, required: true },
],
},
{ name: 'copyright', type: 'text', localized: true },
{ name: 'copyright', label: { en: 'Copyright', zh: '版权文案' }, type: 'text', localized: true },
],
},
{
name: 'social',
label: { en: 'Social Links', zh: '社交链接' },
type: 'array',
fields: [
{ name: 'platform', type: 'text', required: true },
{ name: 'url', type: 'text', required: true },
{ name: 'iconKey', type: 'text' },
{ name: 'platform', label: { en: 'Platform', zh: '平台' }, type: 'text', required: true },
{ name: 'url', label: { en: 'URL', zh: '链接' }, type: 'text', required: true },
{ name: 'iconKey', label: { en: 'Icon Key', zh: '图标键名' }, type: 'text' },
],
},
{
name: 'seoDefaults',
label: { en: 'SEO Defaults', zh: 'SEO 默认值' },
type: 'group',
fields: [
{ name: 'titleSuffix', type: 'text', localized: true },
{ name: 'description', type: 'textarea', localized: true },
{ name: 'ogImage', type: 'upload', relationTo: 'media' },
{ name: 'titleSuffix', label: { en: 'Title Suffix', zh: '标题后缀' }, type: 'text', localized: true },
{ name: 'description', label: { en: 'Description', zh: '描述' }, type: 'textarea', localized: true },
{ name: 'ogImage', label: { en: 'OG Image', zh: '分享图' }, type: 'upload', relationTo: 'media' },
],
},
],
+31 -21
View File
@@ -1,11 +1,11 @@
import type { Field, GlobalConfig } from 'payload'
const seoFields: Field[] = [
{ name: 'title', type: 'text' as const, localized: true },
{ name: 'description', type: 'textarea' as const, localized: true },
{ name: 'ogImage', type: 'upload' as const, relationTo: 'media' as const },
{ name: 'canonical', type: 'text' as const },
{ name: 'noIndex', type: 'checkbox' as const, defaultValue: false },
{ name: 'title', label: { en: 'SEO Title', zh: 'SEO 标题' }, type: 'text' as const, localized: true },
{ name: 'description', label: { en: 'SEO Description', zh: 'SEO 描述' }, type: 'textarea' as const, localized: true },
{ name: 'ogImage', label: { en: 'OG Image', zh: '分享图' }, type: 'upload' as const, relationTo: 'media' as const },
{ name: 'canonical', label: { en: 'Canonical URL', zh: '规范链接' }, type: 'text' as const },
{ name: 'noIndex', label: { en: 'No Index', zh: '禁止索引' }, type: 'checkbox' as const, defaultValue: false },
]
export const Homepage: GlobalConfig = {
@@ -20,40 +20,48 @@ export const Homepage: GlobalConfig = {
fields: [
{
name: 'hero',
label: { en: 'Hero', zh: '首屏' },
type: 'group',
fields: [
{
name: 'mode',
label: { en: 'Mode', zh: '展示模式' },
type: 'select',
defaultValue: 'image',
options: ['image', 'video'],
options: [
{ label: 'Image / 图片', value: 'image' },
{ label: 'Video / 视频', value: 'video' },
],
required: true,
},
{ name: 'image', type: 'upload', relationTo: 'media', localized: true },
{ name: 'video', type: 'upload', relationTo: 'videos', localized: true },
{ name: 'eyebrow', type: 'text', localized: true },
{ name: 'headline', type: 'text', localized: true, required: true },
{ name: 'supportingLine', type: 'text', localized: true },
{ name: 'image', label: { en: 'Image', zh: '图片' }, type: 'upload', relationTo: 'media', localized: true },
{ name: 'video', label: { en: 'Video', zh: '视频' }, type: 'upload', relationTo: 'videos', localized: true },
{ name: 'eyebrow', label: { en: 'Eyebrow', zh: '眉题' }, type: 'text', localized: true },
{ name: 'headline', label: { en: 'Headline', zh: '主标题' }, type: 'text', localized: true, required: true },
{ name: 'supportingLine', label: { en: 'Supporting Line', zh: '辅助文案' }, type: 'text', localized: true },
{
name: 'primaryCta',
label: { en: 'Primary CTA', zh: '主按钮' },
type: 'group',
fields: [
{ name: 'label', type: 'text', localized: true },
{ name: 'href', type: 'text', localized: true },
{ name: 'label', label: { en: 'Label', zh: '按钮文字' }, type: 'text', localized: true },
{ name: 'href', label: { en: 'Link', zh: '链接' }, type: 'text', localized: true },
],
},
{
name: 'secondaryCta',
label: { en: 'Secondary CTA', zh: '次按钮' },
type: 'group',
fields: [
{ name: 'label', type: 'text', localized: true },
{ name: 'href', type: 'text', localized: true },
{ name: 'label', label: { en: 'Label', zh: '按钮文字' }, type: 'text', localized: true },
{ name: 'href', label: { en: 'Link', zh: '链接' }, type: 'text', localized: true },
],
},
],
},
{
name: 'featuredProducts',
label: { en: 'Featured Products', zh: '精选产品' },
type: 'relationship',
relationTo: 'products',
hasMany: true,
@@ -63,18 +71,20 @@ export const Homepage: GlobalConfig = {
},
{
name: 'statement',
label: { en: 'Statement', zh: '品牌主张' },
type: 'group',
fields: [
{ name: 'eyebrow', type: 'text', localized: true },
{ name: 'title', type: 'text', localized: true },
{ name: 'body', type: 'richText', localized: true },
{ name: 'image', type: 'upload', relationTo: 'media', localized: true },
{ name: 'eyebrow', label: { en: 'Eyebrow', zh: '眉题' }, type: 'text', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true },
{ name: 'body', label: { en: 'Body', zh: '正文' }, type: 'richText', localized: true },
{ name: 'image', label: { en: 'Image', zh: '图片' }, type: 'upload', relationTo: 'media', localized: true },
{
name: 'cta',
label: { en: 'CTA', zh: '按钮' },
type: 'group',
fields: [
{ name: 'label', type: 'text', localized: true },
{ name: 'href', type: 'text', localized: true },
{ name: 'label', label: { en: 'Label', zh: '按钮文字' }, type: 'text', localized: true },
{ name: 'href', label: { en: 'Link', zh: '链接' }, type: 'text', localized: true },
],
},
],
+11 -9
View File
@@ -12,24 +12,26 @@ export const SupportPage: GlobalConfig = {
fields: [
{
name: 'intro',
label: { en: 'Intro', zh: '首屏' },
type: 'group',
fields: [
{ name: 'eyebrow', type: 'text', localized: true },
{ name: 'title', type: 'text', localized: true },
{ name: 'body', type: 'richText', localized: true },
{ name: 'heroImage', type: 'upload', relationTo: 'media', localized: true },
{ name: 'eyebrow', label: { en: 'Eyebrow', zh: '眉题' }, type: 'text', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true },
{ name: 'body', label: { en: 'Body', zh: '正文' }, type: 'richText', localized: true },
{ name: 'heroImage', label: { en: 'Hero Image', zh: '顶部大图' }, type: 'upload', relationTo: 'media', localized: true },
],
},
{
name: 'primaryEntries',
label: { en: 'Primary Entries', zh: '主入口卡片' },
type: 'array',
localized: true,
fields: [
{ name: 'key', type: 'text', required: true },
{ name: 'eyebrow', type: 'text', localized: true },
{ name: 'label', type: 'text', localized: true },
{ name: 'description', type: 'text', localized: true },
{ name: 'href', type: 'text', localized: true },
{ name: 'key', label: { en: 'Key', zh: '键名' }, type: 'text', required: true },
{ name: 'eyebrow', label: { en: 'Eyebrow', zh: '眉题' }, type: 'text', localized: true },
{ name: 'label', label: { en: 'Label', zh: '名称' }, type: 'text', localized: true },
{ name: 'description', label: { en: 'Description', zh: '说明' }, type: 'text', localized: true },
{ name: 'href', label: { en: 'Link', zh: '链接' }, type: 'text', localized: true },
],
},
],
+19 -14
View File
@@ -12,44 +12,49 @@ export const WarrantyPage: GlobalConfig = {
fields: [
{
name: 'intro',
label: { en: 'Intro', zh: '首屏' },
type: 'group',
fields: [
{ name: 'eyebrow', type: 'text', localized: true },
{ name: 'title', type: 'text', localized: true },
{ name: 'body', type: 'richText', localized: true },
{ name: 'heroImage', type: 'upload', relationTo: 'media', localized: true },
{ name: 'eyebrow', label: { en: 'Eyebrow', zh: '眉题' }, type: 'text', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true },
{ name: 'body', label: { en: 'Body', zh: '正文' }, type: 'richText', localized: true },
{ name: 'heroImage', label: { en: 'Hero Image', zh: '顶部大图' }, type: 'upload', relationTo: 'media', localized: true },
],
},
{
name: 'policyHeader',
label: { en: 'Policy Header', zh: '保修说明头部' },
type: 'group',
fields: [
{ name: 'eyebrow', type: 'text', localized: true },
{ name: 'title', type: 'text', localized: true },
{ name: 'description', type: 'textarea', localized: true },
{ name: 'eyebrow', label: { en: 'Eyebrow', zh: '眉题' }, type: 'text', localized: true },
{ name: 'title', label: { en: 'Title', zh: '标题' }, type: 'text', localized: true },
{ name: 'description', label: { en: 'Description', zh: '说明文案' }, type: 'textarea', localized: true },
],
},
{ name: 'policyBody', type: 'richText', localized: true },
{ name: 'policyBody', label: { en: 'Policy Body', zh: '保修正文' }, type: 'richText', localized: true },
{
name: 'servicePanel',
label: { en: 'Service Panel', zh: '服务面板' },
type: 'group',
fields: [
{ name: 'checklistTitle', type: 'text', localized: true },
{ name: 'description', type: 'textarea', localized: true },
{ name: 'checklistTitle', label: { en: 'Checklist Title', zh: '清单标题' }, type: 'text', localized: true },
{ name: 'description', label: { en: 'Description', zh: '说明文案' }, type: 'textarea', localized: true },
{
name: 'checklistItems',
label: { en: 'Checklist Items', zh: '清单项' },
type: 'array',
localized: true,
fields: [{ name: 'text', type: 'text', localized: true }],
fields: [{ name: 'text', label: { en: 'Text', zh: '文案' }, type: 'text', localized: true }],
},
{ name: 'linksTitle', type: 'text', localized: true },
{ name: 'linksTitle', label: { en: 'Links Title', zh: '链接标题' }, type: 'text', localized: true },
{
name: 'quickLinks',
label: { en: 'Quick Links', zh: '快捷链接' },
type: 'array',
localized: true,
fields: [
{ name: 'label', type: 'text', localized: true },
{ name: 'href', type: 'text', localized: true },
{ name: 'label', label: { en: 'Label', zh: '名称' }, type: 'text', localized: true },
{ name: 'href', label: { en: 'Link', zh: '链接' }, type: 'text', localized: true },
],
},
],