Files
geo/apps/desktop-client/src/renderer/components/MetricCard.vue
T
root a617d39a4a feat(desktop): drop parked review flow, add publish management
SaaS 侧人工审核后才创建 publish job,desktop 不再做二次审核:移除
manual/waiting_user/parked/from_parked 状态机与 LeaseFromParked 查询,
desktop client 只执行发布并新增"发布管理"页(待发布队列 / 历史 / 再次
发送)。同时抽离 @geo/publisher-platforms 共享适配器包、新增 Redis-based
desktop_presence 与 publish_record_support,刷新 admin-web 发布弹窗与
媒体库;plan A / spec 文档同步口径。
2026-04-20 09:52:48 +08:00

119 lines
3.1 KiB
Vue

<script setup lang="ts">
import type { Component } from 'vue';
defineProps<{
eyebrow: string;
value: string | number;
label: string;
tone?: "neutral" | "brand" | "success" | "warn" | "danger" | "info";
icon?: Component;
}>();
</script>
<template>
<article class="metric-card" :class="tone ?? 'neutral'">
<div class="metric-header">
<div v-if="icon" class="metric-icon-wrapper" :class="tone ?? 'neutral'">
<component :is="icon" />
</div>
<div class="metric-title-group">
<p class="eyebrow">{{ eyebrow }}</p>
<strong class="value">{{ value }}</strong>
</div>
</div>
<p class="label">{{ label }}</p>
</article>
</template>
<style scoped>
.metric-card {
padding: 20px;
border-radius: 12px;
background: #ffffff;
border: 1px solid #f0f3fa;
display: flex;
flex-direction: column;
transition: box-shadow 0.2s, transform 0.2s;
}
.metric-card:hover {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
transform: translateY(-2px);
}
.metric-header {
display: flex;
align-items: center;
gap: 16px;
margin-bottom: 12px;
}
.metric-icon-wrapper {
width: 44px;
height: 44px;
border-radius: 10px;
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
flex-shrink: 0;
}
.metric-icon-wrapper.neutral { background: #f0f2f5; color: #595959; }
.metric-icon-wrapper.brand { background: #e6f4ff; color: #1677ff; }
.metric-icon-wrapper.success { background: #f6ffed; color: #52c41a; }
.metric-icon-wrapper.warn { background: #fffbe6; color: #faad14; }
.metric-icon-wrapper.danger { background: #fff2f0; color: #ff4d4f; }
.metric-icon-wrapper.info { background: #e6f7ff; color: #1890ff; }
.metric-title-group {
display: flex;
flex-direction: column;
justify-content: center;
}
.eyebrow,
.label {
margin: 0;
}
.eyebrow {
color: #8c8c8c;
font-size: 13px;
font-weight: 500;
margin-bottom: 4px;
}
.value {
display: block;
font-size: 24px;
font-weight: 800;
color: #141414;
line-height: 1.1;
}
.label {
color: #8c8c8c;
font-size: 12px;
line-height: 1.5;
border-top: 1px solid #f0f0f0;
padding-top: 12px;
margin-top: auto;
}
html[data-theme="dark"] .metric-card {
background: #141414;
border-color: #303030;
}
html[data-theme="dark"] .metric-icon-wrapper.neutral { background: #262626; color: rgba(255, 255, 255, 0.45); }
html[data-theme="dark"] .metric-icon-wrapper.brand { background: rgba(22, 119, 255, 0.2); color: #177ddc; }
html[data-theme="dark"] .metric-icon-wrapper.success { background: rgba(82, 196, 26, 0.2); color: #49aa19; }
html[data-theme="dark"] .metric-icon-wrapper.warn { background: rgba(250, 173, 20, 0.2); color: #d89614; }
html[data-theme="dark"] .metric-icon-wrapper.danger { background: rgba(255, 77, 79, 0.2); color: #a61d24; }
html[data-theme="dark"] .metric-icon-wrapper.info { background: rgba(24, 144, 255, 0.2); color: #177ddc; }
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .label { color: rgba(255, 255, 255, 0.45); }
html[data-theme="dark"] .value { color: rgba(255, 255, 255, 0.85); }
html[data-theme="dark"] .label { border-top-color: #303030; }
</style>