feat(kol): workspace KOL cards + article source type

This commit is contained in:
2026-04-17 15:19:11 +08:00
parent 641383a585
commit b6bd4f02fb
16 changed files with 192 additions and 5 deletions
@@ -4,6 +4,7 @@ import {
CalendarOutlined,
ClockCircleOutlined,
EditOutlined,
TeamOutlined,
ThunderboltOutlined,
} from "@ant-design/icons-vue";
import { computed, type Component } from "vue";
@@ -23,7 +24,7 @@ const sourceLabel = computed(() =>
const createdAtLabel = computed(() => formatDateTime(props.createdAt));
const sourceVariant = computed<
"template" | "custom" | "instant" | "schedule" | "free-create" | "default"
"template" | "custom" | "instant" | "schedule" | "free-create" | "kol" | "default"
>(() => {
if (props.sourceType === "template") {
return "template";
@@ -31,6 +32,9 @@ const sourceVariant = computed<
if (props.sourceType === "free_create") {
return "free-create";
}
if (props.sourceType === "kol") {
return "kol";
}
if (props.sourceType === "custom_generation") {
if (props.generationMode === "schedule") {
return "schedule";
@@ -55,6 +59,8 @@ const badgeIcon = computed<Component>(() => {
return ThunderboltOutlined;
case "free-create":
return EditOutlined;
case "kol":
return TeamOutlined;
default:
return AppstoreOutlined;
}
@@ -127,6 +133,12 @@ const badgeIcon = computed<Component>(() => {
color: #18794e;
}
.article-source-meta__badge--kol {
border: 1px solid #d6e4ff;
background: linear-gradient(180deg, #f5f8ff 0%, #eaf1ff 100%);
color: #1d4ed8;
}
.article-source-meta__badge--default {
border: 1px solid #dde3ea;
background: linear-gradient(180deg, #fbfcfd 0%, #f4f6f8 100%);
+4
View File
@@ -47,6 +47,7 @@ import type {
KolDashboardTrendPoint,
Keyword,
KeywordRequest,
KolWorkspaceCard,
LoginRequest,
LoginResponse,
MediaPlatform,
@@ -199,6 +200,9 @@ export const workspaceApi = {
templateCards() {
return apiClient.get<TemplateCard[]>("/api/tenant/workspace/template-cards");
},
kolCards() {
return apiClient.get<KolWorkspaceCard[]>("/api/tenant/workspace/kol-cards");
},
};
export const templatesApi = {
+3
View File
@@ -77,6 +77,9 @@ export function getSourceTypeLabel(sourceType?: string | null, generationMode?:
if (sourceType === "free_create") {
return i18n.global.t("status.sourceType.free_create");
}
if (sourceType === "kol") {
return i18n.global.t("status.sourceType.kol");
}
if (sourceType === "custom_generation") {
if (generationMode === "schedule") {
return i18n.global.t("status.sourceType.schedule_task");