feat: 全面升级——后台优化 / 动态配置 / 个人中心 / OSS 存储

- OSS 文件存储(RustFS / S3 v4 兼容,零依赖手写 SigV4):
  上传/列表/删除走桶 arcticnewone,/uploads 代理服务 + 本地回退;
  server/utils/sigv4.ts 纯函数 + AWS 测试向量验证
- 业务动态配置:settings 表 + /api/settings(公开) + /api/admin/settings(PATCH),
  useSiteSettings 组合式,footer/contact/tools/app.vue/侧边栏/工具页全部接入,
  后台 /admin/settings 修改前台即时生效(站点/联系/社交/工具箱/页脚/SEO)
- 后台全面优化:Admin* 设计系统(按钮/输入/表单/卡片/徽标/弹窗/确认/空态/骨架/
  分页/页头/Toast)14 组件;Dashboard 增强;各列表页搜索/筛选/批量删除/分页;
  布局与侧边栏分组;统一 toast/确认反馈
- 个人中心全新重设计:顶部资料卡 + 统计、精致化改密/删号(二次确认)、
  收藏封面网格、评论卡片、移动端适配
- deploy.sh 支持 OSS 凭据注入(NUXT_OSS_*);.env.example 更新
- 测试 17 例全过(含 SigV4 AWS 向量、settings 默认结构)
This commit is contained in:
2026-08-06 18:40:17 +08:00
parent 685c7b51d1
commit 5a7ad8de11
55 changed files with 3857 additions and 1993 deletions
+14 -12
View File
@@ -5,11 +5,13 @@ import { gsap } from 'gsap'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
import FooterLogo from '~/components/common/FooterLogo.vue'
import AnimatedButton from '~/components/common/AnimatedButton.vue'
import { siteConfig } from '~/config/site'
import { useSiteSettings } from '~/composables/useSiteSettings'
const { t } = useI18n()
const { settings, loc } = useSiteSettings()
gsap.registerPlugin(ScrollTrigger)
const { t } = useI18n()
const footerRef = ref<HTMLElement | null>(null)
const newsletterEmail = ref('')
const isSubscribing = ref(false)
@@ -121,7 +123,7 @@ onUnmounted(() => {
<!-- Top Section -->
<div class="flex flex-col md:flex-row justify-between items-start md:items-end gap-8 mb-16">
<h2 class="animated-item text-3xl md:text-4xl lg:text-[44px] font-normal tracking-normal !leading-[1.4] max-w-none whitespace-pre-line">
{{ t('footer.title') }}
{{ loc(settings?.footer.title) }}
</h2>
<div class="animated-item inline-flex items-center shrink-0">
<AnimatedButton
@@ -143,7 +145,7 @@ onUnmounted(() => {
<div>
<FooterLogo class="mb-16 animated-item justify-start" />
<h3 class="text-2xl font-medium mb-6 animated-item">{{ t('footer.newsletterTitle') }}</h3>
<h3 class="text-2xl font-medium mb-6 animated-item">{{ loc(settings?.footer.newsletterTitle) }}</h3>
<form @submit.prevent="handleNewsletterSubmit" class="relative w-full max-w-sm mb-4 animated-item">
<input
@@ -180,13 +182,13 @@ onUnmounted(() => {
<div class="text-xs text-white/40 flex items-center gap-2 animated-item">
<span class="w-1.5 h-1.5 bg-white rounded-full inline-block shrink-0"></span>
{{ t('footer.newsletterNote') }}
{{ loc(settings?.footer.newsletterNote) }}
</div>
</div>
<div class="mt-24 lg:mt-0 flex items-center gap-2 animated-item">
<div class="text-[16px] font-bold text-white/30 font-sans">
{{ t('footer.copyright') }}
{{ loc(settings?.footer.copyright) }}
</div>
</div>
</div>
@@ -226,10 +228,10 @@ onUnmounted(() => {
<div class="grid grid-cols-1 sm:grid-cols-2 gap-8">
<ul class="space-y-3">
<li class="animated-item">
<a :href="`mailto:${siteConfig.email}`" class="group flex items-center overflow-hidden text-[16px] font-bold text-white/80 hover:text-white transition-colors" style="justify-content: flex-start;">
<a :href="`mailto:${settings?.contact.email}`" class="group flex items-center overflow-hidden text-[16px] font-bold text-white/80 hover:text-white transition-colors" style="justify-content: flex-start;">
<div class="flex items-center transition-transform duration-300 group-hover:translate-x-0 -translate-x-[21px] pr-[21px]">
<span class="mr-[10px] h-[11px] w-[11px] rounded-full bg-white shrink-0"></span>
<span>{{ siteConfig.email }}</span>
<span>{{ settings?.contact.email }}</span>
</div>
</a>
</li>
@@ -237,7 +239,7 @@ onUnmounted(() => {
<span class="group flex items-center overflow-hidden text-[16px] font-bold text-white/80 transition-colors cursor-default" style="justify-content: flex-start;">
<div class="flex items-center transition-transform duration-300 group-hover:translate-x-0 -translate-x-[21px] pr-[21px]">
<span class="mr-[10px] h-[11px] w-[11px] rounded-full bg-white shrink-0"></span>
<span>{{ t('footer.wechat') }}: {{ siteConfig.wechat }}</span>
<span>{{ t('footer.wechat') }}: {{ settings?.contact.wechat }}</span>
</div>
</span>
</li>
@@ -245,10 +247,10 @@ onUnmounted(() => {
<ul class="space-y-3">
<li class="animated-item">
<a :href="`mailto:${siteConfig.infoEmail}`" class="group flex items-center overflow-hidden text-[16px] font-bold text-white/80 hover:text-white transition-colors" style="justify-content: flex-start;">
<a :href="`mailto:${settings?.contact.infoEmail}`" class="group flex items-center overflow-hidden text-[16px] font-bold text-white/80 hover:text-white transition-colors" style="justify-content: flex-start;">
<div class="flex items-center transition-transform duration-300 group-hover:translate-x-0 -translate-x-[21px] pr-[21px]">
<span class="mr-[10px] h-[11px] w-[11px] rounded-full bg-white shrink-0"></span>
<span>{{ siteConfig.infoEmail }}</span>
<span>{{ settings?.contact.infoEmail }}</span>
</div>
</a>
</li>
@@ -266,7 +268,7 @@ onUnmounted(() => {
<div class="flex gap-3 animated-item">
<a
v-for="social in siteConfig.socials"
v-for="social in settings?.socials ?? []"
:key="social.name"
:href="social.url"
target="_blank"