5a7ad8de11
- 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 默认结构)
136 lines
4.2 KiB
TypeScript
136 lines
4.2 KiB
TypeScript
/**
|
||
* 站点配置:类型 + 默认值(单一事实源)。
|
||
*
|
||
* 业务配置可在后台 `/admin/settings` 动态修改(存于 DB settings 表),
|
||
* 未修改时使用这里的默认值。`siteConfig` 为兼容旧引用的子集。
|
||
*/
|
||
|
||
export interface LocalizedText {
|
||
zh: string
|
||
en: string
|
||
}
|
||
|
||
export interface SocialLink {
|
||
name: string
|
||
icon: string
|
||
url: string
|
||
}
|
||
|
||
export interface ToolItem {
|
||
id: string
|
||
name: string
|
||
url: string
|
||
icon: string
|
||
color: string
|
||
descZh: string
|
||
descEn: string
|
||
}
|
||
|
||
export interface SiteSettings {
|
||
site: {
|
||
name: string
|
||
brand: string
|
||
description: LocalizedText
|
||
}
|
||
contact: {
|
||
email: string
|
||
infoEmail: string
|
||
wechat: string
|
||
address: LocalizedText
|
||
}
|
||
socials: SocialLink[]
|
||
tools: ToolItem[]
|
||
footer: {
|
||
title: LocalizedText
|
||
newsletterTitle: LocalizedText
|
||
newsletterNote: LocalizedText
|
||
copyright: LocalizedText
|
||
}
|
||
seo: {
|
||
description: LocalizedText
|
||
keywords: LocalizedText
|
||
}
|
||
}
|
||
|
||
export const defaultSettings: SiteSettings = {
|
||
site: {
|
||
name: 'ArcticNewOne',
|
||
brand: '北极新一',
|
||
description: {
|
||
zh: '探索无限可能的现代化体验,欢迎来到 ArcticNewOne。',
|
||
en: 'Explore infinite possibilities and modern experiences. Welcome to ArcticNewOne.',
|
||
},
|
||
},
|
||
contact: {
|
||
email: 'chenchun@virtheart.com',
|
||
infoEmail: 'info@virtheart.com',
|
||
wechat: 'LucskyNew',
|
||
address: {
|
||
zh: '贵州省毕节市七星关区\n滨河西路',
|
||
en: 'Binhe West Road, Qixingguan District\nBijie City, Guizhou Province',
|
||
},
|
||
},
|
||
socials: [
|
||
{ name: 'X', icon: 'ph:x-logo', url: 'https://x.com/arcticnewone' },
|
||
{ name: 'Instagram', icon: 'ph:instagram-logo', url: 'https://instagram.com/arcticnewone' },
|
||
{ name: 'LinkedIn', icon: 'ph:linkedin-logo', url: 'https://www.linkedin.com/company/arcticnewone' },
|
||
{ name: 'GitHub', icon: 'ph:github-logo', url: 'https://github.com/arcticnewone' },
|
||
],
|
||
tools: [
|
||
{
|
||
id: 'drawio',
|
||
name: 'Drawio',
|
||
url: 'https://drawio.virtheart.com',
|
||
icon: 'ph:flow-arrow-duotone',
|
||
color: 'from-orange-50/50 to-amber-100/50',
|
||
descZh: '强大的在线图表绘制工具,支持流程图、UML、网络拓扑等。',
|
||
descEn: 'Powerful online diagramming tool for flowcharts, UML, and network topologies.',
|
||
},
|
||
{
|
||
id: 'excalidraw',
|
||
name: 'Excalidraw',
|
||
url: 'https://excalidraw.virtheart.com',
|
||
icon: 'ph:pencil-circle-duotone',
|
||
color: 'from-purple-50/50 to-indigo-100/50',
|
||
descZh: '手绘风格的白板工具,轻松绘制草图和协作思考。',
|
||
descEn: 'Hand-drawn style whiteboard tool for easy sketching and collaborative thinking.',
|
||
},
|
||
{
|
||
id: 'itTools',
|
||
name: 'IT-Tools',
|
||
url: 'https://ittools.virtheart.com',
|
||
icon: 'ph:wrench-duotone',
|
||
color: 'from-blue-50/50 to-cyan-100/50',
|
||
descZh: '为开发人员和IT从业者提供的一站式实用工具集合。',
|
||
descEn: 'An all-in-one practical tool collection for developers and IT professionals.',
|
||
},
|
||
],
|
||
footer: {
|
||
title: {
|
||
zh: '雕琢视觉,塑造故事。\n让我们共创卓越作品!',
|
||
en: 'Crafting visuals. Shaping stories.\nLet\'s create great work together!',
|
||
},
|
||
newsletterTitle: { zh: '抢先获取最新资讯', en: 'Get the latest updates first' },
|
||
newsletterNote: { zh: '无广告干扰。仅提供精选更新。', en: 'No spam. Only curated updates.' },
|
||
copyright: { zh: '© 2026 北极新一工作室', en: '© 2026 ArcticNewOne Studio' },
|
||
},
|
||
seo: {
|
||
description: {
|
||
zh: '探索无限可能的现代化体验,欢迎来到 ArcticNewOne。',
|
||
en: 'Explore infinite possibilities and modern experiences. Welcome to ArcticNewOne.',
|
||
},
|
||
keywords: { zh: '北极新一,ArcticNewOne,设计,开发,品牌', en: 'ArcticNewOne,design,development,branding' },
|
||
},
|
||
}
|
||
|
||
/** 兼容旧引用的站点元信息子集(新代码请用 useSiteSettings) */
|
||
export const siteConfig = {
|
||
brand: defaultSettings.site.name,
|
||
brandZh: defaultSettings.site.brand,
|
||
email: defaultSettings.contact.email,
|
||
infoEmail: defaultSettings.contact.infoEmail,
|
||
wechat: defaultSettings.contact.wechat,
|
||
copyright: defaultSettings.footer.copyright.zh,
|
||
socials: defaultSettings.socials,
|
||
}
|