diff --git a/apps/admin-web/src/components/ArticleDetailDrawer.vue b/apps/admin-web/src/components/ArticleDetailDrawer.vue index 24b5a36..1ed1fe8 100644 --- a/apps/admin-web/src/components/ArticleDetailDrawer.vue +++ b/apps/admin-web/src/components/ArticleDetailDrawer.vue @@ -209,7 +209,7 @@ async function refreshArticleData(): Promise {

{{ t("article.preview") }}

{{ displayTitle }}

- {{ getSourceTypeLabel(detail.source_type) }} · + {{ getSourceTypeLabel(detail.source_type, detail.generation_mode) }} · {{ formatDateTime(detail.created_at) }}

diff --git a/apps/admin-web/src/components/CustomArticleTab.vue b/apps/admin-web/src/components/CustomArticleTab.vue index 5c8ee71..776a730 100644 --- a/apps/admin-web/src/components/CustomArticleTab.vue +++ b/apps/admin-web/src/components/CustomArticleTab.vue @@ -1,6 +1,10 @@ + + + + diff --git a/apps/admin-web/src/components/PromptRuleTab.vue b/apps/admin-web/src/components/PromptRuleTab.vue index bc738c8..621b111 100644 --- a/apps/admin-web/src/components/PromptRuleTab.vue +++ b/apps/admin-web/src/components/PromptRuleTab.vue @@ -2,6 +2,8 @@ import { DeleteOutlined, EditOutlined, + PauseCircleOutlined, + PlayCircleOutlined, PlusOutlined, } from "@ant-design/icons-vue"; import { useMutation, useQuery, useQueryClient } from "@tanstack/vue-query"; @@ -59,7 +61,7 @@ const columns = computed>(() => [ { title: t("custom.promptRule.articleCount"), dataIndex: "article_count", key: "article_count", width: 100 }, { title: t("custom.promptRule.status"), dataIndex: "status", key: "status", width: 100 }, { title: t("common.createdAt"), dataIndex: "created_at", key: "created_at", width: 168 }, - { title: t("common.actions"), key: "actions", width: 140, fixed: "right" }, + { title: t("common.actions"), key: "actions", width: 140, fixed: "right", align: "right" }, ]); const groupMutations = { @@ -252,29 +254,53 @@ watch(selectedGroupId, () => { {{ formatDateTime(record.created_at) }} diff --git a/apps/admin-web/src/components/ScheduleTaskTab.vue b/apps/admin-web/src/components/ScheduleTaskTab.vue index 34c02fe..3e74bb5 100644 --- a/apps/admin-web/src/components/ScheduleTaskTab.vue +++ b/apps/admin-web/src/components/ScheduleTaskTab.vue @@ -1,14 +1,20 @@ diff --git a/apps/admin-web/src/i18n/messages/en-US.ts b/apps/admin-web/src/i18n/messages/en-US.ts index cec8ac1..f930c65 100644 --- a/apps/admin-web/src/i18n/messages/en-US.ts +++ b/apps/admin-web/src/i18n/messages/en-US.ts @@ -187,6 +187,7 @@ const enUS = { status: { generate: { draft: "Draft", + queued: "Queued", generating: "Generating", running: "Running", completed: "Completed", @@ -202,6 +203,9 @@ const enUS = { }, sourceType: { template: "Template generation", + custom_generation: "Custom generation", + instant_task: "Instant task", + schedule_task: "Scheduled task", }, }, templates: { @@ -568,6 +572,11 @@ const enUS = { selectPlatform: "Target platform", submit: "Generate now", extraParams: "Extra parameters", + name: "Task name", + executionStatus: "Execution status", + executionTime: "Execution time", + createdTime: "Created time", + empty: "No instant tasks yet.", }, filters: { promptRule: "Prompt rule", @@ -575,6 +584,14 @@ const enUS = { generateStatus: "Generation status", title: "Title", generateTime: "Generation time", + status: "Status", + name: "Name", + namePlaceholder: "Search by task name", + createdTime: "Created time", + }, + article: { + titleColumn: "Article title", + titleGenerating: "Generating title", }, messages: { ruleCreated: "Rule created.", diff --git a/apps/admin-web/src/i18n/messages/zh-CN.ts b/apps/admin-web/src/i18n/messages/zh-CN.ts index a402f38..d9aa44b 100644 --- a/apps/admin-web/src/i18n/messages/zh-CN.ts +++ b/apps/admin-web/src/i18n/messages/zh-CN.ts @@ -187,6 +187,7 @@ const zhCN = { status: { generate: { draft: "草稿", + queued: "排队中", generating: "生成中", running: "运行中", completed: "已完成", @@ -202,6 +203,9 @@ const zhCN = { }, sourceType: { template: "模版单次生成", + custom_generation: "自定义生成", + instant_task: "即时任务", + schedule_task: "定时任务", }, }, templates: { @@ -577,6 +581,11 @@ const zhCN = { selectPlatform: "目标平台", submit: "立即生成", extraParams: "额外参数", + name: "任务名称", + executionStatus: "执行状态", + executionTime: "执行时间", + createdTime: "创建时间", + empty: "还未创建即时任务,暂无相关数据~", }, filters: { promptRule: "Prompt 规则", @@ -584,6 +593,14 @@ const zhCN = { generateStatus: "生成状态", title: "标题", generateTime: "生成时间", + status: "状态", + name: "名称", + namePlaceholder: "请输入任务名称内搜索", + createdTime: "创建时间", + }, + article: { + titleColumn: "文章标题", + titleGenerating: "标题生成中", }, messages: { ruleCreated: "规则创建成功", diff --git a/apps/admin-web/src/layouts/AppShell.vue b/apps/admin-web/src/layouts/AppShell.vue index 565777e..c020f33 100644 --- a/apps/admin-web/src/layouts/AppShell.vue +++ b/apps/admin-web/src/layouts/AppShell.vue @@ -29,7 +29,13 @@ const quotaQuery = useQuery({ }); const userInitial = computed(() => authStore.user?.name?.slice(0, 1).toUpperCase() ?? "A"); -const selectedKey = computed(() => String(route.meta.navKey ?? route.path)); +const selectedKeys = computed(() => { + if (route.meta.navKey === null) { + return []; + } + + return [String(route.meta.navKey ?? route.path)]; +}); const pageTitle = computed(() => t(String(route.meta.titleKey ?? "route.workspace.title"))); const localeOptions = computed(() => [ @@ -117,7 +123,7 @@ async function handleLogout(): Promise {