refactor: 重写系统设置模块,新增维护模式与登录策略功能
- 移除大量无实际效果的冗余配置项 - 新增维护模式拦截逻辑,支持管理员豁免 - 重构登录失败次数限制,从配置动态读取阈值 - 新增站点Logo支持与配置管理 - 优化用户管理页面数据拉取逻辑 - 新增端口批量创建范围模式功能 - 更新依赖包版本与缓存策略
This commit is contained in:
@@ -8,15 +8,10 @@ import axios from 'axios';
|
||||
|
||||
const defaultConfig = {
|
||||
site_name: '机柜管理系统',
|
||||
site_logo: '',
|
||||
primary_color: '#667eea',
|
||||
secondary_color: '#764ba2',
|
||||
sidebar_collapsed: false,
|
||||
compact_mode: false,
|
||||
animation_enabled: true,
|
||||
language: 'zh-CN',
|
||||
timezone: 'Asia/Shanghai',
|
||||
date_format: 'YYYY-MM-DD',
|
||||
session_timeout: 30,
|
||||
idle_timeout: 30,
|
||||
max_login_attempts: 5,
|
||||
maintenance_mode: false,
|
||||
};
|
||||
@@ -84,5 +79,6 @@ export const useConfigStore = create((set, get) => ({
|
||||
export const useConfig = () => useConfigStore((state) => state.config);
|
||||
export const useConfigLoading = () => useConfigStore((state) => state.loading);
|
||||
export const useSiteName = () => useConfigStore((state) => state.config.site_name);
|
||||
export const useSiteLogo = () => useConfigStore((state) => state.config.site_logo);
|
||||
export const usePrimaryColor = () => useConfigStore((state) => state.config.primary_color);
|
||||
export const useSecondaryColor = () => useConfigStore((state) => state.config.secondary_color);
|
||||
|
||||
Reference in New Issue
Block a user