From 614ca4a2eaa82295c85705947edfdeaae4095fe1 Mon Sep 17 00:00:00 2001 From: liangxu Date: Fri, 17 Apr 2026 15:23:38 +0800 Subject: [PATCH] feat(kol): workspace KOL card area --- apps/admin-web/src/views/WorkspaceView.vue | 124 +++++++++++++++++++++ 1 file changed, 124 insertions(+) diff --git a/apps/admin-web/src/views/WorkspaceView.vue b/apps/admin-web/src/views/WorkspaceView.vue index 2b0729a..9748eee 100644 --- a/apps/admin-web/src/views/WorkspaceView.vue +++ b/apps/admin-web/src/views/WorkspaceView.vue @@ -51,6 +51,10 @@ const templateCardsQuery = useQuery({ queryKey: ["workspace", "template-cards"], queryFn: () => workspaceApi.templateCards(), }); +const kolCardsQuery = useQuery({ + queryKey: ["workspace", "kol-cards"], + queryFn: () => workspaceApi.kolCards(), +}); const statIcons = [ FileDoneOutlined, @@ -201,6 +205,7 @@ function refreshDashboard(): void { overviewQuery.refetch(), recentArticlesQuery.refetch(), templateCardsQuery.refetch(), + kolCardsQuery.refetch(), ]); } @@ -261,6 +266,38 @@ function refreshDashboard(): void { + +
+

{{ t("kol.marketplace.title") }}

+
+
+
+
+
+
+
+

{{ card.package_name }}

+
+ {{ card.prompt_name }} + {{ card.platform_hint }} +
+
+ +
+
+
+
+
@@ -546,6 +583,93 @@ function refreshDashboard(): void { color: #141414; } +/* --- KOL Section --- */ +.kol-cards-container { + display: grid; + grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); + gap: 16px; +} + +.kol-card { + background: #fcfcfc; + border: 1px solid #f0f0f0; + border-radius: 12px; + overflow: hidden; + cursor: pointer; + transition: all 0.2s; + display: flex; + flex-direction: column; +} + +.kol-card:hover { + transform: translateY(-4px); + box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05); + border-color: #1677ff; +} + +.kol-card-cover { + height: 100px; + background-size: cover; + background-position: center; + background-color: #f5f5f5; + position: relative; +} + +.kol-card-cover-fallback { + height: 100%; + background: linear-gradient(135deg, #e6f7ff 0%, #bae7ff 100%); +} + +.kol-card-content { + padding: 12px; + flex: 1; + display: flex; + flex-direction: column; + gap: 8px; +} + +.kol-card-header { + flex: 1; +} + +.kol-card-title { + font-size: 14px; + font-weight: 700; + color: #1a1a1a; + margin: 0 0 4px 0; + line-height: 1.4; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.kol-card-subtitle { + font-size: 12px; + color: #8c8c8c; + display: flex; + align-items: center; + gap: 4px; + flex-wrap: wrap; +} + +.kol-card-footer { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 4px; +} + +.kol-card-author { + font-size: 11px; + color: #bfbfbf; +} + +.kol-card-action { + color: #1677ff; + font-size: 12px; +} + @media (max-width: 1200px) { .workspace-header-grid { grid-template-columns: 1fr;