diff --git a/frontend/messages/en.json b/frontend/messages/en.json index 2d30859..a793460 100644 --- a/frontend/messages/en.json +++ b/frontend/messages/en.json @@ -1,7 +1,8 @@ { "Index": { "get_started": "Get Started", - "oss_tcmt": "Open Source Test Case Management Tool", + "oss_tcmt": "Open Source Test Case Management", + "web_application": "Web Application", "integrate_and_manage": "Integrate and manage all your software testing.", "oss_title": "Open Source", "oss_detail": "TestPlat is free and open source. The application can be self-hosted. It can be deployed in environments with strict security requirements.", @@ -12,9 +13,13 @@ "universal_title": "Universal", "universal_detail": "Multi language support and dark theme allow anyone to use the system without any inconvenience.", "organize_test_cases": "Organize test cases and manage tests graphically", + "case_edit": "Test Cases", + "case_home": "Dashboard", + "case_run": "Test Runs", "self_host": "Self host the application", "run_as_docker": "Running TestPlat as a Docker container", - "run_by_manually": "Running TestPlat manually" + "run_by_manually": "Running TestPlat manually", + "roadmap": "Roadmap" }, "Header": { "title": "Open Source Test Case Management Tool", diff --git a/frontend/messages/ja.json b/frontend/messages/ja.json index c2fb7e5..02431dd 100644 --- a/frontend/messages/ja.json +++ b/frontend/messages/ja.json @@ -1,7 +1,8 @@ { "Index": { "get_started": "テスト管理を始める", - "oss_tcmt": "オープンソーステストケース管理ツール", + "oss_tcmt": "オープンソーステストケース管理", + "web_application": "ウェブアプリケーション", "integrate_and_manage": "ソフトウェア開発にかかわるすべてのテストを統合管理", "oss_title": "オープンソース", "oss_detail": "TestPlatは無料でオープンソースです。アプリケーションをセルフホストすることができます。セキュリティ要件の厳しい環境でも導入することができます。", @@ -12,9 +13,13 @@ "universal_title": "ユニバーサル", "universal_detail": "多言語対応やダークテーマ機能により誰もが不自由なく使うことができます。", "organize_test_cases": "テストケースを整理とグラフィカルなテスト管理", + "case_edit": "テストケース", + "case_home": "ダッシュボード", + "case_run": "テスト実行", "self_host": "アプリのセルフホスト", "run_as_docker": "Docker containerによる実行", - "run_by_manually": "手動での実行" + "run_by_manually": "手動での実行", + "roadmap": "ロードマップ" }, "Header": { "title": "オープンソーステストケース管理ツール", diff --git a/frontend/public/top/caseEdit.png b/frontend/public/top/caseEdit.png new file mode 100644 index 0000000..c981bd4 Binary files /dev/null and b/frontend/public/top/caseEdit.png differ diff --git a/frontend/public/top/caseHome.png b/frontend/public/top/caseHome.png new file mode 100644 index 0000000..a4dfb54 Binary files /dev/null and b/frontend/public/top/caseHome.png differ diff --git a/frontend/public/top/caseRun.png b/frontend/public/top/caseRun.png new file mode 100644 index 0000000..65714fd Binary files /dev/null and b/frontend/public/top/caseRun.png differ diff --git a/frontend/src/app/[locale]/PaneDemoImages.tsx b/frontend/src/app/[locale]/PaneDemoImages.tsx new file mode 100644 index 0000000..3ed5190 --- /dev/null +++ b/frontend/src/app/[locale]/PaneDemoImages.tsx @@ -0,0 +1,81 @@ +"use client"; +import { title } from "@/components/primitives"; +import { useState, useEffect } from "react"; +import { Tabs, Tab, Image } from "@nextui-org/react"; + +type PaneDemoImagesMessages = { + title: string; + caseEdit: string; + caseHome: string; + caseRun: string; +}; +type Props = { + messages: PaneDemoImagesMessages; +}; + +export default function DemoImages({ messages }: Props) { + const [currentTab, setcurrentTab] = useState("edit"); + const [currentImage, setcurrentImage] = useState({ + src: "/top/caseEdit.png", + alt: messages.caseEdit, + }); + const tabs = [ + { + key: "edit", + title: messages.caseEdit, + src: "/top/caseEdit.png", + alt: messages.caseEdit, + }, + { + key: "home", + title: messages.caseHome, + src: "/top/caseHome.png", + alt: messages.caseHome, + }, + { + key: "run", + title: messages.caseRun, + src: "/top/caseRun.png", + alt: messages.caseRun, + }, + ]; + + useEffect(() => { + const found = tabs.find((tab) => tab.key === currentTab); + const newImage = { src: found.src, alt: found.title }; + setcurrentImage(newImage); + }, [currentTab]); + + return ( + <> +
+
+

{messages.title}

+
+ + {tabs.map((tab) => ( + + ))} + +
+ +
+ {currentImage.alt} +
+
+ + ); +} diff --git a/frontend/src/app/[locale]/MainFeatures.tsx b/frontend/src/app/[locale]/PaneMainFeatures.tsx similarity index 52% rename from frontend/src/app/[locale]/MainFeatures.tsx rename to frontend/src/app/[locale]/PaneMainFeatures.tsx index ef012b6..a489f3d 100644 --- a/frontend/src/app/[locale]/MainFeatures.tsx +++ b/frontend/src/app/[locale]/PaneMainFeatures.tsx @@ -31,31 +31,28 @@ export default function MainTitle() { return ( <> - {features.map((feature, index) => ( - - -
- -
-
-

{feature.title}

-
-
- -

{feature.detail}

-
-
- ))} +
+ {features.map((feature) => ( + + +
+ +
+
+

{feature.title}

+
+
+ +

{feature.detail}

+
+
+ ))} +
); } diff --git a/frontend/src/app/[locale]/MainTitle.tsx b/frontend/src/app/[locale]/PaneMainTitle.tsx similarity index 97% rename from frontend/src/app/[locale]/MainTitle.tsx rename to frontend/src/app/[locale]/PaneMainTitle.tsx index 6e0f122..ddabdfd 100644 --- a/frontend/src/app/[locale]/MainTitle.tsx +++ b/frontend/src/app/[locale]/PaneMainTitle.tsx @@ -29,6 +29,8 @@ export default function MainTitle({ locale }: Props) { })} > {t("oss_tcmt")} +
+ {t("web_application")}

{t("integrate_and_manage")} diff --git a/frontend/src/app/[locale]/SelfHostProcedure.tsx b/frontend/src/app/[locale]/PaneSelfHostProcedure.tsx similarity index 100% rename from frontend/src/app/[locale]/SelfHostProcedure.tsx rename to frontend/src/app/[locale]/PaneSelfHostProcedure.tsx diff --git a/frontend/src/app/[locale]/hero.png b/frontend/src/app/[locale]/hero.png deleted file mode 100644 index 11f5b0f..0000000 Binary files a/frontend/src/app/[locale]/hero.png and /dev/null differ diff --git a/frontend/src/app/[locale]/page.tsx b/frontend/src/app/[locale]/page.tsx index 97cfd51..70c27b3 100644 --- a/frontend/src/app/[locale]/page.tsx +++ b/frontend/src/app/[locale]/page.tsx @@ -1,20 +1,26 @@ import { useTranslations } from "next-intl"; import { title, subtitle } from "@/components/primitives"; import { Divider } from "@nextui-org/react"; -import Image from "next/image"; -import heroImage from "./hero.png"; -import MainTitle from "./MainTitle"; -import MainFeatures from "./MainFeatures"; -import SelfHostProcedure from "./SelfHostProcedure"; +import PaneMainTitle from "./PaneMainTitle"; +import PaneMainFeatures from "./PaneMainFeatures"; +import PaneDemoImages from "./PaneDemoImages"; +import PaneSelfHostProcedure from "./PaneSelfHostProcedure"; export default function Home(params: { locale: string }) { const t = useTranslations("Index"); + const messages = { + title: t("organize_test_cases"), + caseEdit: t("case_edit"), + caseHome: t("case_home"), + caseRun: t("case_run"), + }; + return (
- +
@@ -51,36 +57,35 @@ export default function Home(params: { locale: string }) {
- +
- -
-
-

{t("organize_test_cases")}

-
-
- Hero -
-
+ -

{t("self_host")}

- +
+ + +
+
+

{t("roadmap")}

+
+
+
); }