diff --git a/src/app/admin/content/[modelCode]/[itemId]/page.tsx b/src/app/admin/content/[modelCode]/[itemId]/page.tsx index d5a38e8..f3ff7ec 100644 --- a/src/app/admin/content/[modelCode]/[itemId]/page.tsx +++ b/src/app/admin/content/[modelCode]/[itemId]/page.tsx @@ -106,12 +106,12 @@ function JsonEditor({ placeholder={placeholder || '输入 JSON 数据'} rows={10} className={`w-full px-3 py-2 border rounded-lg text-sm font-mono focus:outline-none focus:ring-2 focus:ring-border-dark focus:border-transparent resize-y ${ - error || parseError ? 'border-red-300 bg-red-50' : 'border-border-secondary' + error || parseError ? 'border-error bg-error-bg' : 'border-border-secondary' }`} spellCheck={false} /> - {parseError &&

{parseError}

} - {error && !parseError &&

{error}

} + {parseError &&

{parseError}

} + {error && !parseError &&

{error}

} ); } @@ -119,7 +119,7 @@ function JsonEditor({ function FieldError({ error }: { error?: string }) { if (!error) return null; return ( -

+

{error}

@@ -422,7 +422,7 @@ export default function ContentEditorPage() {
{field.description && (

{field.description}

@@ -435,7 +435,7 @@ export default function ContentEditorPage() { onBlur={() => handleFieldBlur(field.name)} placeholder={field.placeholder} className={`w-full px-3 py-2 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-border-dark focus:border-transparent ${ - error ? 'border-red-300 bg-red-50' : 'border-border-secondary' + error ? 'border-error bg-error-bg' : 'border-border-secondary' }`} /> @@ -447,7 +447,7 @@ export default function ContentEditorPage() {
{field.description && (

{field.description}

@@ -460,7 +460,7 @@ export default function ContentEditorPage() { placeholder={field.placeholder} rows={4} className={`w-full px-3 py-2 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-border-dark focus:border-transparent resize-y ${ - error ? 'border-red-300 bg-red-50' : 'border-border-secondary' + error ? 'border-error bg-error-bg' : 'border-border-secondary' }`} /> @@ -472,7 +472,7 @@ export default function ContentEditorPage() {
handleFieldChange(field.name, parseFloat(e.target.value) || 0)} className={`w-full px-3 py-2 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-border-dark focus:border-transparent ${ - error ? 'border-red-300 bg-red-50' : 'border-border-secondary' + error ? 'border-error bg-error-bg' : 'border-border-secondary' }`} /> @@ -532,7 +532,7 @@ export default function ContentEditorPage() {
{field.description && (

{field.description}

@@ -636,13 +636,13 @@ export default function ContentEditorPage() { {!isNew && (
{autoSaveStatus === 'saving' && ( - + 保存中... )} {autoSaveStatus === 'saved' && ( - + 已保存 {lastSaved && ( @@ -653,7 +653,7 @@ export default function ContentEditorPage() { )} {autoSaveStatus === 'unsaved' && ( - + 未保存 @@ -683,7 +683,7 @@ export default function ContentEditorPage() {
{error && ( -
+
{error}
)} {/* 验证错误汇总 */} {Object.keys(validationErrors).length > 0 && ( -
-
+
+
请修正以下错误
-
    +
      {Object.entries(validationErrors).map(([field, msg]) => (
    • {msg}
    • ))} @@ -732,7 +732,7 @@ export default function ContentEditorPage() { {/* 标题 */}
      @@ -784,7 +784,7 @@ export default function ContentEditorPage() { }} placeholder="URL 友好标识(留空自动生成)" className={`w-full px-3 py-2 border rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-border-dark focus:border-transparent ${ - validationErrors.slug ? 'border-red-300 bg-red-50' : 'border-border-secondary' + validationErrors.slug ? 'border-error bg-error-bg' : 'border-border-secondary' }`} /> @@ -850,7 +850,7 @@ export default function ContentEditorPage() { {Object.keys(validationErrors).length > 0 && ( -
      +
      注意:表单中存在 {Object.keys(validationErrors).length} 个错误,发布可能会失败。
      )} @@ -858,7 +858,7 @@ export default function ContentEditorPage() { 取消 确认发布 diff --git a/src/app/admin/content/[modelCode]/page.tsx b/src/app/admin/content/[modelCode]/page.tsx index 3d0e1e7..cea89ab 100644 --- a/src/app/admin/content/[modelCode]/page.tsx +++ b/src/app/admin/content/[modelCode]/page.tsx @@ -147,7 +147,7 @@ export default function ContentListPage() { {/* Error */} {error && ( -
      +
      {error}
      )} @@ -195,9 +195,9 @@ export default function ContentListPage() { @@ -218,7 +218,7 @@ export default function ContentListPage() {
      {error && ( -
      +
      {error}
      )} @@ -223,12 +223,12 @@ export default function NotificationsPage() { className={`relative flex items-start gap-4 p-4 rounded-lg border transition-colors ${ item.read ? 'bg-bg-primary border-border-light' - : NOTIFICATION_TYPE_COLORS[item.type] || 'bg-blue-50 border-blue-200' + : NOTIFICATION_TYPE_COLORS[item.type] || 'bg-info-bg border-border-secondary' }`} > {/* Unread indicator */} {!item.read && ( -
      +
      )} {/* Type icon */} @@ -278,7 +278,7 @@ export default function NotificationsPage() { {item.relatedItemId && item.relatedModelCode && ( @@ -230,7 +230,7 @@ export default function AdminDashboardPage() { {new Date(n.createdAt).toLocaleDateString('zh-CN')}

      - {!n.read &&
      } + {!n.read &&
      }
      ))}
      diff --git a/src/app/admin/roles/page.tsx b/src/app/admin/roles/page.tsx index 14dc0e7..31dd21d 100644 --- a/src/app/admin/roles/page.tsx +++ b/src/app/admin/roles/page.tsx @@ -154,7 +154,7 @@ export default function RolesPage() { {/* Alerts */} {error && ( -
      +
      {error}
      )} diff --git a/src/app/admin/users/page.tsx b/src/app/admin/users/page.tsx index 428514e..5a4b07a 100644 --- a/src/app/admin/users/page.tsx +++ b/src/app/admin/users/page.tsx @@ -45,10 +45,10 @@ const ROLE_LABELS: Record = { }; const ROLE_COLORS: Record = { - super_admin: 'bg-red-100 text-red-700', - content_admin: 'bg-blue-100 text-blue-700', - content_editor: 'bg-green-100 text-green-700', - reviewer: 'bg-amber-100 text-amber-700', + super_admin: 'bg-error-bg text-error-text', + content_admin: 'bg-info-bg text-info-text', + content_editor: 'bg-success-bg text-success-text', + reviewer: 'bg-warning-bg text-warning-text', readonly: 'bg-bg-hover text-text-secondary', }; @@ -266,7 +266,7 @@ export default function UsersPage() {
      {error && ( -
      +
      {error}
      )} @@ -344,8 +344,8 @@ export default function UsersPage() { {u.status === 1 ? '启用' : '禁用'} @@ -368,7 +368,7 @@ export default function UsersPage() {