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 {
|
||||
|
||||
Reference in New Issue
Block a user