Files
arcticnewone/app/config/site.ts
T
virtheart 337eb4f05a feat: 登录改为 Casdoor 统一身份认证(SSO),重建用户体系
- 移除内置密码注册/登录/改密/删号/头像,统一走 Casdoor OIDC 授权码
- 服务端 casdoor-nodejs-sdk:code 换 token + 证书公钥验签 + get-account 补齐资料
- 用户表重建为 provider+provider_id(Casdoor sub 为准),邮箱不再唯一
- 管理员由 Casdoor token 的 isAdmin/IsAdmin 字段或 admin 角色判定,删除角色切换接口
- 前端登录弹窗改为申统认证跳转,注册去 Casdoor;后台用户列表只读角色
- 会话沿用 an_session httpOnly Cookie,requireUser/requireAdmin 守卫保留
- 配置注入 deploy.sh/.env.example;新增 casdoor 单测,删除 password 单测
2026-08-09 00:18:47 +08:00

183 lines
5.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* 站点配置:类型 + 默认值(单一事实源)。
*
* 业务配置可在后台 `/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
}
/** 首页 Hero 背景画廊 */
export interface HeroSettings {
/** 图片 URL 列表,均分到左右两列;为空时显示品牌纯色兜底 */
gallery: string[]
}
/** 首页「成就数据」:数字统计(可在后台配置) */
export interface AchievementItem {
id: string
number: number
suffix: string
titleZh: string
titleEn: string
descriptionZh: string
descriptionEn: string
}
/** 首页「客户评价」(可在后台配置) */
export interface TestimonialItem {
id: string
name: string
roleZh: string
roleEn: string
contentZh: string
contentEn: string
}
/** 首页「合作伙伴」(可在后台配置;无 logo 时显示名称文字) */
export interface PartnerItem {
id: string
name: string
/** logo 图片 URL,可留空 */
logo?: string | null
/** 合作伙伴官网链接,可留空 */
url?: string | null
}
export interface SiteSettings {
site: {
name: string
brand: string
description: LocalizedText
}
contact: {
email: string
infoEmail: string
wechat: string
address: LocalizedText
}
socials: SocialLink[]
tools: ToolItem[]
hero: HeroSettings
achievements: AchievementItem[]
testimonials: TestimonialItem[]
partners: PartnerItem[]
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: '微博', icon: 'ri:weibo-fill', url: '' },
{ name: '知乎', icon: 'ri:zhihu-fill', url: '' },
{ name: '哔哩哔哩', icon: 'ri:bilibili-fill', url: '' },
{ name: 'GitHub', icon: 'ri:github-fill', url: '' },
],
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.',
},
],
hero: {
gallery: [],
},
achievements: [],
testimonials: [],
partners: [],
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,
}