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 文档同步口径。
This commit is contained in:
@@ -2,15 +2,21 @@
|
||||
import { computed } from "vue";
|
||||
import { RouterLink, RouterView, useRoute } from "vue-router";
|
||||
|
||||
import StatusBadge from "./StatusBadge.vue";
|
||||
import { useDesktopRuntime } from "../composables/useDesktopRuntime";
|
||||
import { useDesktopSession } from "../composables/useDesktopSession";
|
||||
import { formatRelativeTime } from "../lib/formatters";
|
||||
import { desktopMonitoringMediaCatalog, desktopPublishMediaCatalog } from "../lib/media-catalog";
|
||||
|
||||
const route = useRoute();
|
||||
const { snapshot, error } = useDesktopRuntime();
|
||||
const { session, logout, isPreviewMode } = useDesktopSession();
|
||||
const { snapshot, error, refreshAccounts } = useDesktopRuntime();
|
||||
const { session, logout } = useDesktopSession();
|
||||
|
||||
const accountAwareRoutes = new Set(["/media-platforms", "/ai-platforms"]);
|
||||
|
||||
function handleNavClick(target: string) {
|
||||
if (accountAwareRoutes.has(target)) {
|
||||
void refreshAccounts();
|
||||
}
|
||||
}
|
||||
|
||||
const navItems = computed(() => {
|
||||
const data = snapshot.value;
|
||||
@@ -26,10 +32,10 @@ const navItems = computed(() => {
|
||||
count: data?.summary.issuesOpen ?? 0,
|
||||
},
|
||||
{
|
||||
to: "/tasks",
|
||||
title: "任务中心",
|
||||
description: "MQ 投递、租约占用、人工审核与 fallback",
|
||||
count: data?.tasks.length ?? 0,
|
||||
to: "/publish-management",
|
||||
title: "发布管理",
|
||||
description: "查看待发布队列、历史发送结果,并对文章再次发送",
|
||||
count: data?.summary.queuedTasks ?? 0,
|
||||
},
|
||||
{
|
||||
to: "/media-platforms",
|
||||
@@ -53,11 +59,8 @@ const navItems = computed(() => {
|
||||
});
|
||||
|
||||
|
||||
const updatedLabel = computed(() =>
|
||||
snapshot.value ? formatRelativeTime(snapshot.value.generatedAt) : "等待首帧快照",
|
||||
);
|
||||
const operatorName = computed(() => session.value?.user?.name ?? "未命名操作员");
|
||||
const operatorEmail = computed(() => session.value?.user?.email ?? "preview@geo-rankly.local");
|
||||
const operatorEmail = computed(() => session.value?.user?.email ?? "");
|
||||
const clientLabel = computed(
|
||||
() => session.value?.desktopClient?.device_name ?? "当前设备尚未注册 client",
|
||||
);
|
||||
@@ -66,53 +69,25 @@ const clientLabel = computed(
|
||||
<template>
|
||||
<div class="app-shell">
|
||||
<aside class="sidebar">
|
||||
<div class="sidebar-top">
|
||||
<div class="brand-block">
|
||||
<div class="brand-mark">
|
||||
<span class="brand-ring"></span>
|
||||
<span class="brand-core"></span>
|
||||
</div>
|
||||
<div>
|
||||
<p class="eyebrow">Workspace Cockpit</p>
|
||||
<h1>GEO Rankly Desktop</h1>
|
||||
</div>
|
||||
<div class="brand-block">
|
||||
<div class="brand-mark">
|
||||
<span class="brand-ring"></span>
|
||||
<span class="brand-core"></span>
|
||||
</div>
|
||||
<div>
|
||||
<p class="eyebrow">Workspace Cockpit</p>
|
||||
<h1>GEO Rankly Desktop</h1>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<section class="workspace-card">
|
||||
<div class="workspace-topline">
|
||||
<StatusBadge
|
||||
:tone="snapshot?.previewMode || isPreviewMode ? 'brand' : 'success'"
|
||||
:label="snapshot?.previewMode || isPreviewMode ? 'Preview Runtime' : 'Live Runtime'"
|
||||
/>
|
||||
<StatusBadge
|
||||
v-if="snapshot"
|
||||
tone="info"
|
||||
:label="`Sync: ${updatedLabel}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="workspace-meta">
|
||||
<div>
|
||||
<span>在线客户端</span>
|
||||
<strong>{{ snapshot?.summary.onlineClients ?? 0 }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>绑定账号</span>
|
||||
<strong>{{ snapshot?.summary.accountsBound ?? 0 }}</strong>
|
||||
</div>
|
||||
<div>
|
||||
<span>待处理任务</span>
|
||||
<strong>{{ snapshot?.summary.queuedTasks ?? 0 }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<nav class="nav">
|
||||
<RouterLink
|
||||
v-for="item in navItems"
|
||||
<nav class="nav">
|
||||
<RouterLink
|
||||
v-for="item in navItems"
|
||||
:key="item.to"
|
||||
:to="item.to"
|
||||
class="nav-link"
|
||||
:class="{ active: route.path === item.to }"
|
||||
@click="handleNavClick(item.to)"
|
||||
>
|
||||
<div class="nav-copy">
|
||||
<strong>{{ item.title }}</strong>
|
||||
@@ -120,19 +95,20 @@ const clientLabel = computed(
|
||||
<span class="nav-count">{{ item.count }}</span>
|
||||
</RouterLink>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
<footer class="sidebar-footer">
|
||||
<section class="operator-card">
|
||||
<div class="operator-topline">
|
||||
<div>
|
||||
<span class="label">当前操作员</span>
|
||||
<section class="user-profile-panel">
|
||||
<div class="user-info-row">
|
||||
<div class="user-avatar">{{ operatorName.charAt(0).toUpperCase() }}</div>
|
||||
<div class="user-details">
|
||||
<strong>{{ operatorName }}</strong>
|
||||
<p>{{ operatorEmail }}</p>
|
||||
</div>
|
||||
<button type="button" class="logout-button" @click="logout">退出</button>
|
||||
</div>
|
||||
<p>{{ operatorEmail }}</p>
|
||||
<small>{{ clientLabel }}</small>
|
||||
<div class="user-actions-row">
|
||||
<span class="device-tag">{{ clientLabel }}</span>
|
||||
<button type="button" class="logout-link" @click="logout">退出</button>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -165,20 +141,12 @@ const clientLabel = computed(
|
||||
overflow-y: auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
gap: 24px;
|
||||
padding: 24px;
|
||||
border-right: 1px solid #e6edf5;
|
||||
background: #ffffff;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.sidebar-top {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.brand-block {
|
||||
display: flex;
|
||||
gap: 16px;
|
||||
@@ -228,59 +196,11 @@ h1 {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.workspace-card,
|
||||
.operator-card {
|
||||
padding: 16px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e6edf5;
|
||||
background: #fafafb;
|
||||
}
|
||||
|
||||
.workspace-topline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.operator-topline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.operator-topline strong {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
.workspace-meta {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.workspace-meta span,
|
||||
.footer-row span,
|
||||
.label {
|
||||
display: block;
|
||||
color: #8c8c8c;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.workspace-meta strong {
|
||||
display: block;
|
||||
margin-top: 4px;
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: grid;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
margin: auto 0;
|
||||
}
|
||||
|
||||
.nav-link {
|
||||
@@ -349,41 +269,96 @@ h1 {
|
||||
padding-top: 16px;
|
||||
}
|
||||
|
||||
.operator-card {
|
||||
padding: 16px;
|
||||
border-radius: 16px;
|
||||
border: 1px solid #e6edf5;
|
||||
background: #ffffff;
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
|
||||
.user-profile-panel {
|
||||
padding: 14px;
|
||||
border-radius: 10px;
|
||||
background: #f8fafc;
|
||||
border: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
.operator-card p,
|
||||
.operator-card small {
|
||||
.user-info-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.user-avatar {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
border-radius: 50%;
|
||||
background: #e0e7ff;
|
||||
color: #4f46e5;
|
||||
font-weight: 700;
|
||||
font-size: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.user-details {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.user-details strong {
|
||||
display: block;
|
||||
margin: 6px 0 0;
|
||||
color: #8c8c8c;
|
||||
font-size: 13px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #0f172a;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.operator-card small {
|
||||
.user-details p {
|
||||
margin: 2px 0 0;
|
||||
font-size: 12px;
|
||||
color: #64748b;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.logout-button {
|
||||
height: 28px;
|
||||
padding: 0 12px;
|
||||
border-radius: 14px;
|
||||
border: 1px solid #d9d9d9;
|
||||
background: #fff;
|
||||
color: #595959;
|
||||
.user-actions-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-top: 14px;
|
||||
padding-top: 14px;
|
||||
border-top: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
.device-tag {
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: #475569;
|
||||
background: #f1f5f9;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #e2e8f0;
|
||||
}
|
||||
|
||||
.logout-link {
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
color: #ef4444;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.logout-button:hover {
|
||||
color: #ff4d4f;
|
||||
border-color: #ff4d4f;
|
||||
.logout-link:hover {
|
||||
background: #fef2f2;
|
||||
}
|
||||
|
||||
.footer-row span {
|
||||
display: block;
|
||||
color: #595959;
|
||||
font-weight: 600;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.footer-row {
|
||||
|
||||
@@ -1,16 +1,26 @@
|
||||
<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'">
|
||||
<p class="eyebrow">{{ eyebrow }}</p>
|
||||
<strong class="value">{{ value }}</strong>
|
||||
<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>
|
||||
@@ -19,30 +29,47 @@ defineProps<{
|
||||
.metric-card {
|
||||
padding: 20px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e6edf5;
|
||||
background: #ffffff;
|
||||
border: 1px solid #f0f3fa;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: box-shadow 0.2s, transform 0.2s;
|
||||
}
|
||||
|
||||
.metric-card.brand {
|
||||
border-top: 3px solid #1677ff;
|
||||
.metric-card:hover {
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.metric-card.success {
|
||||
border-top: 3px solid #52c41a;
|
||||
.metric-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.metric-card.warn {
|
||||
border-top: 3px solid #faad14;
|
||||
.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-card.danger {
|
||||
border-top: 3px solid #ff4d4f;
|
||||
}
|
||||
.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-card.info {
|
||||
border-top: 3px solid #13c2c2;
|
||||
.metric-title-group {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.eyebrow,
|
||||
@@ -52,24 +79,40 @@ defineProps<{
|
||||
|
||||
.eyebrow {
|
||||
color: #8c8c8c;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.value {
|
||||
display: block;
|
||||
margin-top: 12px;
|
||||
font-size: 28px;
|
||||
font-weight: 600;
|
||||
color: #1a1a1a;
|
||||
line-height: 1;
|
||||
font-size: 24px;
|
||||
font-weight: 800;
|
||||
color: #141414;
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.label {
|
||||
margin-top: 8px;
|
||||
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>
|
||||
|
||||
@@ -17,15 +17,15 @@ const props = defineProps<{
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 26px;
|
||||
padding: 0 10px;
|
||||
border-radius: 999px;
|
||||
min-height: 24px;
|
||||
padding: 0 8px;
|
||||
border-radius: 6px;
|
||||
border: 1px solid var(--geo-color-border);
|
||||
background: rgba(255, 255, 255, 0.42);
|
||||
color: var(--geo-color-text-secondary);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
letter-spacing: 0.02em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.subtle {
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
import { PlaySquareOutlined } from "@ant-design/icons-vue";
|
||||
|
||||
defineProps<{
|
||||
eyebrow?: string;
|
||||
title: string;
|
||||
@@ -9,23 +11,31 @@ defineProps<{
|
||||
<template>
|
||||
<section class="surface-card">
|
||||
<header class="header">
|
||||
<div>
|
||||
<p v-if="eyebrow" class="eyebrow">{{ eyebrow }}</p>
|
||||
<h3>{{ title }}</h3>
|
||||
<div class="header-content">
|
||||
<h3 class="panel-title">{{ title }}</h3>
|
||||
<p v-if="description" class="description">{{ description }}</p>
|
||||
</div>
|
||||
<slot name="action" />
|
||||
</header>
|
||||
<p v-if="description" class="description">{{ description }}</p>
|
||||
<slot />
|
||||
<div class="card-body">
|
||||
<slot />
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.surface-card {
|
||||
padding: 24px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid #e6edf5;
|
||||
background: #ffffff;
|
||||
border-radius: 12px;
|
||||
padding: 24px;
|
||||
border: 1px solid #f0f3fa;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: box-shadow 0.2s;
|
||||
}
|
||||
|
||||
.surface-card:hover {
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.header {
|
||||
@@ -33,32 +43,44 @@ defineProps<{
|
||||
align-items: flex-start;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.eyebrow,
|
||||
.description,
|
||||
h3 {
|
||||
.header-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.panel-title {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
color: #8c8c8c;
|
||||
font-size: 11px;
|
||||
letter-spacing: 0.1em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h3 {
|
||||
margin-top: 4px;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
font-weight: 700;
|
||||
color: #1a1a1a;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.panel-title::before {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 4px;
|
||||
height: 14px;
|
||||
background: #1677ff;
|
||||
border-radius: 2px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.description {
|
||||
margin-top: 8px;
|
||||
margin: 0;
|
||||
color: #8c8c8c;
|
||||
font-size: 13px;
|
||||
line-height: 1.6;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user