Verdict Config

Tùy chỉnh nội dung & màu cho verdict

Thoát

Luồng hoạt động

Boxphim-web sẽ gọi /api/verdict/config. Trang này quản lý /api/admin/verdict/config. Khi API chưa sẵn, dữ liệu được lưu tạm vào localStorage để xem và test giao diện.

Preview JSON

Dùng để seed boxphim-api khi backend sẵn sàng

{
  "options": {
    "must-watch": {
      "key": "must-watch",
      "label": "Phải xem",
      "title": "PHẢI XEM",
      "description": "Đáng tiền rạp",
      "emoji": "🔥",
      "colors": {
        "primary": "#0f172a",
        "onPrimary": "#ffffff",
        "soft": "#0f172a",
        "softText": "#ffffff"
      }
    },
    "wait": {
      "key": "wait",
      "label": "Chờ stream",
      "title": "CHỜ STREAM",
      "description": "Xem nhà cũng ok",
      "emoji": "⏰",
      "colors": {
        "primary": "#f59e0b",
        "onPrimary": "#0f172a",
        "soft": "#fef3c7",
        "softText": "#92400e"
      }
    },
    "skip": {
      "key": "skip",
      "label": "Cân nhắc",
      "title": "CÂN NHẮC",
      "description": "Có thể bỏ qua",
      "emoji": "⚖️",
      "colors": {
        "primary": "#cbd5e1",
        "onPrimary": "#0f172a",
        "soft": "#e2e8f0",
        "softText": "#334155"
      }
    }
  },
  "version": "1.0.0",
  "updatedBy": "system"
}

Checklist tích hợp

  • 1) Backend: thêm GET /api/verdict/config trả về JSON này
  • 2) Backend: thêm PUT /api/admin/verdict/config nhận payload tương tự
  • 3) boxphim-web đặt NEXT_PUBLIC_VERDICT_CONFIG_URL nếu muốn override nguồn
  • 4) Tự test nhanh bằng dữ liệu localStorage trước khi backend sẵn