chore: update site about display
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive, onMounted } from 'vue'
|
||||
import { reactive, onMounted, computed } from 'vue'
|
||||
import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Badge } from '@/components/ui/badge'
|
||||
import { Button } from '@/components/ui/button'
|
||||
@@ -13,15 +13,17 @@ const state = reactive({
|
||||
description: '一个现代化的消息推送管理平台,支持多种推送渠道和灵活的消息管理功能。',
|
||||
features: [
|
||||
'多渠道消息推送',
|
||||
'定时消息管理',
|
||||
'定时消息管理',
|
||||
'托管消息服务',
|
||||
'发信日志追踪',
|
||||
'渠道配置管理'
|
||||
'渠道配置管理',
|
||||
'站点信息配置',
|
||||
],
|
||||
techStack: ['Vue 3', 'TypeScript', 'Vite', 'Tailwind CSS', 'Shadcn/ui'],
|
||||
techStack: ['Golang','Vue 3', 'TypeScript', 'Vite', 'Tailwind CSS', 'Shadcn/ui'],
|
||||
githubUrl: 'https://github.com/engigu/Message-Push-Nest',
|
||||
copyright: '保留所有权利.',
|
||||
versionLog: ''
|
||||
versionLog: '',
|
||||
buildTime: ''
|
||||
})
|
||||
|
||||
// 获取关于页面配置
|
||||
@@ -39,8 +41,18 @@ const getAboutConfig = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
// 获取构建时间
|
||||
const buildTime = computed(() => {
|
||||
try {
|
||||
return (globalThis as any).__BUILD_TIME__ || new Date().toISOString()
|
||||
} catch {
|
||||
return new Date().toISOString()
|
||||
}
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
getAboutConfig()
|
||||
state.buildTime = buildTime.value
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -65,30 +77,34 @@ export default {
|
||||
<Badge v-for="tech in state.techStack" :key="tech">{{ tech }}</Badge>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-900 mb-2">功能特性</h3>
|
||||
<ul class="text-sm text-gray-600 space-y-1">
|
||||
<li v-for="feature in state.features" :key="feature">• {{ feature }}</li>
|
||||
</ul>
|
||||
<div class="flex flex-wrap gap-2">
|
||||
<Badge v-for="feature in state.features" :key="feature" variant="secondary">{{ feature }}</Badge>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="space-y-4">
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-900 mb-2">系统信息</h3>
|
||||
<div class="space-y-2 text-sm">
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">版本:</span>
|
||||
<span class="text-gray-600">系统版本:</span>
|
||||
<Badge variant="outline">{{ state.version }}</Badge>
|
||||
</div>
|
||||
<div class="flex justify-between">
|
||||
<!-- <div class="flex justify-between">
|
||||
<span class="text-gray-600">运行环境:</span>
|
||||
<span>Vue 3 + TypeScript</span>
|
||||
</div> -->
|
||||
<div class="flex justify-between">
|
||||
<span class="text-gray-600">构建时间:</span>
|
||||
<span>{{ new Date(state.buildTime).toLocaleString('zh-CN') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<h3 class="font-medium text-gray-900 mb-2">版本日志</h3>
|
||||
<Sheet>
|
||||
@@ -103,8 +119,20 @@ export default {
|
||||
<SheetTitle>版本更新日志</SheetTitle>
|
||||
</SheetHeader>
|
||||
<div class="mt-6">
|
||||
<div class="bg-gray-50 p-4 rounded-lg">
|
||||
<pre class="whitespace-pre-wrap text-sm font-mono">{{ state.versionLog }}</pre>
|
||||
<div class="bg-card text-card-foreground rounded-xl border shadow-sm p-6">
|
||||
<div class="space-y-2 max-h-[70vh] overflow-y-auto">
|
||||
<div v-for="(line, index) in state.versionLog.split('\n').reverse().filter(line => line.trim())" :key="index"
|
||||
class="flex items-start gap-3 p-3 rounded-lg border bg-background hover:bg-accent/50 transition-colors">
|
||||
<div class="w-1.5 h-1.5 rounded-full bg-primary mt-2 shrink-0"></div>
|
||||
<div class="text-sm text-foreground leading-relaxed font-mono">
|
||||
{{ line }}
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!state.versionLog || state.versionLog.trim() === ''" class="text-center py-8 text-muted-foreground">
|
||||
<div class="text-lg mb-2">📝</div>
|
||||
<div class="text-sm">暂无版本日志</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</SheetContent>
|
||||
@@ -112,18 +140,19 @@ export default {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="border-t border-gray-200 my-4"></div>
|
||||
|
||||
|
||||
<div class="text-center text-sm text-gray-500">
|
||||
<p>© {{ new Date().getFullYear() }} {{ state.copyright }}</p>
|
||||
<p class="mt-1">如有问题请联系系统管理员</p>
|
||||
<p class="mt-2">
|
||||
<a :href="state.githubUrl" target="_blank" class="inline-flex items-center gap-1 text-blue-500 hover:text-blue-700 underline">
|
||||
<p>© {{ new Date().getFullYear() }} {{ state.copyright }}
|
||||
<a :href="state.githubUrl" target="_blank"
|
||||
class="inline-flex items-center gap-1 text-blue-500 hover:text-blue-700 underline ml-3">
|
||||
<Github class="w-4 h-4" />
|
||||
GitHub 仓库
|
||||
</a>
|
||||
</p>
|
||||
<p class="mt-1">如有问题请联系系统管理员</p>
|
||||
|
||||
</div>
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="flex items-center justify-between">
|
||||
<div class="text-sm text-gray-500">
|
||||
共 {{ total }} 条记录,第 {{ currentPage }} / {{ totalPages }} 页
|
||||
共 {{ total }} 条记录
|
||||
</div>
|
||||
|
||||
<div class="flex justify-end">
|
||||
|
||||
Vendored
+4
-1
@@ -6,4 +6,7 @@ interface ImportMetaEnv {
|
||||
|
||||
interface ImportMeta {
|
||||
readonly env: ImportMetaEnv
|
||||
}
|
||||
}
|
||||
|
||||
// 全局构建时间变量
|
||||
declare const __BUILD_TIME__: string
|
||||
@@ -20,5 +20,8 @@ export default defineConfig({
|
||||
'@': path.resolve(__dirname, './src'),
|
||||
},
|
||||
},
|
||||
define: {
|
||||
__BUILD_TIME__: JSON.stringify(new Date().toISOString()),
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user