chore: trim repo for customer delivery

This commit is contained in:
liumangmang
2026-04-17 17:53:06 +08:00
parent fa1b6707f7
commit 00ccd33961
36 changed files with 565 additions and 3519 deletions
+44 -96
View File
@@ -1,7 +1,7 @@
<script setup lang="ts">
import { computed } from 'vue'
import { useToast } from 'vue-toast-notification'
import { BadgeInfo, Copy, FileCode2, ShieldCheck, X } from 'lucide-vue-next'
import { BadgeInfo, Copy, ShieldCheck, X } from 'lucide-vue-next'
import { useProductStatusStore } from '../stores/productStatus'
import { useConnectionsStore } from '../stores/connections'
import { useActivityLogStore } from '../stores/activityLog'
@@ -26,8 +26,7 @@ const appVersion = computed(() => import.meta.env.VITE_APP_VERSION || '2026.04 S
const diagnostics = computed(() => {
return [
`Version: ${appVersion.value}`,
`Delivery Mode: ${productStatusStore.licenseStatusText}`,
`Environment Fingerprint: ${productStatusStore.machineFingerprint}`,
`First Launch: ${formatTime(productStatusStore.firstLaunchedAt)}`,
`Connections: ${connectionsStore.connections.length}`,
`Transfer Runs: ${transfersStore.runs.length}`,
`Activity Logs: ${activityLogStore.entries.length}`,
@@ -57,16 +56,16 @@ function formatTime(ts: number) {
<template>
<div
v-if="show"
class="fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4"
class="fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-3 sm:p-4"
role="dialog"
aria-modal="true"
aria-label="关于与交付信息"
aria-label="关于与诊断"
>
<div class="w-full max-w-3xl overflow-hidden rounded-xl border border-slate-700 bg-slate-900 shadow-2xl">
<div class="max-h-[90vh] w-full max-w-3xl overflow-hidden rounded-xl border border-slate-700 bg-slate-900 shadow-2xl">
<header class="flex items-center justify-between border-b border-slate-700 px-4 py-3">
<div class="inline-flex items-center gap-2">
<BadgeInfo class="h-4 w-4 text-cyan-300" />
<h2 class="text-sm font-semibold text-slate-100">关于与交付信息</h2>
<h2 class="text-sm font-semibold text-slate-100">关于与诊断</h2>
</div>
<button
type="button"
@@ -78,102 +77,51 @@ function formatTime(ts: number) {
</button>
</header>
<div class="grid gap-4 p-4 lg:grid-cols-[1.1fr_0.9fr]">
<section class="space-y-4">
<div class="rounded-xl border border-slate-800 bg-slate-950/60 p-4">
<p class="text-xs uppercase tracking-[0.18em] text-cyan-300/80">Product</p>
<h3 class="mt-2 text-xl font-semibold text-slate-50">SSH Manager</h3>
<p class="mt-2 text-sm text-slate-400">
当前是源码交付版适合按源码部署脚本和文档一起打包出售重点保留工作区备份恢复批量命令日志和诊断能力
</p>
<div class="mt-4 grid gap-3 sm:grid-cols-2">
<div class="rounded-lg border border-slate-800 bg-slate-900/60 p-3">
<p class="text-xs text-slate-500">版本</p>
<p class="mt-1 text-sm font-medium text-slate-100">{{ appVersion }}</p>
</div>
<div class="rounded-lg border border-slate-800 bg-slate-900/60 p-3">
<p class="text-xs text-slate-500">版本定位</p>
<p class="mt-1 text-sm font-medium text-slate-100">Source Delivery Edition</p>
</div>
</div>
<div class="space-y-4 overflow-y-auto p-4">
<section class="rounded-xl border border-slate-800 bg-slate-950/60 p-4 sm:p-5">
<div class="flex items-center gap-2">
<ShieldCheck class="h-4 w-4 text-cyan-300" />
<h3 class="text-base font-semibold text-slate-50">SSH Manager</h3>
</div>
<p class="mt-3 text-sm leading-6 text-slate-400">
当前版本按源码交付 + Docker 部署方式使用出问题时把下面的诊断信息复制出来发给卖家或自己排查即可
</p>
</section>
<section class="grid gap-3 sm:grid-cols-2 lg:grid-cols-4">
<div class="rounded-xl border border-slate-800 bg-slate-950/60 p-4">
<div class="flex items-center gap-2">
<ShieldCheck class="h-4 w-4 text-emerald-300" />
<h3 class="text-sm font-semibold text-slate-100">交付状态</h3>
</div>
<div class="mt-4 grid gap-3 sm:grid-cols-2">
<div class="rounded-lg border border-slate-800 bg-slate-900/60 p-3">
<p class="text-xs text-slate-500">当前状态</p>
<p class="mt-1 text-sm font-medium text-slate-100">{{ productStatusStore.licenseStatusText }}</p>
</div>
<div class="rounded-lg border border-slate-800 bg-slate-900/60 p-3">
<p class="text-xs text-slate-500">首次启动</p>
<p class="mt-1 text-sm font-medium text-slate-100">{{ formatTime(productStatusStore.firstLaunchedAt) }}</p>
</div>
<div class="rounded-lg border border-slate-800 bg-slate-900/60 p-3 sm:col-span-2">
<p class="text-xs text-slate-500">环境指纹</p>
<p class="mt-1 break-all font-mono text-sm text-slate-100">{{ productStatusStore.machineFingerprint }}</p>
</div>
</div>
<p class="mt-3 text-xs text-slate-500">
当前交付模式不依赖授权码你可以把源码Docker 文件部署文档和售后说明一起交付给客户自行二开或部署
</p>
<p class="text-xs text-slate-500">版本</p>
<p class="mt-1 break-all text-sm font-medium text-slate-100">{{ appVersion }}</p>
</div>
<div class="rounded-xl border border-slate-800 bg-slate-950/60 p-4">
<p class="text-xs text-slate-500">首次启动</p>
<p class="mt-1 text-sm font-medium text-slate-100">{{ formatTime(productStatusStore.firstLaunchedAt) }}</p>
</div>
<div class="rounded-xl border border-slate-800 bg-slate-950/60 p-4">
<p class="text-xs text-slate-500">连接数</p>
<p class="mt-1 text-sm font-medium text-slate-100">{{ connectionsStore.connections.length }}</p>
</div>
<div class="rounded-xl border border-slate-800 bg-slate-950/60 p-4">
<p class="text-xs text-slate-500">传输记录</p>
<p class="mt-1 text-sm font-medium text-slate-100">{{ transfersStore.runs.length }}</p>
</div>
</section>
<section class="space-y-4">
<div class="rounded-xl border border-slate-800 bg-slate-950/60 p-4">
<div class="flex items-center gap-2">
<FileCode2 class="h-4 w-4 text-cyan-300" />
<h3 class="text-sm font-semibold text-slate-100">源码交付建议</h3>
</div>
<p class="mt-2 text-sm text-slate-400">
对外售卖源码版时建议把仓库代码初始化账号说明环境变量模板部署脚本和备份示例一起交付减少来回答疑
</p>
<ul class="mt-4 space-y-2 text-sm text-slate-400">
<li>交付仓库源码与 README/部署文档</li>
<li>附带默认账号环境变量和数据目录说明</li>
<li>说明哪些功能可直接用哪些是二开骨架</li>
<li>保留诊断信息入口方便客户反馈问题时定位环境</li>
</ul>
</div>
<section class="rounded-xl border border-slate-800 bg-slate-950/60 p-4 sm:p-5">
<h3 class="text-sm font-semibold text-slate-100">诊断信息</h3>
<p class="mt-2 text-sm leading-6 text-slate-400">
如果页面异常连接失败或者功能表现不对先复制这段信息再配合截图或报错内容一起发出去
</p>
<button
type="button"
class="mt-4 inline-flex min-h-[44px] w-full items-center justify-center gap-1.5 rounded-md border border-slate-700 px-3 py-2 text-sm text-slate-200 transition-colors hover:bg-slate-800 sm:w-auto"
@click="copyDiagnostics"
>
<Copy class="h-4 w-4" />
<span>复制诊断信息</span>
</button>
<div class="rounded-xl border border-slate-800 bg-slate-950/60 p-4">
<h3 class="text-sm font-semibold text-slate-100">运行摘要</h3>
<div class="mt-4 space-y-3">
<div class="rounded-lg border border-slate-800 bg-slate-900/60 p-3">
<p class="text-xs text-slate-500">连接数</p>
<p class="mt-1 text-sm font-medium text-slate-100">{{ connectionsStore.connections.length }}</p>
</div>
<div class="rounded-lg border border-slate-800 bg-slate-900/60 p-3">
<p class="text-xs text-slate-500">传输历史数</p>
<p class="mt-1 text-sm font-medium text-slate-100">{{ transfersStore.runs.length }}</p>
</div>
<div class="rounded-lg border border-slate-800 bg-slate-900/60 p-3">
<p class="text-xs text-slate-500">操作日志数</p>
<p class="mt-1 text-sm font-medium text-slate-100">{{ activityLogStore.entries.length }}</p>
</div>
</div>
</div>
<div class="rounded-xl border border-slate-800 bg-slate-950/60 p-4">
<h3 class="text-sm font-semibold text-slate-100">售后诊断</h3>
<p class="mt-2 text-sm text-slate-400">
客户反馈问题时可以先复制这份诊断摘要给你用来快速判断版本交付模式和本地数据规模
</p>
<button
type="button"
class="mt-4 inline-flex items-center gap-1.5 rounded-md border border-slate-700 px-3 py-2 text-sm text-slate-200 transition-colors hover:bg-slate-800"
@click="copyDiagnostics"
>
<Copy class="h-4 w-4" />
<span>复制诊断信息</span>
</button>
<pre class="mt-4 overflow-x-auto rounded-lg border border-slate-800 bg-slate-950 px-3 py-3 text-xs text-slate-300"><code>{{ diagnostics }}</code></pre>
</div>
<pre class="mt-4 overflow-x-auto rounded-lg border border-slate-800 bg-slate-950 px-3 py-3 text-xs leading-6 text-slate-300"><code>{{ diagnostics }}</code></pre>
</section>
</div>
</div>