feat: 交付任务005-021全量改动(自动化/AI/联系人中心、消息中心改造、运维与容器化)
- 自动化中心:规则引擎、流程画布与触发器(V7/V10/V12/V18/V21)、测试全流程、安全边界、执行记录 - AI 中心:服务商/模型/调用与工具授权/治理(V8/V17)及配套前端页面 - 联系人中心:联系人目录、分组/标签、同步幂等(V19)与实装页面 - 消息中心:三栏布局重做、头像昵称服务端抓取与缓存(V16 conversation_profile)、出站归属修复 - 接入管理:NapCat 反向 WS/HTTP 回调多通道发送传输、连接状态统一口径 - 运维中心:备份保留与恢复确认(V13/V22/V24)、监控告警(V23)、日志与审计 - 全局:账号上下文切换(V20 account_profile)、统一 UI 基础组件、分页样式、Flyway 增量迁移护栏 - 部署:Dockerfile/docker-compose/Nginx 容器化编排与 CI 校验脚本 - 文档:任务 005-021 交付记录、设计画板导出、接口/数据库/架构文档同步
This commit is contained in:
@@ -0,0 +1,182 @@
|
||||
<script setup>
|
||||
import AvatarBadge from '../AvatarBadge.vue'
|
||||
|
||||
defineProps({
|
||||
conversation: { type: Object, default: null },
|
||||
bindingLabel: { type: String, default: '' },
|
||||
connected: { type: Boolean, default: false },
|
||||
connectionText: { type: String, default: '未连接' },
|
||||
connectionReason: { type: String, default: '' },
|
||||
messageTotal: { type: Number, default: 0 },
|
||||
refreshing: { type: Boolean, default: false }
|
||||
})
|
||||
|
||||
defineEmits(['search', 'refresh'])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header class="chat-head">
|
||||
<div v-if="conversation" class="chat-identity">
|
||||
<AvatarBadge
|
||||
:media-uid="conversation.avatarMediaUid"
|
||||
:name="conversation.nickname || conversation.name"
|
||||
:type="conversation.type"
|
||||
size="md"
|
||||
/>
|
||||
<div class="head-text">
|
||||
<div class="head-name">
|
||||
<span :class="{ unknown: !conversation.nickname }">{{ conversation.name }}</span>
|
||||
<span class="head-tag">{{ conversation.typeLabel }}</span>
|
||||
</div>
|
||||
<div class="head-sub">
|
||||
<span>{{ conversation.type === 'GROUP' ? '群号' : '账号' }} {{ conversation.account }}</span>
|
||||
<span v-if="bindingLabel"> · 绑定 {{ bindingLabel }}</span>
|
||||
<span> · 共 {{ messageTotal }} 条</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="chat-identity empty">
|
||||
<div class="head-text">
|
||||
<div class="head-name">未选择会话</div>
|
||||
<div class="head-sub">从左侧选择一个会话查看已入库消息。</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="conversation" class="chat-actions">
|
||||
<span class="conn-chip" :class="{ online: connected }" v-tooltip="connectionReason">
|
||||
<i></i>{{ connectionText }}
|
||||
</span>
|
||||
<button class="head-btn" type="button" v-tooltip="'在消息检索中查看该会话'" aria-label="消息检索" @click="$emit('search')">
|
||||
<svg viewBox="0 0 24 24" aria-hidden="true">
|
||||
<circle cx="11" cy="11" r="6.5" />
|
||||
<path d="M20 20l-4-4" />
|
||||
</svg>
|
||||
</button>
|
||||
<button class="head-btn" type="button" v-tooltip="'刷新消息'" aria-label="刷新消息" :disabled="refreshing" @click="$emit('refresh')">
|
||||
<svg viewBox="0 0 24 24" :class="{ spinning: refreshing }" aria-hidden="true">
|
||||
<path d="M20 11a8 8 0 1 0-2.3 5.7" />
|
||||
<path d="M20 4v7h-7" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</header>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.chat-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 16px;
|
||||
flex-shrink: 0;
|
||||
padding: 12px 18px;
|
||||
min-height: 62px;
|
||||
border-bottom: 1px solid #ebedef;
|
||||
background: #fff;
|
||||
}
|
||||
.chat-identity {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 11px;
|
||||
min-width: 0;
|
||||
}
|
||||
.head-name .unknown {
|
||||
color: #9aa1b2;
|
||||
font-weight: 400;
|
||||
}
|
||||
.head-text {
|
||||
min-width: 0;
|
||||
}
|
||||
.head-name {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: #1f2329;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.head-tag {
|
||||
flex-shrink: 0;
|
||||
padding: 1px 6px;
|
||||
border: 1px solid #e3e5e8;
|
||||
border-radius: 4px;
|
||||
color: #8a8f99;
|
||||
font-size: 10px;
|
||||
font-weight: 400;
|
||||
}
|
||||
.head-sub {
|
||||
margin-top: 3px;
|
||||
font-size: 11px;
|
||||
color: #8a8f99;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.chat-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.conn-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
padding: 3px 8px;
|
||||
border-radius: 5px;
|
||||
background: #f3f4f5;
|
||||
color: #8a8f99;
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.conn-chip i {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
border-radius: 50%;
|
||||
background: #c0c4ca;
|
||||
}
|
||||
.conn-chip.online {
|
||||
color: #15803d;
|
||||
background: #eefaf2;
|
||||
}
|
||||
.conn-chip.online i {
|
||||
background: #22c55e;
|
||||
}
|
||||
.head-btn {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
border: 0;
|
||||
border-radius: 7px;
|
||||
background: transparent;
|
||||
color: #6b7078;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
}
|
||||
.head-btn:hover:not(:disabled) {
|
||||
background: #f0f1f3;
|
||||
color: #1f2329;
|
||||
}
|
||||
.head-btn:disabled {
|
||||
cursor: default;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.head-btn svg {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
fill: none;
|
||||
stroke: currentColor;
|
||||
stroke-width: 1.8;
|
||||
stroke-linecap: round;
|
||||
}
|
||||
.head-btn svg.spinning {
|
||||
animation: head-spin 0.9s linear infinite;
|
||||
}
|
||||
@keyframes head-spin {
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user