Commit Graph

24 Commits

Author SHA1 Message Date
Chaos
2a14389daf feat(users): implement role filtering and pagination in user management
- Add role filtering functionality with radio buttons for each role
- Implement pagination controls at the bottom of the user table
- Update user table to show loading state without text
- Improve avatar display logic with conditional rendering
- Adjust styling for better UI consistency and responsiveness
- Remove unused sidebar state imports and commented-out code
- Add console logs for debugging data flow and role changes
- Modify search button size from sm to xs for better fit
- Enhance role badge styling with margin adjustments
- Refactor sidebar overlay and positioning classes
2025-11-26 09:21:38 +08:00
Chaos
7ce645704e fix(users): 优化用户列表加载失败时的错误展示
- 移除了原有简单的错误提示标签
- 新增了带最小高度容器包裹的错误信息展示区
- 在表格数据加载失败时显示更友好的错误提示
- 统一了组件内两处错误处理的样式结构
2025-11-26 07:26:32 +08:00
Chaos
e09129cab6 feat(users): 实现用户列表页面的异步数据加载与UI优化
- 添加角色服务依赖以获取用户组信息
- 将用户列表和角色信息改为流式加载
- 更新用户列表页面布局与样式
- 增加搜索框和用户组筛选下拉菜单
- 添加加载状态提示与错误处理显示
- 引入sass-embedded支持SCSS样式编写
- 调整表格列宽并增加响应式设计
- 添加面包屑导航与页面标题展示
- 新增添加用户按钮及操作下拉菜单
- 使用Icon组件替换原有图标实现方式
2025-11-26 07:23:20 +08:00
Chaos
7d627a45fb feat(auth): 实现基于令牌的用户认证和访问控制
- 在用户相关页面服务端加载函数中添加令牌检查,防止未授权访问
- 更新用户服务方法以支持携带认证令牌请求API
- 修改用户资料和用户列表组件以适配新的认证流程
- 引入侧边栏状态管理并在布局中注册上下文
- 调整HTTP客户端逻辑以正确传递请求头信息
- 更新用户类型定义以匹配后端返回的角色结构
- 优化应用头部和侧边栏组件的UI细节和交互逻辑
2025-11-25 23:33:32 +08:00
Chaos
81c61f433d feat(auth): implement user logout functionality
- Add logout action to delete auth cookie and reset user state
- Create logout form with enhanced submit handling
- Integrate toast notifications for logout feedback
- Update sidebar to include logout button with form submission
- Remove unnecessary console log in layout server load
- Clean up JWT parsing logic in hooks server file
- Add new LogoutButton component (currently empty)
2025-11-25 17:23:43 +08:00
Chaos
4ec8e88e58 refactor(auth): implement token-based authentication with JWT parsing
- Replace authStore with tokenService for authentication management
- Add JWT parsing utility to extract user info from tokens
- Update login flow to use cookie-based token storage
- Modify logout to properly clear auth state and cookies
- Integrate user data into page context for SSR compatibility
- Remove deprecated authStore and related localStorage logic
- Add cookie constants for consistent token handling
- Implement server-side token validation in hooks
- Update HTTP client to use token from cookies instead of store
- Refactor error handling to use unified ApiError class
- Replace manual redirect logic with resolved paths
- Improve type safety with explicit user and auth interfaces
- Add toast notifications for login/logout feedback
- Remove unused sidebar store and related UI logic
- Migrate theme handling to use cookies and context
- Update icon definitions and component references
- Clean up legacy code and unused imports
2025-11-25 16:53:48 +08:00
Chaos
8f3f2d63a0 refactor(layout): 重构应用布局结构
- 将原有布局中的侧边栏和头部组件拆分为独立的 AppSidebar 和 AppHeader 组件
- 移除内联的导航逻辑和样式,交由专用组件管理
- 更新图标库,优化部分图标的显示效果
- 简化认证存储逻辑,增强状态持久化与安全性
- 优化侧边栏状态管理机制,提高响应式体验
- 改进登录流程错误处理,增加网络异常提示
- 调整路由组件结构,提升代码可维护性
2025-11-25 07:33:58 +08:00
chaos
877a47807c feat(auth): 重构登录流程并增强错误处理
- 改进登录表单验证逻辑,增加非空和类型检查
- 更新认证 Cookie 名称为 Authorization 并调整安全设置
- 登录成功后返回重定向路径和成功消息
- 增强错误处理,区分网络错误、API 错误和未知错误
- 引入 ResponseError 类统一处理 API 响应错误
- 表单提交使用 enhance 函数优化用户体验
- 登录成功时显示 Toast 提示并自动跳转
- 移除独立的用户信息服务,整合至认证服务
- 删除旧的角色检查工具函数
- 新增错误处理工具函数 handleError
2025-11-24 21:39:11 +08:00
Chaos
f9d92e6cc9 fix(auth): handle API error types correctly in login action
- Introduce ApiError interface for better type safety
- Replace generic HttpError handling with specific ApiError casting
- Remove unnecessary console log in error handling block
- Ensure error details are properly extracted and returned to client
2025-11-24 17:26:37 +08:00
Chaos
d4ace86fb3 fix(auth): log http error details on login failure
- Add console logging for HTTP error details
- Improve error handling in login server route
- Ensure error details are properly serialized
2025-11-24 17:21:52 +08:00
Chaos
ed542f108c feat(auth): implement login and user management features
- Added server-side login action with form handling and cookie storage
- Implemented user authentication service with token management
- Created user list page with data fetching from userService
- Developed reusable DataTable component with selection and pagination
- Enhanced AppSidebar with nested navigation and active state tracking
- Updated icon definitions and sprite symbols for UI consistency
- Improved HTTP client to properly handle request bodies for different methods
- Refactored auth store to manage authentication state and cookies
- Added strict typing for navigation items and table columns
- Removed obsolete code and simplified authentication flow
2025-11-24 17:11:41 +08:00
Chaos
3515faa814 refactor(layout): 重构应用布局结构
- 将原有布局中的侧边栏和头部组件拆分为独立的 AppSidebar 和 AppHeader 组件
- 移除内联的导航逻辑和样式,交由专用组件管理
- 更新图标库,优化部分图标的显示效果
- 简化认证存储逻辑,增强状态持久化与安全性
- 优化侧边栏状态管理机制,提高响应式体验
- 改进登录流程错误处理,增加网络异常提示
- 调整路由组件结构,提升代码可维护性
2025-11-24 07:17:12 +08:00
Chaos
71f19b658c feat(toast): 使用SVG图标替换字符图标并优化样式
- 新增四种SVG图标:info、success、warning、error
- 修改Toast组件使用SVG图标替代字符图标
- 更新图标映射逻辑,使用IconId类型定义图标标识
- 调整Toast样式类,使用更具体的Tailwind类名
- 移除旧的alertStyles对象和字符图标映射
- 登录页面增加错误处理和Toast提示
- 布局文件微调菜单样式,增加顶部内边距
2025-11-23 21:59:47 +08:00
Chaos
a71622f797 feat(auth): 重构登录页面并添加忘记密码路由
- 重构登录表单 UI,使用 DaisyUI 组件美化界面
- 添加记住我功能和加载状态提示
- 集成 Toast 提示组件用于显示登录结果
- 新增忘记密码页面路由
- 实现全局 Toast 消息提醒功能
- 在根布局中引入 ToastContainer 组件
2025-11-23 07:43:23 +08:00
Chaos
8c041c1740 style(auth): 优化登录页面样式布局
- 使用 Tailwind CSS 类替换原有基础样式
- 添加背景色和居中对齐容器
- 表单元素增加间距和输入框样式
- 按钮应用宽按钮样式类
- 移除无用的 placeholder 属性
- 调整标签与输入框结构使其更清晰
2025-11-22 22:52:48 +08:00
Chaos
65cf80fb51 feat(layout): 实现应用布局和侧边栏功能
- 添加侧边栏组件,支持展开/收缩和移动端适配
- 实现导航菜单,支持高亮当前路由
- 添加主题选择器组件
- 集成认证状态显示和登出功能
- 优化侧边栏在不同屏幕尺寸下的行为
- 添加多种图标支持,包括logo、菜单、主页等
- 创建NavItem类型定义,用于导航菜单项
- 扩展sidebarStore,增加手动控制状态管理
- 添加数据看板页面占位内容
- 更新全局布局文件以支持主题和侧边栏状态管理
2025-11-22 22:45:49 +08:00
chaos
26fef2fd7a feat(icon): 添加图标组件并更新图标类型定义
- 引入 Icon 组件到 dashboard 页面
- 更新 icon-ids.ts 文件中的图标枚举类型
- 在 Sprite.svelte 中添加新的图标 symbol 定义
- 移除旧的 sprite.svg 文件内容
- 为 panel-right-close 和 panel-right-close-solid 图标添加 SVG 路径定义
2025-11-22 13:50:58 +08:00
Chaos
f7cc0b675a Merge remote-tracking branch 'origin/master'
# Conflicts:
#	src/lib/widget/ThemeSelector.svelte
#	src/routes/app/dashboard/+page.svelte
2025-11-22 08:03:37 +08:00
Chaos
4493b9cc7a feat(sidebar): 实现响应式侧边栏状态管理
- 添加媒体查询监听以自动切换侧边栏显示状态
- 引入sidebarStore统一管理侧边栏开闭逻辑
- 移除页面内联侧边栏展开控制逻辑
- 添加Sprite图标组件客户端渲染条件判断
- 更新侧边栏样式类名以支持过渡动画效果
- 移除用户信息展示相关冗余代码块
2025-11-22 08:02:49 +08:00
chaos
bace501527 chore(git): 配置 GitToolBox 提交验证设置
- 启用提交消息问题键验证
- 启用提交消息验证功能
- 添加项目级别的 GitToolBox 配置文件
2025-11-22 05:32:32 +08:00
chaos
f49006b22b style(dashboard): 调整页面样式和按钮布局
- 修改主容器类名,更新文本颜色和背景色
- 调整侧边栏宽度过渡效果和背景色
- 更新菜单按钮样式,移除悬停背景色
- 移除登录按钮不必要的类名
- 优化整体页面结构和样式一致性
2025-11-22 05:31:45 +08:00
Chaos
cdd14b3c85 feat(应用): 实现带可折叠侧边栏的仪表盘布局
添加从根路径到/app/dashboard的服务器端重定向
创建包含主内容容器的应用布局组件
实现带响应式侧边栏和顶栏的仪表盘页面
添加带平滑过渡效果的侧边栏切换功能
设置基础用户状态管理仓库
使用对等依赖标志更新package-lock.json中的依赖项
从锁定文件中移除冗余的picomatch条目
添加带路径解析导入的登录页面组件
2025-11-21 17:29:11 +08:00
Chaos
86030df690 feat(应用): 实现带可折叠侧边栏的仪表盘布局
添加从根路径到/app/dashboard的服务器端重定向
创建包含主内容容器的应用布局组件
实现带响应式侧边栏和顶栏的仪表盘页面
添加带平滑过渡效果的侧边栏切换功能
设置基础用户状态管理仓库
使用对等依赖标志更新package-lock.json中的依赖项
从锁定文件中移除冗余的picomatch条目
添加带路径解析导入的登录页面组件
2025-11-20 17:22:14 +08:00
Chaos
6273f8f714 初始化项目:添加基础SvelteKit配置、依赖和IDE文件 2025-11-19 19:52:17 +08:00