Files
boss_font/src/settings.ts
ddrwode 68882f94cf ha'ha
2026-03-06 16:35:38 +08:00

69 lines
2.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.

import { LayoutMode, ComponentSize, SidebarColor, ThemeMode, LanguageEnum } from './enums'
const { pkg } = __APP_INFO__
// 检查用户的操作系统是否使用深色模式
const mediaQueryList = window.matchMedia('(prefers-color-scheme: dark)')
export const defaultSettings: AppSettings = {
// 系统Title
title: pkg.name,
// 系统版本
version: pkg.version,
// 是否显示设置
showSettings: true,
// 是否显示标签视图
showTagsView: true,
// 是否显示应用Logo
showAppLogo: true,
// 布局方式,默认为左侧布局
layout: LayoutMode.LEFT,
// 主题,根据操作系统的色彩方案自动选择
theme: mediaQueryList.matches ? ThemeMode.DARK : ThemeMode.LIGHT,
// 组件大小 default | medium | small | large
size: ComponentSize.DEFAULT,
// 语言
language: LanguageEnum.ZH_CN,
// 主题颜色 - 修改此值时需同步修改 src/styles/variables.scss
themeColor: '#1e40af',
// 是否显示水印
showWatermark: false,
// 水印内容
watermarkContent: pkg.name,
// 侧边栏配色方案
sidebarColorScheme: SidebarColor.CLASSIC_BLUE,
// 是否启用 AI 助手
enableAiAssistant: false
}
/**
* 认证功能配置
*/
export const authConfig = {
/**
* Token自动刷新开关
*
* true: 启用自动刷新 - ACCESS_TOKEN_INVALID时尝试刷新token
* false: 禁用自动刷新 - ACCESS_TOKEN_INVALID时直接跳转登录页
*
* 适用场景后端没有刷新接口或不需要自动刷新的项目可设为false
*/
enableTokenRefresh: false
} as const
// 主题色预设 - 现代配色方案(基于示例模板风格)
// 注意:修改默认主题色时,需要同步修改 src/styles/variables.scss 中的 primary.base 值
export const themeColorPresets = [
'#1e40af', // Primary Blue - 示例模板主色
'#3b82f6', // Tailwind Blue - 现代科技感
'#2563eb', // Deep Blue - 深邃专业
'#0ea5e9', // Sky Blue - 清新明亮
'#6366f1', // Indigo - 优雅紫色
'#14b8a6', // Teal - 青绿高级感
'#f97316', // Orange - 活力温暖
'#8b5cf6', // Violet - 时尚创意
'#ec4899', // Pink - 年轻潮流
'#10b981', // Emerald - 自然清新
'#06b6d4' // Cyan - 科技未来感
]