Jelajahi Sumber

Merge pull request #2374 from visuddhinanda/development

Development
visuddhinanda 2 hari lalu
induk
melakukan
cbd170dc15
33 mengubah file dengan 196 tambahan dan 185 penghapusan
  1. 8 3
      api-v13/app/Http/Controllers/ChannelController.php
  2. 8 0
      api-v13/app/Http/Resources/ChannelResource.php
  3. 8 0
      dashboard-v6/src/api/channel.ts
  4. 29 3
      dashboard-v6/src/components/channel/Edit.tsx
  5. 1 1
      dashboard-v6/src/components/discussion/DiscussionTopicChildren.tsx
  6. 4 3
      dashboard-v6/src/components/general/UiLangSelect.tsx
  7. 43 14
      dashboard-v6/src/components/navigation/MainMenu.tsx
  8. 0 0
      dashboard-v6/src/components/sentence-history/SentHistory.tsx
  9. 0 0
      dashboard-v6/src/components/sentence-history/SentHistoryGroup.tsx
  10. 0 0
      dashboard-v6/src/components/sentence-history/SentHistoryItem.tsx
  11. 0 0
      dashboard-v6/src/components/sentence-history/SentHistoryModal.tsx
  12. 11 2
      dashboard-v6/src/components/sentence/SentCell.tsx
  13. 1 1
      dashboard-v6/src/components/sentence/SentEditMenu.tsx
  14. 3 1
      dashboard-v6/src/layouts/workspace/index.tsx
  15. 0 10
      dashboard-v6/src/locales/en-US.ts
  16. 0 6
      dashboard-v6/src/locales/en-US/article/index.ts
  17. 0 6
      dashboard-v6/src/locales/en-US/blog/index.ts
  18. 0 19
      dashboard-v6/src/locales/en-US/channel/index.ts
  19. 4 0
      dashboard-v6/src/locales/en-US/forms.ts
  20. 0 8
      dashboard-v6/src/locales/en-US/group/index.ts
  21. 0 10
      dashboard-v6/src/locales/en-US/index.ts
  22. 36 1
      dashboard-v6/src/locales/en-US/label.ts
  23. 0 17
      dashboard-v6/src/locales/en-US/term/index.ts
  24. 0 10
      dashboard-v6/src/locales/zh-Hans.ts
  25. 0 6
      dashboard-v6/src/locales/zh-Hans/article/index.ts
  26. 0 6
      dashboard-v6/src/locales/zh-Hans/blog/index.ts
  27. 0 19
      dashboard-v6/src/locales/zh-Hans/channel/index.ts
  28. 4 0
      dashboard-v6/src/locales/zh-Hans/forms.ts
  29. 0 8
      dashboard-v6/src/locales/zh-Hans/group/index.ts
  30. 0 10
      dashboard-v6/src/locales/zh-Hans/index.ts
  31. 35 0
      dashboard-v6/src/locales/zh-Hans/label.ts
  32. 0 17
      dashboard-v6/src/locales/zh-Hans/term/index.ts
  33. 1 4
      dashboard-v6/src/pages/workspace/channel/setting.tsx

+ 8 - 3
api-v13/app/Http/Controllers/ChannelController.php

@@ -270,7 +270,7 @@ class ChannelController extends Controller
                     if ($value->owner_uid === $user['user_uid']) {
                         $value['role'] = 'owner';
                     } else {
-                        if (isset($channelById[$value->uid])) {
+                        if (isset($channelById) && isset($channelById[$value->uid])) {
                             switch ($channelById[$value->uid]['power']) {
                                 case 10:
                                     # code...
@@ -588,8 +588,7 @@ class ChannelController extends Controller
     public function show($id)
     {
         //
-        $indexCol = ['uid', 'name', 'summary', 'type', 'owner_uid', 'lang', 'is_system', 'status', 'updated_at', 'created_at'];
-        $channel = Channel::where("uid", $id)->select($indexCol)->first();
+        $channel = Channel::find($id);
         if (!$channel) {
             return $this->error('no res');
         }
@@ -646,6 +645,12 @@ class ChannelController extends Controller
         $channel->summary = $request->input('summary');
         $channel->lang = $request->input('lang');
         $channel->status = $request->input('status');
+        if ($request->has('source_type')) {
+            $channel->source_type = $request->input('source_type');
+        }
+        if ($request->has('source_id')) {
+            $channel->source_id = $request->input('source_id');
+        }
         $channel->save();
         return $this->ok($channel);
     }

+ 8 - 0
api-v13/app/Http/Resources/ChannelResource.php

@@ -26,7 +26,15 @@ class ChannelResource extends JsonResource
             "status" => $this->status,
             "created_at" => $this->created_at,
             "updated_at" => $this->updated_at,
+            "source_type" => $this->source_type,
+            "source_id" => $this->source_id,
         ];
+        if (isset($this->source_type)) {
+            $data['source_type'] = $this->source_type;
+        }
+        if (isset($this->source_id)) {
+            $data['source_id'] = $this->source_id;
+        }
         if (isset($this->progress)) {
             $data["progress"] = $this->progress;
         }

+ 8 - 0
dashboard-v6/src/api/channel.ts

@@ -27,6 +27,12 @@ export interface ChannelInfoProps {
   count?: number;
 }
 
+export type TChannelSourceType = "original" | "reprint" | "ai";
+export const SOURCE_TYPE_OPTIONS: TChannelSourceType[] = [
+  "original",
+  "reprint",
+  "ai",
+];
 /**
  * 句子完成情况
  * [句子字符数,是否完成]
@@ -43,6 +49,8 @@ export interface IApiResponseChannelData {
   status: number;
   is_system: boolean;
   progress?: number;
+  source_type?: TChannelSourceType | null;
+  source_id?: string | null;
   created_at: string;
   updated_at: string;
   role?: TRole;

+ 29 - 3
dashboard-v6/src/components/channel/Edit.tsx

@@ -1,14 +1,17 @@
 import { useIntl } from "react-intl";
 import {
   ProForm,
+  ProFormSelect,
   ProFormText,
   ProFormTextArea,
 } from "@ant-design/pro-components";
 import { Alert, message } from "antd";
 
-import type {
-  IApiResponseChannel,
-  IApiResponseChannelData,
+import {
+  SOURCE_TYPE_OPTIONS,
+  type IApiResponseChannel,
+  type IApiResponseChannelData,
+  type TChannelSourceType,
 } from "../../api/channel";
 import { get, put } from "../../request";
 import ChannelTypeSelect from "./ChannelTypeSelect";
@@ -25,6 +28,8 @@ interface IFormData {
   summary: string;
   status: number;
   studio: string;
+  source_type?: TChannelSourceType | null;
+  source_id?: string | null;
   isSystem: boolean;
 }
 interface IWidget {
@@ -83,6 +88,8 @@ const EditWidget = ({ studioName, channelId, onLoad }: IWidget) => {
             lang: res.data.lang,
             summary: res.data.summary,
             status: res.data.status,
+            source_type: res.data.source_type,
+            source_id: res.data.source_id,
             studio: studioName ? studioName : "",
             isSystem: res.data.is_system,
           };
@@ -107,6 +114,25 @@ const EditWidget = ({ studioName, channelId, onLoad }: IWidget) => {
           <ChannelTypeSelect readonly={isSystem ? true : false} />
           <LangSelect readonly={isSystem ? true : false} />
         </ProForm.Group>
+        <ProForm.Group>
+          <ProFormSelect
+            options={SOURCE_TYPE_OPTIONS.map((value) => ({
+              value,
+              label: intl.formatMessage({ id: `channel.source_type.${value}` }),
+            }))}
+            initialValue="original"
+            width="xs"
+            name="source_type"
+            allowClear={false}
+            label={intl.formatMessage({ id: "channel.source_type" })}
+          />
+          <ProFormText
+            width="md"
+            name="source_id"
+            allowClear={true}
+            label={intl.formatMessage({ id: "channel.source_id" })}
+          />
+        </ProForm.Group>
         <ProForm.Group>
           <PublicitySelect
             readonly={

+ 1 - 1
dashboard-v6/src/components/discussion/DiscussionTopicChildren.tsx

@@ -13,7 +13,7 @@ import type {
   ISentHistoryListResponse,
 } from "../../api/sentence-history";
 import DiscussionItem from "./DiscussionItem";
-import SentHistoryGroup from "../sentence-history.tsx/SentHistoryGroup";
+import SentHistoryGroup from "../sentence-history/SentHistoryGroup";
 
 interface IItem {
   type: "comment" | "sent";

+ 4 - 3
dashboard-v6/src/components/general/UiLangSelect.tsx

@@ -15,7 +15,7 @@ const uiLang: IUiLang[] = [
   { key: "zh-Hant", label: "繁体中文" },
 ];
 
-const UiLangSelectWidget = () => {
+const UiLangSelect = () => {
   /**
    * ✅ 初始值直接计算
    */
@@ -43,15 +43,16 @@ const UiLangSelectWidget = () => {
     set(key as string); // ← 只传一个参数
     const label = uiLang.find((i) => i.key === key)?.label;
     setCurr(label);
+    location.reload();
   };
 
   return (
     <Dropdown menu={{ items, onClick }} placement="bottomRight">
-      <Button ghost style={{ border: "unset" }} icon={<GlobalOutlined />}>
+      <Button type="text" icon={<GlobalOutlined />}>
         {curr}
       </Button>
     </Dropdown>
   );
 };
 
-export default UiLangSelectWidget;
+export default UiLangSelect;

+ 43 - 14
dashboard-v6/src/components/navigation/MainMenu.tsx

@@ -23,6 +23,7 @@ import { currentUser } from "../../reducers/current-user";
 import { useRecent } from "../../hooks/useRecent.ts";
 import RecentModal from "../recent/RecentModal.tsx";
 import SettingModal from "../setting/SettingModal.tsx";
+import { useIntl } from "react-intl";
 
 /* ================= 类型 ================= */
 
@@ -105,6 +106,8 @@ interface Props {
   onSearch?: () => void;
 }
 const Widget = ({ onSearch }: Props) => {
+  const intl = useIntl(); //i18n
+
   const navigate = useNavigate();
   const routeId = useCurrentRouteId();
   const currUser = useAppSelector(currentUser);
@@ -145,13 +148,17 @@ const Widget = ({ onSearch }: Props) => {
     {
       key: "/workspace/tipitaka/lib",
       icon: <TipitakaIcon />,
-      label: "巴利三藏",
+      label: intl.formatMessage({
+        id: "columns.studio.palicanon.title",
+      }),
       activeId: "workspace.tipitaka",
     },
     {
       key: "/workspace/setting",
       icon: <SettingOutlined />,
-      label: "setting",
+      label: intl.formatMessage({
+        id: "columns.studio.setting.title",
+      }),
       activeId: "workspace.setting",
     },
     { type: "divider", key: "d1" },
@@ -159,7 +166,9 @@ const Widget = ({ onSearch }: Props) => {
     {
       key: "/workspace/recent",
       icon: <FieldTimeOutlined />,
-      label: "最近打开",
+      label: intl.formatMessage({
+        id: "columns.studio.recent.title",
+      }),
       children: [
         ...recentList,
         {
@@ -176,13 +185,17 @@ const Widget = ({ onSearch }: Props) => {
       children: [
         {
           key: "/workspace/article",
-          label: "文章",
+          label: intl.formatMessage({
+            id: "columns.studio.article.title",
+          }),
           activeId: "workspace.article",
           icon: <FileOutlined />,
         },
         {
           key: "/workspace/anthology",
-          label: "文集",
+          label: intl.formatMessage({
+            id: "columns.studio.anthology.title",
+          }),
           activeId: "workspace.anthology",
           icon: <FolderOutlined />,
         },
@@ -192,26 +205,34 @@ const Widget = ({ onSearch }: Props) => {
     {
       key: "/workspace/channel",
       icon: <ChannelIcon />,
-      label: "版本",
+      label: intl.formatMessage({
+        id: "columns.studio.channel.title",
+      }),
       activeId: "workspace.channel",
     },
 
     {
       key: "/workspace/term",
       icon: <TermIcon />,
-      label: "术语",
+      label: intl.formatMessage({
+        id: "columns.studio.term.title",
+      }),
       activeId: "workspace.term",
     },
 
     {
       key: "/workspace/course",
       icon: <CourseOutLinedIcon />,
-      label: "Course",
+      label: intl.formatMessage({
+        id: "columns.library.course.title",
+      }),
     },
     {
       key: "/workspace/task",
       icon: <TaskIcon />,
-      label: "任务",
+      label: intl.formatMessage({
+        id: "labels.task",
+      }),
       activeId: "workspace.task",
       children: [
         {
@@ -221,7 +242,9 @@ const Widget = ({ onSearch }: Props) => {
         },
         {
           key: "/workspace/task/hall",
-          label: "Task hall",
+          label: intl.formatMessage({
+            id: "labels.task.hall",
+          }),
           activeId: "workspace.task.hall",
         },
         {
@@ -231,12 +254,16 @@ const Widget = ({ onSearch }: Props) => {
         },
         {
           key: "/workspace/task/project",
-          label: "projects",
+          label: intl.formatMessage({
+            id: "labels.task.my.project",
+          }),
           activeId: "workspace.task.project",
         },
         {
           key: "/workspace/task/workflows",
-          label: "workflows",
+          label: intl.formatMessage({
+            id: "labels.task.workflows",
+          }),
           activeId: "workspace.task.workflows",
         },
       ],
@@ -248,7 +275,9 @@ const Widget = ({ onSearch }: Props) => {
       children: [
         {
           key: "/workspace/tag",
-          label: "tag",
+          label: intl.formatMessage({
+            id: "columns.studio.tag.title",
+          }),
           activeId: "workspace.tag",
         },
         {
@@ -266,7 +295,7 @@ const Widget = ({ onSearch }: Props) => {
     {
       key: "/workspace/collaboration",
       icon: <CourseOutLinedIcon />,
-      label: "collaboration",
+      label: intl.formatMessage({ id: "labels.collaboration" }),
       children: [
         {
           key: "/workspace/team",

+ 0 - 0
dashboard-v6/src/components/sentence-history.tsx/SentHistory.tsx → dashboard-v6/src/components/sentence-history/SentHistory.tsx


+ 0 - 0
dashboard-v6/src/components/sentence-history.tsx/SentHistoryGroup.tsx → dashboard-v6/src/components/sentence-history/SentHistoryGroup.tsx


+ 0 - 0
dashboard-v6/src/components/sentence-history.tsx/SentHistoryItem.tsx → dashboard-v6/src/components/sentence-history/SentHistoryItem.tsx


+ 0 - 0
dashboard-v6/src/components/sentence-history.tsx/SentHistoryModal.tsx → dashboard-v6/src/components/sentence-history/SentHistoryModal.tsx


+ 11 - 2
dashboard-v6/src/components/sentence/SentCell.tsx

@@ -190,6 +190,8 @@ const SentCellWidget = ({
       .finally(() => setLoading(false));
   };
 
+  console.debug("sentence data", sentData, value);
+
   return (
     <div style={{ marginBottom: "8px", backgroundColor: bgColor }}>
       {loading ? <LoadingOutlined /> : <></>}
@@ -436,8 +438,15 @@ const SentCellWidget = ({
                   content={sentData.content}
                   oldContent={diffText}
                 />
-              ) : sentData.channel.type === "nissaya" ? (
-                <NissayaSent data={JSON.parse(sentData.content ?? "[])")} />
+              ) : sentData.channel.type === "nissaya" &&
+                sentData.contentType === "json" ? (
+                <NissayaSent
+                  data={JSON.parse(
+                    sentData.content && sentData.content !== ""
+                      ? sentData.content
+                      : "[]"
+                  )}
+                />
               ) : (
                 <MdView
                   className="sentence"

+ 1 - 1
dashboard-v6/src/components/sentence/SentEditMenu.tsx

@@ -23,7 +23,7 @@ import {
 } from "../../assets/icon";
 import { useIntl } from "react-intl";
 import { fullUrl } from "../../utils";
-import SentHistoryModal from "../sentence-history.tsx/SentHistoryModal";
+import SentHistoryModal from "../sentence-history/SentHistoryModal";
 
 interface IWidget {
   data?: ISentence;

+ 3 - 1
dashboard-v6/src/layouts/workspace/index.tsx

@@ -8,6 +8,7 @@ import HeaderBreadcrumb from "../../components/navigation/HeaderBreadcrumb";
 import ThemeSwitch from "../../components/theme/ThemeSwitch";
 import { NetworkStatus } from "../../components/general/NetworkStatus";
 import { useAuth } from "../../hooks/useAuth";
+import UiLangSelect from "../../components/general/UiLangSelect";
 
 const { Sider, Content } = Layout;
 const Widget = () => {
@@ -45,7 +46,7 @@ const Widget = () => {
       <Layout>
         <div
           style={{
-            padding: "4 16px", // 建议保留左右内边距,否则内容会贴边
+            padding: 16, // 建议保留左右内边距,否则内容会贴边
             display: "flex",
             alignItems: "center", // 垂直居中
             height: 24,
@@ -56,6 +57,7 @@ const Widget = () => {
           <Space>
             <NetworkStatus />
             <ThemeSwitch />
+            <UiLangSelect />
           </Space>
         </div>
 

+ 0 - 10
dashboard-v6/src/locales/en-US.ts

@@ -1,13 +1,8 @@
 import forms from "./en-US/forms";
 import buttons from "./en-US/buttons";
 import nut from "./en-US/nut";
-import channel from "./en-US/channel";
 import dict from "./en-US/dict";
-import term from "./en-US/term";
-import group from "./en-US/group";
-import article from "./en-US/article";
 import utilities from "./en-US/utilities";
-import blog from "./en-US/blog";
 import setting from "./en-US/setting";
 import auth from "./en-US/auth";
 import course from "./en-US/course";
@@ -54,13 +49,8 @@ const items = {
   ...buttons,
   ...forms,
   ...nut,
-  ...channel,
   ...dict,
-  ...term,
-  ...group,
-  ...article,
   ...utilities,
-  ...blog,
   ...setting,
   ...auth,
   ...course,

+ 0 - 6
dashboard-v6/src/locales/en-US/article/index.ts

@@ -1,6 +0,0 @@
-const items = {
-  "article.lable": "article",
-  "article.fields.article.count.label": "article count",
-};
-
-export default items;

+ 0 - 6
dashboard-v6/src/locales/en-US/blog/index.ts

@@ -1,6 +0,0 @@
-const items = {
-  "blog.overview": "overview",
-  "blog.palicanon": "palicanon",
-};
-
-export default items;

+ 0 - 19
dashboard-v6/src/locales/en-US/channel/index.ts

@@ -1,19 +0,0 @@
-const items = {
-  "channel.title": "channel",
-  "channel.type": "type",
-  "channel.name": "name",
-  "channel.create.message.noname": "请输入版本名称",
-  "channel.type.all.title": "all",
-  "channel.type.translation.label": "translation",
-  "channel.type.nissaya.label": "Nissaya",
-  "channel.type.commentary.label": "commentary",
-  "channel.type.original.label": "original",
-  "channel.type.message.required": "请输入版本类型",
-  "channel.lang": "language",
-  "channel.fields.lang.label": "语言",
-  "channel.fields.type.label": "类型",
-  "channel.fields.name.label": "名称",
-  "channel.type.similar.label": "Similar",
-};
-
-export default items;

+ 4 - 0
dashboard-v6/src/locales/en-US/forms.ts

@@ -98,6 +98,10 @@ const items = {
   "forms.fields.assignees.label": "assignees",
   "forms.fields.model.label": "model",
   "forms.fields.key.label": "key",
+  group: "group",
+  "group.fields.name.label": "group name",
+  "group.files": "files",
+  "group.member": "members",
 };
 
 export default items;

+ 0 - 8
dashboard-v6/src/locales/en-US/group/index.ts

@@ -1,8 +0,0 @@
-const items = {
-  group: "group",
-  "group.fields.name.label": "group name",
-  "group.files": "files",
-  "group.member": "members",
-};
-
-export default items;

+ 0 - 10
dashboard-v6/src/locales/en-US/index.ts

@@ -1,13 +1,8 @@
 import forms from "./forms";
 import buttons from "./buttons";
 import nut from "./nut";
-import channel from "./channel";
 import dict from "./dict";
-import term from "./term";
-import group from "./group";
-import article from "./article";
 import utilities from "./utilities";
-import blog from "./blog";
 import setting from "./setting";
 import auth from "./auth";
 import course from "./course";
@@ -52,13 +47,8 @@ const items = {
   ...buttons,
   ...forms,
   ...nut,
-  ...channel,
   ...dict,
-  ...term,
-  ...group,
-  ...article,
   ...utilities,
-  ...blog,
   ...setting,
   ...auth,
   ...course,

+ 36 - 1
dashboard-v6/src/locales/en-US/label.ts

@@ -51,7 +51,7 @@ const items = {
   "labels.error.403": "没有权限",
   "labels.error.404": "没有找到指定的资源",
   "labels.error.429": "请求过于频繁",
-  "labels.error.500": "服务器内部错误",
+  "labels.error.500": "Server Internal Error",
   "labels.task": "task",
   "labels.task.hall": "task hall",
   "labels.task.mine": "my task",
@@ -97,6 +97,41 @@ const items = {
   "labels.shared": "Shared",
   "labels.community": "Community",
   "labels.task.prev.executors": "Prev Executors",
+  "channel.title": "channel",
+  "channel.type": "type",
+  "channel.name": "name",
+  "channel.create.message.noname": "name is request",
+  "channel.type.all.title": "all",
+  "channel.type.translation.label": "translation",
+  "channel.type.nissaya.label": "Nissaya",
+  "channel.type.commentary.label": "commentary",
+  "channel.type.original.label": "original",
+  "channel.type.message.required": "type is request",
+  "channel.lang": "language",
+  "channel.fields.lang.label": "language",
+  "channel.fields.type.label": "type",
+  "channel.fields.name.label": "name",
+  "channel.type.similar.label": "Similar",
+  "channel.source_type": "source type",
+  "channel.source_type.original": "original",
+  "channel.source_type.reprint": "reprint",
+  "channel.source_type.ai": "ai",
+  "channel.source_id": "Source ID",
+  "article.lable": "article",
+  "article.fields.article.count.label": "article count",
+  "term.fields.sn.label": "serial",
+  "term.fields.word.label": "word",
+  "term.fields.description.label": "tags",
+  "term.fields.description.tooltip":
+    "单词说明,可以用来区分相同拼写的不同单词。",
+  "term.fields.channel.label": "channel",
+  "term.fields.channel.tooltip": "该术语仅仅用于某个版本",
+  "term.fields.meaning.label": "meaning",
+  "term.fields.meaning.tooltip": "单词的首选意思",
+  "term.fields.meaning2.label": "other meanings",
+  "term.fields.meaning2.tooltip": "其他意思将出现在后面的括号里",
+  "term.fields.note.label": "note",
+  "term.general-in-studio": "general in studio",
 };
 
 export default items;

+ 0 - 17
dashboard-v6/src/locales/en-US/term/index.ts

@@ -1,17 +0,0 @@
-const items = {
-  "term.fields.sn.label": "serial",
-  "term.fields.word.label": "word",
-  "term.fields.description.label": "tags",
-  "term.fields.description.tooltip":
-    "单词说明,可以用来区分相同拼写的不同单词。",
-  "term.fields.channel.label": "channel",
-  "term.fields.channel.tooltip": "该术语仅仅用于某个版本",
-  "term.fields.meaning.label": "meaning",
-  "term.fields.meaning.tooltip": "单词的首选意思",
-  "term.fields.meaning2.label": "other meanings",
-  "term.fields.meaning2.tooltip": "其他意思将出现在后面的括号里",
-  "term.fields.note.label": "note",
-  "term.general-in-studio": "general in studio",
-};
-
-export default items;

+ 0 - 10
dashboard-v6/src/locales/zh-Hans.ts

@@ -1,13 +1,8 @@
 import forms from "./zh-Hans/forms";
 import buttons from "./zh-Hans/buttons";
 import nut from "./zh-Hans/nut";
-import channel from "./zh-Hans/channel";
 import dict from "./zh-Hans/dict";
-import term from "./zh-Hans/term";
-import group from "./zh-Hans/group";
-import article from "./zh-Hans/article";
 import utilities from "./zh-Hans/utilities";
-import blog from "./zh-Hans/blog";
 import setting from "./zh-Hans/setting";
 import auth from "./zh-Hans/auth";
 import course from "./zh-Hans/course";
@@ -54,13 +49,8 @@ const items = {
   ...buttons,
   ...forms,
   ...nut,
-  ...channel,
   ...dict,
-  ...term,
-  ...group,
-  ...article,
   ...utilities,
-  ...blog,
   ...setting,
   ...auth,
   ...course,

+ 0 - 6
dashboard-v6/src/locales/zh-Hans/article/index.ts

@@ -1,6 +0,0 @@
-const items = {
-	"article.lable": "文章",
-	"article.fields.article.count.label": "文章数量",
-};
-
-export default items;

+ 0 - 6
dashboard-v6/src/locales/zh-Hans/blog/index.ts

@@ -1,6 +0,0 @@
-const items = {
-	"blog.overview": "概览",
-	"blog.palicanon": "译文",
-};
-
-export default items;

+ 0 - 19
dashboard-v6/src/locales/zh-Hans/channel/index.ts

@@ -1,19 +0,0 @@
-const items = {
-  "channel.title": "版本风格",
-  "channel.type": "类型",
-  "channel.name": "名称",
-  "channel.create.message.noname": "请输入版本名称",
-  "channel.type.all.title": "全部",
-  "channel.type.translation.label": "译文",
-  "channel.type.nissaya.label": "Nissaya",
-  "channel.type.commentary.label": "注疏",
-  "channel.type.original.label": "原文",
-  "channel.type.message.required": "请输入版本类型",
-  "channel.lang": "语言",
-  "channel.fields.lang.label": "语言",
-  "channel.fields.type.label": "类型",
-  "channel.fields.name.label": "名称",
-  "channel.type.similar.label": "相似句",
-};
-
-export default items;

+ 4 - 0
dashboard-v6/src/locales/zh-Hans/forms.ts

@@ -98,6 +98,10 @@ const items = {
   "forms.fields.assignees.label": "指派给",
   "forms.fields.model.label": "模型",
   "forms.fields.key.label": "密钥",
+  group: "群组",
+  "group.fields.name.label": "群组名",
+  "group.files": "群文档",
+  "group.member": "群成员",
 };
 
 export default items;

+ 0 - 8
dashboard-v6/src/locales/zh-Hans/group/index.ts

@@ -1,8 +0,0 @@
-const items = {
-  "group": "群组",
-  "group.fields.name.label": "群组名",
-  "group.files": "群文档",
-  "group.member": "群成员",
-};
-
-export default items;

+ 0 - 10
dashboard-v6/src/locales/zh-Hans/index.ts

@@ -1,13 +1,8 @@
 import forms from "./forms";
 import buttons from "./buttons";
 import nut from "./nut";
-import channel from "./channel";
 import dict from "./dict";
-import term from "./term";
-import group from "./group";
-import article from "./article";
 import utilities from "./utilities";
-import blog from "./blog";
 import setting from "./setting";
 import auth from "./auth";
 import course from "./course";
@@ -54,13 +49,8 @@ const items = {
   ...buttons,
   ...forms,
   ...nut,
-  ...channel,
   ...dict,
-  ...term,
-  ...group,
-  ...article,
   ...utilities,
-  ...blog,
   ...setting,
   ...auth,
   ...course,

+ 35 - 0
dashboard-v6/src/locales/zh-Hans/label.ts

@@ -105,6 +105,41 @@ const items = {
   "labels.shared": "共享",
   "labels.community": "社区",
   "labels.task.prev.executors": "前置执行者",
+  "channel.title": "版本风格",
+  "channel.type": "类型",
+  "channel.name": "名称",
+  "channel.create.message.noname": "请输入版本名称",
+  "channel.type.all.title": "全部",
+  "channel.type.translation.label": "译文",
+  "channel.type.nissaya.label": "Nissaya",
+  "channel.type.commentary.label": "注疏",
+  "channel.type.original.label": "原文",
+  "channel.type.message.required": "请输入版本类型",
+  "channel.lang": "语言",
+  "channel.fields.lang.label": "语言",
+  "channel.fields.type.label": "类型",
+  "channel.fields.name.label": "名称",
+  "channel.type.similar.label": "相似句",
+  "channel.source_type": "来源",
+  "channel.source_type.original": "原创",
+  "channel.source_type.reprint": "转载",
+  "channel.source_type.ai": "人工智能",
+  "channel.source_id": "来源ID",
+  "article.lable": "文章",
+  "article.fields.article.count.label": "文章数量",
+  "term.fields.sn.label": "序号",
+  "term.fields.word.label": "词头",
+  "term.fields.description.label": "标签",
+  "term.fields.description.tooltip":
+    "单词说明,可以用来区分相同拼写的不同单词。",
+  "term.fields.channel.label": "所属版本",
+  "term.fields.channel.tooltip": "该术语仅仅用于某个版本",
+  "term.fields.meaning.label": "意思",
+  "term.fields.meaning.tooltip": "单词的首选意思",
+  "term.fields.meaning2.label": "其他意思",
+  "term.fields.meaning2.tooltip": "其他意思将出现在后面的括号里",
+  "term.fields.note.label": "注释",
+  "term.general-in-studio": "通用于本Studio",
 };
 
 export default items;

+ 0 - 17
dashboard-v6/src/locales/zh-Hans/term/index.ts

@@ -1,17 +0,0 @@
-const items = {
-  "term.fields.sn.label": "序号",
-  "term.fields.word.label": "词头",
-  "term.fields.description.label": "标签",
-  "term.fields.description.tooltip":
-    "单词说明,可以用来区分相同拼写的不同单词。",
-  "term.fields.channel.label": "所属版本",
-  "term.fields.channel.tooltip": "该术语仅仅用于某个版本",
-  "term.fields.meaning.label": "意思",
-  "term.fields.meaning.tooltip": "单词的首选意思",
-  "term.fields.meaning2.label": "其他意思",
-  "term.fields.meaning2.tooltip": "其他意思将出现在后面的括号里",
-  "term.fields.note.label": "注释",
-  "term.general-in-studio": "通用于本Studio",
-};
-
-export default items;

+ 1 - 4
dashboard-v6/src/pages/workspace/channel/setting.tsx

@@ -4,7 +4,6 @@ import { useNavigate, useParams } from "react-router";
 import { TeamOutlined } from "@ant-design/icons";
 import { Button, Card, Tabs } from "antd";
 
-import GoBack from "../../../components/studio/GoBack";
 import ShareModal from "../../../components/share/ShareModal";
 
 import Edit from "../../../components/channel/Edit";
@@ -29,9 +28,7 @@ const Widget = () => {
     <>
       <title>{"channel-" + title}</title>
       <Card
-        title={
-          <GoBack to={`/workspace/${studioName}/channel/list`} title={title} />
-        }
+        title={title}
         extra={
           channelId ? (
             <ShareModal