|
|
@@ -1,28 +1,21 @@
|
|
|
-import React, { useMemo, useState } from "react";
|
|
|
import { Tab, Tabs } from "@nextui-org/react";
|
|
|
+import React, { useMemo, useState } from "react";
|
|
|
import { useTranslation } from "react-i18next";
|
|
|
-import Terminal from "./Terminal";
|
|
|
-import Planner from "./Planner";
|
|
|
-import CodeEditor from "./CodeEditor";
|
|
|
-import Browser from "./Browser";
|
|
|
-import { TabType, TabOption, AllTabs } from "../types/TabOption";
|
|
|
-import CmdLine from "../assets/cmd-line";
|
|
|
import Calendar from "../assets/calendar";
|
|
|
import Earth from "../assets/earth";
|
|
|
import Pencil from "../assets/pencil";
|
|
|
import { I18nKey } from "../i18n/declaration";
|
|
|
+import { AllTabs, TabOption, TabType } from "../types/TabOption";
|
|
|
+import Browser from "./Browser";
|
|
|
+import CodeEditor from "./CodeEditor";
|
|
|
+import Planner from "./Planner";
|
|
|
|
|
|
function Workspace() {
|
|
|
const { t } = useTranslation();
|
|
|
- const [activeTab, setActiveTab] = useState<TabType>(TabOption.TERMINAL);
|
|
|
+ const [activeTab, setActiveTab] = useState<TabType>(TabOption.CODE);
|
|
|
|
|
|
const tabData = useMemo(
|
|
|
() => ({
|
|
|
- [TabOption.TERMINAL]: {
|
|
|
- name: t(I18nKey.WORKSPACE$TERMINAL_TAB_LABEL),
|
|
|
- icon: <CmdLine />,
|
|
|
- component: <Terminal key="terminal" />,
|
|
|
- },
|
|
|
[TabOption.PLANNER]: {
|
|
|
name: t(I18nKey.WORKSPACE$PLANNER_TAB_LABEL),
|
|
|
icon: <Calendar />,
|
|
|
@@ -44,12 +37,12 @@ function Workspace() {
|
|
|
|
|
|
return (
|
|
|
<>
|
|
|
- <div className="w-full p-4 text-2xl font-bold select-none">
|
|
|
- {t(I18nKey.WORKSPACE$TITLE)}
|
|
|
- </div>
|
|
|
- <div role="tablist" className="tabs tabs-bordered tabs-lg ">
|
|
|
+ <div
|
|
|
+ role="tablist"
|
|
|
+ className="tabs tabs-bordered tabs-lg border-b border-border"
|
|
|
+ >
|
|
|
<Tabs
|
|
|
- variant="underlined"
|
|
|
+ variant="light"
|
|
|
size="lg"
|
|
|
onSelectionChange={(v) => {
|
|
|
setActiveTab(v as TabType);
|