From 3c4c2183c797c5a7d64c8a0c9db77dcfc2a52d12 Mon Sep 17 00:00:00 2001 From: Kunthawat Greethong Date: Fri, 26 Jun 2026 11:41:13 +0700 Subject: [PATCH] Phase 3: Redesign homepage + natural Thai text - Add use cases section with 4 scenario cards (news, policy, business, fiction) - Rewrite Thai home section text to be natural (not translated from Chinese) - Add use case locale keys for th/en/zh - Add CSS for use cases grid with hover effects --- frontend/src/views/Home.vue | 93 +++++++++++++++++++++++++++++++++++++ locales/en.json | 11 ++++- locales/th.json | 57 +++++++++++++---------- locales/zh.json | 11 ++++- 4 files changed, 146 insertions(+), 26 deletions(-) diff --git a/frontend/src/views/Home.vue b/frontend/src/views/Home.vue index b43a649..a5f68c2 100644 --- a/frontend/src/views/Home.vue +++ b/frontend/src/views/Home.vue @@ -53,6 +53,41 @@ + +
+

{{ $t('home.useCases') }}

+
+
+
📰
+
+
{{ $t('home.useCase1Title') }}
+
{{ $t('home.useCase1Desc') }}
+
+
+
+
📋
+
+
{{ $t('home.useCase2Title') }}
+
{{ $t('home.useCase2Desc') }}
+
+
+
+
📢
+
+
{{ $t('home.useCase3Title') }}
+
{{ $t('home.useCase3Desc') }}
+
+
+
+
📖
+
+
{{ $t('home.useCase4Title') }}
+
{{ $t('home.useCase4Desc') }}
+
+
+
+
+
@@ -540,6 +575,64 @@ const startSimulation = () => { border-color: var(--orange); } +/* Use Cases Section */ +.usecases-section { + padding: 40px 60px; + background: #fff; +} + +.usecases-title { + font-size: 1.5rem; + font-weight: 700; + color: #1a1a1a; + margin-bottom: 24px; + text-align: center; +} + +.usecases-grid { + display: grid; + grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); + gap: 16px; + max-width: 1000px; + margin: 0 auto; +} + +.usecase-card { + display: flex; + align-items: flex-start; + gap: 14px; + padding: 20px; + background: #F8F9FA; + border-radius: 12px; + border: 1px solid #E5E7EB; + transition: border-color 0.2s, box-shadow 0.2s; + cursor: default; +} + +.usecase-card:hover { + border-color: #FF6B35; + box-shadow: 0 2px 12px rgba(255, 107, 53, 0.08); +} + +.usecase-icon { + font-size: 1.8rem; + line-height: 1; + flex-shrink: 0; +} + +.usecase-name { + font-weight: 600; + font-size: 0.95rem; + color: #1a1a1a; + margin-bottom: 4px; +} + +.usecase-desc { + font-size: 0.82rem; + color: #666; + line-height: 1.5; +} + /* Dashboard 双栏布局 */ .dashboard-section { display: flex; diff --git a/locales/en.json b/locales/en.json index e71005d..e3bd44e 100644 --- a/locales/en.json +++ b/locales/en.json @@ -69,7 +69,16 @@ "promptPlaceholder": "// Describe your simulation or prediction requirement in natural language", "engineBadge": "Engine: CrowdSight-V1.0", "startEngine": "Start Engine", - "initializing": "Initializing..." + "initializing": "Initializing...", + "useCases": "What you can do", + "useCase1Title": "Simulate news & events", + "useCase1Desc": "Upload news → Simulate public reactions on social media", + "useCase2Title": "Simulate policies & regulations", + "useCase2Desc": "Upload draft policy → Simulate impact on different groups", + "useCase3Title": "Simulate business & advertising", + "useCase3Desc": "Upload ad plan → Simulate spread and audience response", + "useCase4Title": "Simulate fiction & stories", + "useCase4Desc": "Upload story → Simulate character behavior and predict endings" }, "main": { "layoutGraph": "Graph", diff --git a/locales/th.json b/locales/th.json index f3b503e..758f78f 100644 --- a/locales/th.json +++ b/locales/th.json @@ -33,43 +33,52 @@ "visitGithub": "เยี่ยมชมหน้า Github ของเรา" }, "home": { - "tagline": "เครื่องมือ Swarm Intelligence ที่กระชับและใช้ได้ครอบคลุม", + "tagline": "ระบบจำลองสังคมอัจฉริยะ", "version": "/ v0.1-Preview", - "heroTitle1": "อัปโหลดรายงาน,", - "heroTitle2": "พยากรณ์อนาคต", - "heroDesc": "จากเอกสารเพียงชิ้นเดียว {brand} จะสกัดข้อมูลตั้งต้นเพื่อสร้างโลกจำลองโดยอัตโนมัติที่มี Agent ได้สูงสุดถึง {agentScale} เพิ่มตัวแปรจากมุมมองเหนือกว่าเพื่อค้นหา {optimalSolution} ในพฤติกรรมกลุ่มที่ซับซ้อน", + "heroTitle1": "อัปโหลดข้อมูล", + "heroTitle2": "จำลองอนาคต", + "heroDesc": "เพียงมีข้อมูลตั้งต้น {brand} จะวิเคราะห์และสร้างโลกจำลองที่มี Agent ได้สูงสุด {agentScale} โดยอัตโนมัติ เปลี่ยนมุมมองเพื่อค้นหา {optimalSolution} ในสถานการณ์ที่ซับซ้อน", "heroDescBrand": "CrowdSight", - "heroDescAgentScale": "ระดับล้าน Agent", - "heroDescOptimalSolution": "\"ค่าเหมาะสมเฉพาะที่\"", - "slogan": "ให้ Agent ซักซ้อมอนาคต ให้การตัดสินใจเป็นผู้ชนะ", + "heroDescAgentScale": "นับล้านตัว", + "heroDescOptimalSolution": "คำตอบที่ดีที่สุด", + "slogan": "จำลองก่อนตัดสินใจ เห็นผลก่อนลงมือ", "systemStatus": "สถานะระบบ", "systemReady": "พร้อม", - "systemReadyDesc": "เครื่องมือพยากรณ์อยู่ในโหมดสแตนด์บาย อัปโหลดข้อมูลที่ไม่มีโครงสร้างเพื่อเริ่มลำดับการจำลอง", + "systemReadyDesc": "พร้อมทำงาน อัปโหลดข้อมูลเพื่อเริ่มจำลอง", "metricLowCost": "ต้นทุนต่ำ", - "metricLowCostDesc": "เฉลี่ย $5/การจำลอง", - "metricHighAvail": "ปรับขนาดได้", - "metricHighAvailDesc": "Agent นับล้าน", + "metricLowCostDesc": "เฉลี่ย $5 ต่อการจำลอง", + "metricHighAvail": "ขยายได้", + "metricHighAvailDesc": "รองรับ Agent นับล้าน", "workflowSequence": "ขั้นตอนการทำงาน", - "step01Title": "สร้างกราฟ", - "step01Desc": "สกัดข้อมูลตั้งต้น & เพิ่มความจำ & สร้าง GraphRAG", - "step02Title": "ตั้งค่าสภาพแวดล้อม", - "step02Desc": "ดึงตัวละคร & สร้างบุคลิกภาพ & ฉีดค่าตั้ง Agent", - "step03Title": "การจำลอง", - "step03Desc": "จำลองคู่ขนานสองแพลตฟอร์ม & วิเคราะห์ความต้องการอัตโนมัติ & ความจำเชิงเวลา", - "step04Title": "รายงาน", - "step04Desc": "Report Agent โต้ตอบกับสภาพแวดล้อมหลังการจำลองผ่านเครื่องมือครบครัน", - "step05Title": "การโต้ตอบ", - "step05Desc": "สนทนากับบุคคลที่จำลอง & พูดคุยกับ Report Agent", + "step01Title": "สร้างแผนภูมิ", + "step01Desc": "ดึงข้อมูลสำคัญจากเอกสาร → สร้างแผนภูมิความรู้", + "step02Title": "สร้างตัวละคร", + "step02Desc": "สร้างบุคลิกภาพ Agent จากข้อมูลที่ดึงมา", + "step03Title": "เริ่มจำลอง", + "step03Desc": "จำลองบน 2 แพลตฟอร์มพร้อมกัน อัปเดตความจำแบบเรียลไทม์", + "step04Title": "สร้างรายงาน", + "step04Desc": "Report Agent วิเคราะห์ผลลัพธ์และสร้างรายงานพยากรณ์", + "step05Title": "โต้ตอบ", + "step05Desc": "สนทนากับตัวละครแต่ละตัว หรือถาม Report Agent", "realitySeed": "01 / ข้อมูลตั้งต้น", "supportedFormats": "รูปแบบ: PDF, MD, TXT", "dragToUpload": "ลากไฟล์เพื่ออัปโหลด", "orBrowse": "หรือคลิกเพื่อเลือกไฟล์", "inputParams": "พารามิเตอร์นำเข้า", "simulationPrompt": ">_ 02 / คำสั่งจำลอง", - "promptPlaceholder": "// อธิบายความต้องการในการจำลองหรือพยากรณ์ของคุณเป็นภาษาธรรมชาติ", + "promptPlaceholder": "// เช่น \"จำลองปฏิกิริยาของประชาชนหลังจากประกาศนโยบายใหม่บนโซเชียลมีเดีย\"", "engineBadge": "Engine: CrowdSight-V1.0", - "startEngine": "เริ่ม Engine", - "initializing": "กำลังเริ่มต้น..." + "startEngine": "เริ่มจำลอง", + "initializing": "กำลังเริ่มต้น...", + "useCases": "สิ่งที่ทำได้", + "useCase1Title": "จำลองข่าวและเหตุการณ์", + "useCase1Desc": "อัปโหลดข่าว → จำลองปฏิกิริยาของประชาชนบนโซเชียลมีเดีย", + "useCase2Title": "จำลองนโยบายและกฎระเบียบ", + "useCase2Desc": "อัปโหลดร่างนโยบาย → จำลองผลกระทบต่อกลุ่มต่างๆ", + "useCase3Title": "จำลองธุรกิจและโฆษณา", + "useCase3Desc": "อัปโหลดแผนโฆษณา → จำลองการแพร่กระจายและผลตอบรับ", + "useCase4Title": "จำลองนิยายและเรื่องเล่า", + "useCase4Desc": "อัปโหลดเนื้อเรื่อง → จำลองพฤติกรรมตัวละครและทำนายตอนจบ" }, "main": { "layoutGraph": "กราฟ", diff --git a/locales/zh.json b/locales/zh.json index 8c2206a..0c9d63e 100644 --- a/locales/zh.json +++ b/locales/zh.json @@ -69,7 +69,16 @@ "promptPlaceholder": "// 用自然语言输入模拟或预测需求(例.武大若发布撤销肖某处分的公告,会引发什么舆情走向)", "engineBadge": "引擎: CrowdSight-V1.0", "startEngine": "启动引擎", - "initializing": "初始化中..." + "initializing": "初始化中...", + "useCases": "可以做什么", + "useCase1Title": "模拟新闻与事件", + "useCase1Desc": "上传新闻 → 模拟公众在社交媒体上的反应", + "useCase2Title": "模拟政策与法规", + "useCase2Desc": "上传政策草案 → 模拟对不同群体的影响", + "useCase3Title": "模拟商业与广告", + "useCase3Desc": "上传广告计划 → 模拟传播和受众反馈", + "useCase4Title": "模拟小说与故事", + "useCase4Desc": "上传故事 → 模拟角色行为并预测结局" }, "main": { "layoutGraph": "图谱",