feat: udpate desc docs

This commit is contained in:
engigu
2026-02-13 20:41:14 +08:00
parent c33a615c90
commit d8a819a4dc
4 changed files with 22 additions and 19 deletions
+11 -11
View File
@@ -15,7 +15,7 @@ const password = ref('')
const loading = ref(false)
const siteTitle = ref('白虎面板')
const siteSubtitle = ref('轻量级定时任务管理系统')
const siteSubtitle = ref('极致轻量、高性能的自动化任务调度平台')
const siteIcon = ref('')
const demoMode = ref(false)
@@ -26,11 +26,11 @@ function loadCachedSettings() {
if (cached) {
const settings = JSON.parse(cached)
siteTitle.value = settings.title || '白虎面板'
siteSubtitle.value = settings.subtitle || '轻量级定时任务管理系统'
siteSubtitle.value = settings.subtitle || '极致轻量、高性能的自动化任务调度平台'
siteIcon.value = settings.icon || ''
demoMode.value = settings.demo_mode || false
document.title = siteTitle.value
// 设置 favicon
if (siteIcon.value && siteIcon.value.trim().startsWith('<svg')) {
const blob = new Blob([siteIcon.value], { type: 'image/svg+xml' })
@@ -44,7 +44,7 @@ function loadCachedSettings() {
link.type = 'image/svg+xml'
link.href = url
}
return true
}
} catch (e) {
@@ -56,16 +56,16 @@ function loadCachedSettings() {
async function loadSiteSettings() {
// 先加载缓存
const hasCached = loadCachedSettings()
// 后台异步更新
try {
const res = await api.settings.getPublicSite()
siteTitle.value = res.title || '白虎面板'
siteSubtitle.value = res.subtitle || '轻量级定时任务管理系统'
siteSubtitle.value = res.subtitle || '极致轻量、高性能的自动化任务调度平台'
siteIcon.value = res.icon || ''
demoMode.value = res.demo_mode || false
document.title = siteTitle.value
// 保存到 localStorage
localStorage.setItem('site_settings', JSON.stringify({
title: siteTitle.value,
@@ -73,13 +73,13 @@ async function loadSiteSettings() {
icon: siteIcon.value,
demo_mode: demoMode.value
}))
// 演示模式下自动填充账号密码
if (demoMode.value) {
username.value = 'admin'
password.value = '123456'
}
// 设置 favicon
if (siteIcon.value && siteIcon.value.trim().startsWith('<svg')) {
const blob = new Blob([siteIcon.value], { type: 'image/svg+xml' })
@@ -97,7 +97,7 @@ async function loadSiteSettings() {
// 如果没有缓存,使用默认值
if (!hasCached) {
siteTitle.value = '白虎面板'
siteSubtitle.value = '轻量级定时任务管理系统'
siteSubtitle.value = '极致轻量、高性能的自动化任务调度平台'
}
}
}
@@ -125,7 +125,7 @@ onMounted(loadSiteSettings)
<div class="absolute top-4 right-4">
<ThemeToggle />
</div>
<div class="border rounded-lg bg-background shadow-sm overflow-hidden w-full max-w-[400px] lg:max-w-none lg:w-auto">
<div class="flex">
<!-- 左侧登录表单 -->
+9 -6
View File
@@ -12,7 +12,7 @@ const features = ['脚本管理', '定时任务', '在线终端', '执行日志'
async function loadAbout() {
try {
aboutInfo.value = await api.settings.getAbout()
} catch {}
} catch { }
}
onMounted(loadAbout)
@@ -22,8 +22,8 @@ onMounted(loadAbout)
<div>
<!-- 站点关于 -->
<div class="mb-6">
<h3 class="text-lg font-semibold mb-1">白虎面板</h3>
<p class="text-sm text-muted-foreground">一个轻量级的定时任务管理系统支持脚本管理定时执行和日志追踪</p>
<h3 class="text-lg font-semibold mb-1">白虎面板 (Baihu Panel)</h3>
<p class="text-sm text-muted-foreground">极致轻量高性能的自动化任务调度平台深度集成 Mise 运行时管理支持多语言环境动态切换与全自动依赖管理</p>
</div>
<div class="grid sm:grid-cols-2 gap-x-8 gap-y-5">
@@ -32,14 +32,16 @@ onMounted(loadAbout)
<div>
<h4 class="text-sm font-medium mb-2">技术栈</h4>
<div class="flex flex-wrap gap-1.5">
<Badge v-for="tech in techStack" :key="tech" class="text-xs bg-primary/15 text-primary border-0">{{ tech }}</Badge>
<Badge v-for="tech in techStack" :key="tech" class="text-xs bg-primary/15 text-primary border-0">{{ tech }}
</Badge>
</div>
</div>
<div>
<h4 class="text-sm font-medium mb-2">功能特性</h4>
<div class="flex flex-wrap gap-1.5">
<Badge v-for="feature in features" :key="feature" class="text-xs bg-accent text-accent-foreground">{{ feature }}</Badge>
<Badge v-for="feature in features" :key="feature" class="text-xs bg-accent text-accent-foreground">{{
feature }}</Badge>
</div>
</div>
</div>
@@ -75,7 +77,8 @@ onMounted(loadAbout)
<!-- 底部版权和链接 -->
<div class="mt-6 pt-4 border-t flex items-center justify-center gap-2 text-sm text-muted-foreground">
<span>© {{ new Date().getFullYear() }} 保留所有权利</span>
<a href="https://github.com/engigu/baihu-panel/" target="_blank" class="inline-flex items-center gap-1 text-primary hover:underline">
<a href="https://github.com/engigu/baihu-panel/" target="_blank"
class="inline-flex items-center gap-1 text-primary hover:underline">
<ExternalLink class="h-3.5 w-3.5" />
GitHub 仓库
</a>