feat(monitoring): decouple AI platforms from media_platforms and expand catalog to 6
Add ai_platforms table + shared catalog (yuanbao/kimi/wenxin/deepseek/doubao/qwen), drop FKs from platform_accounts and desktop_tasks to media_platforms, and wire target_account_id + platform into DesktopTaskEvent so the desktop runtime no longer has to infer them from local state. Desktop client gains generic AI page detection for binding, drops stale-business-date monitor tasks at the edge, and refactors AccountsView/AiPlatformsView around the shared catalog. Admin tracking view surfaces per-platform sampling status cards. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,10 +1,17 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from "vue";
|
||||
import { ReloadOutlined, WarningOutlined } from "@ant-design/icons-vue";
|
||||
import {
|
||||
ArrowRightOutlined,
|
||||
DeleteOutlined,
|
||||
LinkOutlined,
|
||||
ReloadOutlined,
|
||||
WarningOutlined,
|
||||
} from "@ant-design/icons-vue";
|
||||
import { notification } from "ant-design-vue";
|
||||
import { computed, ref } from "vue";
|
||||
|
||||
import StatusBadge from "../components/StatusBadge.vue";
|
||||
import { useDesktopRuntime } from "../composables/useDesktopRuntime";
|
||||
import { formatDateTime, titleCaseToken } from "../lib/formatters";
|
||||
import { showClientActionError } from "../lib/client-errors";
|
||||
import { formatDateTime } from "../lib/formatters";
|
||||
import { desktopMonitoringMediaCatalog } from "../lib/media-catalog";
|
||||
import type { RuntimeAccount } from "../types";
|
||||
|
||||
@@ -12,9 +19,9 @@ type AccountRow = Readonly<Omit<RuntimeAccount, "tags">> & { tags: readonly stri
|
||||
|
||||
const { snapshot, refreshAccounts, loading } = useDesktopRuntime();
|
||||
|
||||
function handleCardClick() {
|
||||
void refreshAccounts();
|
||||
}
|
||||
const bindPendingPlatformId = ref<string | null>(null);
|
||||
const openPendingAccountId = ref<string | null>(null);
|
||||
const unbindPendingAccountId = ref<string | null>(null);
|
||||
|
||||
const aiAccounts = computed(() =>
|
||||
(snapshot.value?.accounts ?? []).filter((account) =>
|
||||
@@ -23,12 +30,23 @@ const aiAccounts = computed(() =>
|
||||
);
|
||||
|
||||
const overview = computed(() => ({
|
||||
configuredPlatforms: desktopMonitoringMediaCatalog.length,
|
||||
bound: aiAccounts.value.length,
|
||||
live: aiAccounts.value.filter((item) => item.health === "live").length,
|
||||
attention: aiAccounts.value.filter((item) => item.health !== "live").length,
|
||||
configuredPlatforms: desktopMonitoringMediaCatalog.length,
|
||||
onlineClients: snapshot.value?.summary.onlineClients ?? 0,
|
||||
}));
|
||||
|
||||
const platformCards = computed(() =>
|
||||
desktopMonitoringMediaCatalog.map((platform) => {
|
||||
const matched = aiAccounts.value.filter((account) => account.platform === platform.id);
|
||||
return {
|
||||
...platform,
|
||||
account: matched[0] ?? null,
|
||||
duplicateCount: Math.max(0, matched.length - 1),
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
function authLabel(account: AccountRow | null) {
|
||||
if (!account) {
|
||||
return "未绑定";
|
||||
@@ -36,9 +54,9 @@ function authLabel(account: AccountRow | null) {
|
||||
|
||||
switch (account.health) {
|
||||
case "live":
|
||||
return "已绑定";
|
||||
return "授权正常";
|
||||
case "captcha":
|
||||
return "待补登";
|
||||
return "待处理";
|
||||
case "expired":
|
||||
return "授权过期";
|
||||
default:
|
||||
@@ -46,373 +64,592 @@ function authLabel(account: AccountRow | null) {
|
||||
}
|
||||
}
|
||||
|
||||
const platformCards = computed(() =>
|
||||
desktopMonitoringMediaCatalog.map((platform) => {
|
||||
const matched = aiAccounts.value.filter((account) => account.platform === platform.id);
|
||||
return {
|
||||
...platform,
|
||||
account: matched[0] ?? null,
|
||||
duplicate: matched.length > 1,
|
||||
};
|
||||
}),
|
||||
);
|
||||
|
||||
function sessionTone(account: AccountRow | null) {
|
||||
function authColor(account: AccountRow | null) {
|
||||
if (!account) {
|
||||
return "default";
|
||||
}
|
||||
|
||||
switch (account.sessionState) {
|
||||
case "hot":
|
||||
switch (account.health) {
|
||||
case "live":
|
||||
return "success";
|
||||
case "warm":
|
||||
return "processing";
|
||||
case "captcha":
|
||||
return "warning";
|
||||
case "expired":
|
||||
return "error";
|
||||
default:
|
||||
return "default";
|
||||
}
|
||||
}
|
||||
|
||||
function sessionLabel(account: AccountRow | null): string {
|
||||
if (!account) {
|
||||
return "无本地缓存";
|
||||
}
|
||||
|
||||
function sessionLabel(account: AccountRow): string {
|
||||
switch (account.sessionState) {
|
||||
case "hot":
|
||||
return "活跃会话";
|
||||
case "warm":
|
||||
return "本地缓存";
|
||||
return "已缓存";
|
||||
default:
|
||||
return "冷缓存";
|
||||
return "冷启动";
|
||||
}
|
||||
}
|
||||
|
||||
function shortName(value: string): string {
|
||||
return titleCaseToken(value).slice(0, 1);
|
||||
function onlineLabel(account: AccountRow): string {
|
||||
return account.online ? "客户端在线" : "客户端离线";
|
||||
}
|
||||
|
||||
function showActionNotification(
|
||||
type: "success" | "info",
|
||||
title: string,
|
||||
description: string,
|
||||
) {
|
||||
notification[type]({
|
||||
message: title,
|
||||
description,
|
||||
placement: "topRight",
|
||||
duration: 3.2,
|
||||
});
|
||||
}
|
||||
|
||||
async function bindPlatform(platformId: string) {
|
||||
bindPendingPlatformId.value = platformId;
|
||||
|
||||
try {
|
||||
const account = await window.desktopBridge.app.bindPublishAccount(platformId);
|
||||
const platformLabel = desktopMonitoringMediaCatalog.find((item) => item.id === platformId)?.label ?? platformId;
|
||||
showActionNotification("success", "绑定成功", `${account.display_name} 已绑定到 ${platformLabel}`);
|
||||
await refreshAccounts();
|
||||
} catch (error) {
|
||||
showClientActionError("bind-account", error);
|
||||
} finally {
|
||||
bindPendingPlatformId.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
async function openPlatform(account: AccountRow) {
|
||||
openPendingAccountId.value = account.id;
|
||||
|
||||
try {
|
||||
await window.desktopBridge.app.openPublishAccountConsole({
|
||||
id: account.id,
|
||||
platform: account.platform,
|
||||
platformUid: account.platformUid,
|
||||
displayName: account.displayName,
|
||||
});
|
||||
} catch (error) {
|
||||
showClientActionError("open-console", error);
|
||||
} finally {
|
||||
openPendingAccountId.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
async function unbindPlatform(account: AccountRow) {
|
||||
unbindPendingAccountId.value = account.id;
|
||||
|
||||
try {
|
||||
await window.desktopBridge.app.unbindPublishAccount(account.id, account.syncVersion);
|
||||
showActionNotification("info", "解绑成功", `${account.displayName} 已从 ${desktopMonitoringMediaCatalog.find((item) => item.id === account.platform)?.label ?? account.platform} 移除`);
|
||||
await refreshAccounts();
|
||||
} catch (error) {
|
||||
showClientActionError("unbind-account", error);
|
||||
} finally {
|
||||
unbindPendingAccountId.value = null;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="media-view">
|
||||
<section class="media-view__top-card">
|
||||
<div class="media-view__header">
|
||||
<div class="media-view__header-title">
|
||||
<p class="eyebrow" style="color: #8c8c8c; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 6px;">AI PLATFORMS</p>
|
||||
<section class="page-container">
|
||||
<section class="hero-card">
|
||||
<div class="hero-header">
|
||||
<div class="hero-title">
|
||||
<p class="eyebrow">AI PLATFORMS</p>
|
||||
<h2>AI 平台管理</h2>
|
||||
<p class="summary" style="margin-top: 10px; line-height: 1.6; color: #595959; font-size: 13px; max-width: 800px;">
|
||||
AI 平台按“每个平台只绑定一个账号”建模,所以这里直接看本机缓存下的绑定状态、会话热度和过期情况。
|
||||
<p class="summary">
|
||||
首次点击“授权”会打开前台登录窗口,登录完成后绑定到当前 partition。后续数据抓取与巡检一律走隐藏窗口,用户看不见采集过程。
|
||||
</p>
|
||||
</div>
|
||||
<div class="media-view__header-actions">
|
||||
<a-button :loading="loading" @click="refreshAccounts">
|
||||
<div class="hero-actions">
|
||||
<a-button type="primary" ghost class="modern-btn" :loading="loading" @click="refreshAccounts">
|
||||
<template #icon><ReloadOutlined /></template>
|
||||
刷新数据
|
||||
刷新状态
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="overview-strip border-t">
|
||||
<div class="overview-chip">
|
||||
<span>已绑定平台</span>
|
||||
<strong>{{ overview.bound }}</strong>
|
||||
|
||||
<div class="stats-strip">
|
||||
<div class="stat-card">
|
||||
<div class="stat-label">支持平台</div>
|
||||
<div class="stat-value">{{ overview.configuredPlatforms }}</div>
|
||||
</div>
|
||||
<div class="overview-chip">
|
||||
<span>正常可用</span>
|
||||
<strong>{{ overview.live }}</strong>
|
||||
<div class="stat-card">
|
||||
<div class="stat-label">已绑定</div>
|
||||
<div class="stat-value">{{ overview.bound }}</div>
|
||||
</div>
|
||||
<div class="overview-chip">
|
||||
<span>待处理</span>
|
||||
<strong>{{ overview.attention }}</strong>
|
||||
<div class="stat-card">
|
||||
<div class="stat-label">授权正常</div>
|
||||
<div class="stat-value">{{ overview.live }}</div>
|
||||
</div>
|
||||
<div class="overview-chip">
|
||||
<span>支持平台</span>
|
||||
<strong>{{ overview.configuredPlatforms }}</strong>
|
||||
<div class="stat-card">
|
||||
<div class="stat-label">在线客户端</div>
|
||||
<div class="stat-value">{{ overview.onlineClients }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="media-list-wrapper panel">
|
||||
<div class="media-list-content">
|
||||
<p class="eyebrow" style="color: #8c8c8c; font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; margin-bottom: 6px;">SINGLE BINDING</p>
|
||||
<h4 class="media-list-title" style="font-size: 16px; margin-bottom: 8px;">每个平台最多绑定一个 AI 账号</h4>
|
||||
<p class="media-list-desc">这里使用桌面端内置的 AI 平台目录。当前以 DeepSeek、通义千问、豆包为一平台一绑定模型。</p>
|
||||
|
||||
<section class="media-grid">
|
||||
<article
|
||||
v-for="platform in platformCards"
|
||||
:key="platform.id"
|
||||
class="media-card"
|
||||
:class="platform.account ? 'media-card--bound' : 'media-card--unbound'"
|
||||
@click="handleCardClick"
|
||||
>
|
||||
<div class="media-card__head">
|
||||
<div class="media-card__identity">
|
||||
<span class="media-card__badge" :style="{ backgroundColor: platform.accent + '15', color: platform.accent, borderColor: platform.accent + '30' }">
|
||||
{{ platform.shortName || shortName(platform.label) }}
|
||||
</span>
|
||||
<div class="media-card__identity-text">
|
||||
<h3>{{ platform.label }}</h3>
|
||||
<p>{{ platform.description }}</p>
|
||||
</div>
|
||||
<section class="content-section">
|
||||
<div class="section-header">
|
||||
<h3 class="section-title">支持的大模型</h3>
|
||||
</div>
|
||||
|
||||
<div class="grid-layout">
|
||||
<article
|
||||
v-for="platform in platformCards"
|
||||
:key="platform.id"
|
||||
class="modern-card"
|
||||
:class="platform.account ? 'is-bound' : 'is-unbound'"
|
||||
>
|
||||
<div class="card-header">
|
||||
<div class="brand-info">
|
||||
<div
|
||||
class="brand-logo"
|
||||
:style="{ backgroundColor: `${platform.accent}14`, color: platform.accent, border: `1px solid ${platform.accent}24` }"
|
||||
>
|
||||
{{ platform.shortName }}
|
||||
</div>
|
||||
<div class="brand-text">
|
||||
<h4>{{ platform.label }}</h4>
|
||||
<p>{{ platform.description }}</p>
|
||||
</div>
|
||||
|
||||
<a-tag :color="platform.account ? (platform.account.health === 'live' ? 'green' : 'orange') : 'default'" style="margin: 0; border-radius: 12px; font-size: 12px; border: 1px solid #e6edf5;">
|
||||
{{ authLabel(platform.account) }}
|
||||
</a-tag>
|
||||
</div>
|
||||
<a-tag :color="authColor(platform.account)" class="status-tag">
|
||||
{{ authLabel(platform.account) }}
|
||||
</a-tag>
|
||||
</div>
|
||||
|
||||
<div v-if="platform.account" class="account-shell">
|
||||
<div class="account-row-info">
|
||||
<span>当前账号</span>
|
||||
<strong>{{ platform.account.displayName }}</strong>
|
||||
<div v-if="platform.account" class="card-body">
|
||||
<div class="info-list">
|
||||
<div class="info-row">
|
||||
<span class="info-label">当前账号</span>
|
||||
<span class="info-value primary-text">{{ platform.account.displayName }}</span>
|
||||
</div>
|
||||
<div class="account-row-info">
|
||||
<span>平台 UID</span>
|
||||
<strong>{{ platform.account.platformUid }}</strong>
|
||||
<div class="info-row">
|
||||
<span class="info-label">平台 UID</span>
|
||||
<span class="info-value mono-text" :title="platform.account.platformUid">{{ platform.account.platformUid }}</span>
|
||||
</div>
|
||||
<div class="account-row-info">
|
||||
<span>本地会话</span>
|
||||
<strong>{{ sessionLabel(platform.account) }}</strong>
|
||||
<div class="info-row">
|
||||
<span class="info-label">本地会话</span>
|
||||
<span class="info-value">{{ sessionLabel(platform.account) }}</span>
|
||||
</div>
|
||||
<div class="account-row-info">
|
||||
<span>最近同步</span>
|
||||
<strong>{{ formatDateTime(platform.account.lastSyncAt) }}</strong>
|
||||
</div>
|
||||
|
||||
<div class="status-row-badges">
|
||||
<a-badge :status="sessionTone(platform.account) as any" :text="`Session: ${platform.account.sessionState}`" />
|
||||
<a-badge :status="platform.account.online ? 'success' : 'warning'" :text="platform.account.online ? 'Online' : 'Offline'" style="margin-left: 16px;" />
|
||||
<div class="info-row">
|
||||
<span class="info-label">最近同步</span>
|
||||
<span class="info-value">{{ formatDateTime(platform.account.lastSyncAt) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-else class="empty-card-inner">
|
||||
<strong>当前未绑定账号</strong>
|
||||
<p>这个平台现在还没有登录态。后续接入真实登录流后,可以在这里发起单平台绑定。</p>
|
||||
<div class="card-footer">
|
||||
<div class="online-status">
|
||||
<a-badge :status="platform.account.online ? 'success' : 'default'" :text="onlineLabel(platform.account)" />
|
||||
</div>
|
||||
<div class="action-group">
|
||||
<a-tooltip title="打开平台" placement="top">
|
||||
<a-button
|
||||
type="text"
|
||||
class="action-btn"
|
||||
:loading="openPendingAccountId === platform.account.id"
|
||||
@click="openPlatform(platform.account)"
|
||||
>
|
||||
<template #icon><LinkOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
<a-popconfirm
|
||||
title="确认解绑这个 AI 账号吗?"
|
||||
ok-text="解绑"
|
||||
cancel-text="取消"
|
||||
@confirm="unbindPlatform(platform.account)"
|
||||
>
|
||||
<a-tooltip title="解绑" placement="top">
|
||||
<a-button
|
||||
type="text"
|
||||
class="action-btn danger-btn"
|
||||
:loading="unbindPendingAccountId === platform.account.id"
|
||||
>
|
||||
<template #icon><DeleteOutlined /></template>
|
||||
</a-button>
|
||||
</a-tooltip>
|
||||
</a-popconfirm>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="platform.duplicate" style="margin-top: 12px;">
|
||||
<a-alert type="error" show-icon message="发现多个账号绑定到同一 AI 平台,这和当前“一平台一绑定”的约束冲突。" banner />
|
||||
<div v-else class="card-empty-state">
|
||||
<div class="empty-content">
|
||||
<h5>当前未绑定账号</h5>
|
||||
<p>首次授权会打开登录窗口;绑定完成后,后续监测统一在隐藏窗口里静默执行。</p>
|
||||
</div>
|
||||
</article>
|
||||
</section>
|
||||
<a-button
|
||||
type="primary"
|
||||
class="auth-btn"
|
||||
:loading="bindPendingPlatformId === platform.id"
|
||||
@click="bindPlatform(platform.id)"
|
||||
>
|
||||
立即授权
|
||||
<template #icon><ArrowRightOutlined /></template>
|
||||
</a-button>
|
||||
</div>
|
||||
|
||||
<div v-if="platform.duplicateCount > 0" class="card-alert">
|
||||
<a-alert
|
||||
type="warning"
|
||||
show-icon
|
||||
banner
|
||||
>
|
||||
<template #message>
|
||||
发现额外 {{ platform.duplicateCount }} 个同平台账号缓存,当前卡片只保留主账号展示。
|
||||
</template>
|
||||
<template #icon><WarningOutlined /></template>
|
||||
</a-alert>
|
||||
</div>
|
||||
</article>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.media-view {
|
||||
.page-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.media-view__top-card {
|
||||
background: #fff;
|
||||
border: 1px solid #e6edf5;
|
||||
border-radius: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.media-view__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.media-view__header-title h2 {
|
||||
margin: 0;
|
||||
font-size: 24px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.overview-strip {
|
||||
display: flex;
|
||||
background: #fafafb;
|
||||
padding: 16px 24px;
|
||||
gap: 32px;
|
||||
padding-bottom: 40px;
|
||||
max-width: 1400px;
|
||||
}
|
||||
|
||||
.border-t {
|
||||
border-top: 1px solid #e6edf5;
|
||||
}
|
||||
|
||||
.overview-chip {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
/* Hero Section */
|
||||
.hero-card {
|
||||
background: #ffffff;
|
||||
border: 1px solid #e6edf5;
|
||||
padding: 16px 20px;
|
||||
border-radius: 12px;
|
||||
min-width: 140px;
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.02);
|
||||
}
|
||||
|
||||
.overview-chip span {
|
||||
font-size: 13px;
|
||||
color: #8c8c8c;
|
||||
}
|
||||
|
||||
.overview-chip strong {
|
||||
margin-top: 6px;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.panel {
|
||||
background: #ffffff;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e6edf5;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.media-list-wrapper {
|
||||
border-radius: 20px;
|
||||
border: 1px solid #eef2f6;
|
||||
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -2px rgba(0, 0, 0, 0.01);
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.media-list-content {
|
||||
padding: 24px;
|
||||
}
|
||||
|
||||
.media-list-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
.media-list-desc {
|
||||
font-size: 13px;
|
||||
color: #8c8c8c;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.media-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.media-card {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
padding: 20px;
|
||||
border: 1px solid #e6edf5;
|
||||
border-radius: 12px;
|
||||
background: #fafafb;
|
||||
transition: all 0.2s ease;
|
||||
.hero-header {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.media-card:hover {
|
||||
border-color: #1677ff;
|
||||
box-shadow: 0 8px 24px rgba(22, 119, 255, 0.06);
|
||||
}
|
||||
|
||||
.media-card--bound {
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.media-card__head {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
margin-bottom: 16px;
|
||||
align-items: flex-start;
|
||||
padding: 36px 40px;
|
||||
}
|
||||
|
||||
.media-card__identity {
|
||||
.eyebrow {
|
||||
margin: 0 0 12px;
|
||||
color: #64748b;
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.hero-title h2 {
|
||||
margin: 0;
|
||||
font-size: 32px;
|
||||
font-weight: 800;
|
||||
color: #0f172a;
|
||||
letter-spacing: -0.02em;
|
||||
}
|
||||
|
||||
.summary {
|
||||
margin: 16px 0 0;
|
||||
max-width: 800px;
|
||||
color: #475569;
|
||||
line-height: 1.6;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.modern-btn {
|
||||
border-radius: 8px;
|
||||
height: 40px;
|
||||
padding: 0 20px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Stats Strip */
|
||||
.stats-strip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 24px 40px;
|
||||
background: #f8fafc;
|
||||
border-top: 1px solid #eef2f6;
|
||||
gap: 40px;
|
||||
}
|
||||
|
||||
.media-card__badge {
|
||||
display: inline-flex;
|
||||
.stat-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.stat-label {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #64748b;
|
||||
}
|
||||
|
||||
.stat-value {
|
||||
font-size: 40px;
|
||||
font-weight: 700;
|
||||
color: #0f172a;
|
||||
line-height: 1;
|
||||
font-feature-settings: "tnum";
|
||||
}
|
||||
|
||||
/* Content Section Elements */
|
||||
.content-section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
margin: 0;
|
||||
font-size: 20px;
|
||||
font-weight: 700;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.section-desc {
|
||||
margin: 8px 0 0;
|
||||
color: #64748b;
|
||||
font-size: 15px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.grid-layout {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
/* Modern Card Design */
|
||||
.modern-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #ffffff;
|
||||
border-radius: 20px;
|
||||
border: 1px solid #e2e8f0;
|
||||
padding: 28px;
|
||||
min-height: 380px;
|
||||
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.02);
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.modern-card:hover {
|
||||
transform: translateY(-4px);
|
||||
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
|
||||
border-color: #cbd5e1;
|
||||
}
|
||||
|
||||
/* Card Header */
|
||||
.card-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
|
||||
.brand-info {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.brand-logo {
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
border-radius: 50%;
|
||||
font-size: 18px;
|
||||
border-radius: 14px;
|
||||
font-size: 22px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.media-card__identity-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.brand-text h4 {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.media-card__identity-text h3 {
|
||||
.brand-text p {
|
||||
margin: 4px 0 0;
|
||||
color: #64748b;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.status-tag {
|
||||
margin: 0;
|
||||
color: #1a1a1a;
|
||||
font-size: 15px;
|
||||
border-radius: 9999px;
|
||||
padding: 4px 12px;
|
||||
font-weight: 600;
|
||||
font-size: 13px;
|
||||
border: 1px solid transparent; /* adjusted dynamically by Ant normally, but let's reset slightly */
|
||||
}
|
||||
|
||||
/* Card Body & Info List */
|
||||
.card-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.info-list {
|
||||
background: #f8fafc;
|
||||
border-radius: 12px;
|
||||
padding: 4px 0;
|
||||
margin-bottom: 24px;
|
||||
border: 1px solid #f1f5f9;
|
||||
}
|
||||
|
||||
.info-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid #f1f5f9;
|
||||
}
|
||||
|
||||
.info-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.info-label {
|
||||
color: #64748b;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.info-value {
|
||||
font-size: 14px;
|
||||
color: #334155;
|
||||
font-weight: 500;
|
||||
max-width: 200px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.primary-text {
|
||||
color: #0f172a;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.media-card__identity-text p {
|
||||
margin: 2px 0 0;
|
||||
color: #8c8c8c;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.account-shell {
|
||||
background: #fafafb;
|
||||
border: 1px solid #e6edf5;
|
||||
padding: 16px;
|
||||
border-radius: 8px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.empty-card-inner {
|
||||
background: #ffffff;
|
||||
border: 1px solid #f0f0f0;
|
||||
padding: 16px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.empty-card-inner strong {
|
||||
display: block;
|
||||
.mono-text {
|
||||
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
|
||||
font-size: 13px;
|
||||
color: #1a1a1a;
|
||||
color: #475569;
|
||||
}
|
||||
|
||||
.empty-card-inner p {
|
||||
margin: 6px 0 0;
|
||||
color: #8c8c8c;
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.account-row-info {
|
||||
/* Card Footer */
|
||||
.card-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
font-size: 13px;
|
||||
margin-top: auto;
|
||||
padding-top: 20px;
|
||||
border-top: 1px dashed #e2e8f0;
|
||||
}
|
||||
|
||||
.account-row-info span {
|
||||
color: #8c8c8c;
|
||||
.action-group {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.account-row-info strong {
|
||||
color: #1a1a1a;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.status-row-badges {
|
||||
margin-top: 6px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px dashed #e6edf5;
|
||||
.action-btn {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 8px;
|
||||
color: #64748b;
|
||||
transition: all 0.2s ease;
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
.action-btn:hover {
|
||||
background: #f1f5f9;
|
||||
color: #0ea5e9;
|
||||
border-color: #e2e8f0;
|
||||
}
|
||||
|
||||
.danger-btn:hover {
|
||||
background: #fef2f2;
|
||||
color: #ef4444;
|
||||
border-color: #fee2e2;
|
||||
}
|
||||
|
||||
/* Empty State */
|
||||
.card-empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
flex: 1;
|
||||
background: #f8fafc;
|
||||
border-radius: 16px;
|
||||
padding: 24px;
|
||||
border: 1px dashed #cbd5e1;
|
||||
}
|
||||
|
||||
.empty-content h5 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: #0f172a;
|
||||
}
|
||||
|
||||
.empty-content p {
|
||||
margin: 12px 0 0;
|
||||
color: #64748b;
|
||||
line-height: 1.6;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.auth-btn {
|
||||
margin-top: 24px;
|
||||
height: 44px;
|
||||
border-radius: 10px;
|
||||
font-weight: 600;
|
||||
font-size: 15px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card-alert {
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
:deep(.card-alert .ant-alert) {
|
||||
border-radius: 12px;
|
||||
border: none;
|
||||
background: #fffbeb;
|
||||
}
|
||||
|
||||
/* Responsiveness */
|
||||
@media (max-width: 1024px) {
|
||||
.hero-header {
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
.stats-strip {
|
||||
flex-wrap: wrap;
|
||||
gap: 24px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user