Commit Graph

53 Commits

Author SHA1 Message Date
empty
99fe68e851 chore: add award sound effect audio file 2026-02-04 00:38:35 +08:00
empty
83bc4da3cc fix(admin): add award to musicTrack type 2026-02-04 00:34:41 +08:00
empty
bd62dff06a feat(admin): add award sound effect button 2026-02-04 00:33:03 +08:00
empty
baacee50e6 fix(admin): show program name in single line with ellipsis 2026-02-04 00:04:09 +08:00
empty
69c789ba9d fix(admin): improve mobile layout for program config section 2026-02-04 00:01:51 +08:00
empty
307811886b fix(admin): add votes and stamps fields when creating new program 2026-02-03 23:55:27 +08:00
empty
92d560445e fix(admin): add performer and remark fields to programs type 2026-02-03 23:54:37 +08:00
empty
7fea6b8578 feat(admin): enhance program config with CRUD and reorder
- Change "结果展示" to "投票结果" in global controls
- Add program edit modal with name, team, performer, remark fields
- Add move up/down buttons for program reordering
- Add delete program with confirmation
- Add "添加节目" button for creating new programs
- Add responsive styles for mobile view

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:52:29 +08:00
empty
83bf1d3a43 chore: sync various improvements and fixes
- Update gitignore and serena config
- Improve connection and voting stores
- Enhance admin routes and socket handling
- Update client-screen views
- Add auth middleware

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:31:38 +08:00
empty
39caecdd95 fix(mobile): update progress ring hint text
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:29:42 +08:00
empty
19b7823d42 fix(mobile): add horizontal scroll hint to award selection step
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:22:01 +08:00
empty
a27134b82e feat(mobile): add voting status step to onboarding tour
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:20:03 +08:00
empty
7e15fcb377 fix(mobile): adjust onboarding tooltip width to prevent button wrapping
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:17:19 +08:00
empty
655f77ec3e fix(mobile): prevent onboarding tooltip from overflowing screen
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:12:44 +08:00
empty
65b153e5df feat(mobile): add onboarding tour for voting page
- Add OnboardingTour component with step-by-step guidance
- Add useOnboarding composable for state management
- Reset onboarding on logout for re-viewing
- 4 steps: welcome, award selection, program voting, progress

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:09:02 +08:00
empty
eee34916b0 fix(mobile): replace title with voting status in header
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:40:30 +08:00
empty
6ccc571be2 refactor(mobile): simplify header to single row layout
- Left: username + logout button (stacked)
- Center: page title
- Right: larger progress ring (56px)
- Remove connection status (shown in WeChat navbar)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:37:15 +08:00
empty
8ab575b14a feat(mobile): redesign vote page header layout
- Move username to top-left position
- Center the page title
- Move logout button to bottom-left
- Show connection status with latency on top-right

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:32:22 +08:00
empty
8f21ff6fd9 fix: add missing prisma utility file
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:29:02 +08:00
empty
406a5afa33 feat(server): add Program and Award database models
- Add Program and Award tables to Prisma schema
- Update program-config.service to support database with JSON fallback
- Update ProgramCard.vue display logic for dynamic teamName/performer
- Add seed script to import data from JSON config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:26:47 +08:00
empty
9f94f362d4 chore: add wechatMp config for MP OAuth
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:38:06 +08:00
empty
7a3b9a3694 chore: add missing auth utils and public routes
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:35:04 +08:00
empty
9b11f99fed feat: implement WeChat MP OAuth login
- Add wechat-mp.service.ts for MP web authorization
- Add wechat-mp.routes.ts with /api/mp endpoints
- Update EntryQRCode.vue to show H5 URL QR code
- Update HomeView.vue with WeChat auth detection

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:33:32 +08:00
empty
2cb9032187 feat: update login flow and add firework effects
- Update mobile HomeView to show WeChat scan login instructions
- Remove manual name/department input form from mobile client
- Add firework particle effects to big screen background
- Remove department field from login flow types

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 17:18:03 +08:00
empty
3246479643 feat: integrate WeChat Open Platform QR code login
- Add WeChat service for OAuth2 authentication flow
- Add WeChat routes (/api/wechat/login, /api/wechat/callback)
- Add WeChat types for login state and responses
- Update EntryQRCode component to support WeChat login
- Add WeChat config options (appId, appSecret, redirectUri)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 14:38:54 +08:00
84838928e3 feat: update program configuration with actual program names
## Changes

### Program Configuration
- Update programs.json with actual program names:
  - 节目一:青苹果乐园
  - 节目二:五百年桑田沧海
  - 节目三:我的中国心
  - 节目四:萍聚
  - 节目五:追光而行,共赴新程
  - 节目六:粉红色的回忆
  - 节目七:敬业狂想曲

### Dockerfile Update
- Add config directory copy to Dockerfile
- Ensure program configuration is included in production build

## Testing
- Configuration loaded successfully (7 programs, 7 awards)
- Server restarted and verified config loading

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:52:03 +08:00
296f6e09f8 fix: add MySQL database and fix deployment issues
## Changes

### Database Integration
- Add MySQL 8.0 service to docker-compose.yml
- Configure DATABASE_URL environment variable for server
- Add health check for MySQL service
- Create mysql_data volume for data persistence

### Dockerfile Improvements
- Generate Prisma Client in builder stage
- Copy Prisma Client from correct pnpm workspace location
- Ensure Prisma Client is available in production container

### Client-Mobile Fixes
- Remove deprecated StampDock.vue component
- Fix voting store API usage in VotingPage.vue
- Add type assertion for userTickets in connection.ts
- Add remark property to AwardConfig interface in voting.ts

## Testing
- All containers start successfully
- Database connection established
- Redis connection working
- 94 participants restored from Redis
- Vote data synced (20 votes)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-02 21:46:51 +08:00
empty
e211bb2130 feat: add lottery results display page
- Add LOTTERY_RESULTS system phase
- Add /screen/lottery-results route
- Add LotteryResultsView component
- Add database connection management (db.ts)
- Update DrawResult schema to remove User relation
- Add awardIcon field to VoteResultsView

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:13:28 +08:00
empty
57cbaa5728 fix: broadcast state change after redraw current round
Add emit('stateChange') to notify frontend clients when
lottery round is redrawn, so UI updates correctly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:05:39 +08:00
empty
5ef68b1264 feat: make award statistics panel collapsible
- Convert stats-section to collapsible details element
- Add expand/collapse indicator (▶/▼)
- Save screen space on mobile devices

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 02:02:15 +08:00
empty
aba96f88df refactor: optimize data cleanup functions in director console
- Add redrawCurrentRound() method to clear current round winners
- Add /api/admin/lottery/redraw API endpoint
- Rename "重置" to "重置本轮" (reset current round state only)
- Add "重抽本轮" button (clear winners and allow re-draw)
- Rename "紧急操作" to "数据管理" with clearer button labels
- Change "高级清理" to collapsible "开发者选项"
- Update confirmation modal text for clarity

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 01:59:13 +08:00
empty
4a2f1e7c8a refactor: 优化导演控制台代码结构和用户体验
高优先级优化:
- 合并 REVEAL/COMPLETE 状态的重复代码模板

中优先级优化:
- 添加防抖函数 (debounce/debounceLeading) 防止按钮重复点击
- 投票控制按钮添加 500ms 防抖
- 抽奖控制按钮添加 500ms 防抖
- 新增 Toast 通知系统替代 alert
- 优化 API 错误反馈:loadPrizeConfig、loadParticipants、
  importParticipants、savePrizeConfig 现在显示 Toast 错误提示

低优先级优化:
- 新增实时奖项统计面板,显示各奖项投票 TOP3
- 添加奖项统计面板响应式样式
- 添加 Toast 动画和样式

其他:
- 添加 getAwardDisplayName 辅助函数
- 优化移动端适配
2026-01-29 00:28:19 +08:00
empty
5c5d0ad85c feat: 优化100人并发投票支持 + 修复奖项名称硬编码问题
服务端优化:
- Socket.IO 配置优化,支持高并发 WebSocket 连接
- 添加 connectTimeout、perMessageDeflate 等参数

压测脚本:
- 新增 vote-real-scenario.yaml 真实场景压测配置
- 支持 100人瞬间爆发、每人7票、不同投票速度模拟
- 添加随机延迟函数模拟真实用户行为
- 强制 WebSocket 传输避免 HTTP 连接限制

前端修复:
- 修复 PostcardItem、PostcardDisplay 奖项名称硬编码问题
- 组件现在从后端 awards 配置动态获取奖项名称
- 修复 LiveVotingView、AdminControl 传递 awards 数据
- 新增 gala 压测命令到 package.json

测试验证:
- 100人并发压测通过,成功率 100%
- P95 延迟 0.7ms,远低于 500ms 阈值
- 系统可稳定支持 3.3 倍现场负载
2026-01-29 00:09:03 +08:00
empty
2f8bf0d755 style: refine mobile voting dock film strip UI with seamless borders and improved text clarity 2026-01-28 22:42:59 +08:00
empty
d090c80e50 修复投票计数与状态同步,完善票据与戳显示
修复投票系统:禁止重复投票、恢复状态、同步大屏

完善投票流程与展示:计数准确、状态可恢复、样式统一
2026-01-28 21:37:05 +08:00
empty
66ca67c137 feat(server): 添加节目配置文件管理
- 新增 programs.json 配置文件
- 新增 ProgramConfigService 服务
- 新增节目配置 API 接口 (GET/PUT /api/admin/programs)
- 修改 AdminService 使用配置服务替代硬编码
- 添加单元测试
2026-01-28 13:55:03 +08:00
empty
a89d844f7b fix: add missing poolTag to default prize config
The default configuration was missing poolTag for all rounds,
causing the lottery to draw from all participants instead of
filtering by generation/zodiac tags when prizes.json fails to load.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 17:35:49 +08:00
371f117064 fix: production deployment improvements and configuration fixes
## 主要改动

### 1. 修复二维码地址硬编码问题
- 将 MainDisplay.vue 中硬编码的移动端 URL 改为环境变量配置
- 添加 VITE_MOBILE_URL 环境变量支持
- 支持通过 .env 文件动态配置移动端地址

### 2. 修复音频文件路径问题
- 修正 display.ts 中音频文件路径,添加 /screen 前缀
- 修复 BGM、抽奖音效、胜利音效的加载路径

### 3. 修复 Docker 构建问题
- 添加中国 npm 镜像配置,解决构建超时问题
- 修复缺失的 tsconfig.base.json 文件拷贝
- 修复 Redis 环境变量配置(REDIS_HOST/REDIS_PORT)
- 添加 Lua 脚本文件拷贝到生产容器

### 4. 修复前端路由和资源加载
- 添加 Vite base path 配置 (/screen/)
- 修复 Vue Router base path 配置
- 修正 Caddyfile 路由顺序,确保 /screen 路径优先匹配

### 5. 修复 TypeScript 编译错误
- LuckyDrawView.vue: 添加 round 属性类型定义
- ProgramCard.vue: 添加非空断言处理

### 6. 修复 SCSS 变量问题
- 替换未定义的 SCSS 变量为硬编码颜色值
- 修复 VoteView、ConnectionStatus、HomeView、ScanLoginView 中的样式问题

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-26 16:59:02 +08:00
empty
11e5754d05 feat: add audio files for lottery and BGM
- bgm.mp3 - background music
- lottery.mp3 - lottery spinning music
- fanfare.mp3 - winner celebration sound

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 00:26:01 +08:00
empty
d4289825aa feat: add Docker deployment configuration
- Add server Dockerfile with multi-stage build
- Add frontend Dockerfile with Nginx
- Add docker-compose.yml for orchestration
- Add Nginx config with SSL support
- Add deployment documentation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 00:23:25 +08:00
empty
7073591ebd feat: auto music control for lottery phases
- Auto-play lottery music when storm starts
- Auto-play fanfare when winners revealed
- Auto-stop music when lottery completes
- Add EventEmitter to broadcast async state changes

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 23:54:42 +08:00
empty
7ba92c81e9 fix: add audio unlock overlay for browser autoplay policy
- Add click-to-unlock overlay on big screen
- Play silent audio to unlock browser audio context
- Show unlock prompt before allowing audio playback

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:35:50 +08:00
empty
4eb2814391 feat: add BGM playback control for big screen display
- Add audio player to display store with play/stop functions
- Listen for music state changes from AdminState sync
- Support bgm, lottery, and fanfare audio tracks
- Create audio directory structure

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:05:30 +08:00
empty
7dc77da939 feat: add participant data persistence display and mobile responsive fixes
- Add getStats() method to participantService for tag distribution
- Update participants API to return tagDistribution statistics
- Load existing participants on AdminControl mount
- Add mobile responsive styles for import section

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 22:02:12 +08:00
empty
f4736b6ebd feat: implement QR code scan login system with admin control
- Add scan login service with Redis-based token management
- Add scan login API routes for token generation and validation
- Add QRCodeLogin component for PC-side QR code display
- Add EntryQRCode component for mass login scenarios
- Add ScanLoginView for mobile-side login form
- Add localStorage persistence for user identity
- Add logout functionality to mobile client
- Add auto-redirect for logged-in users
- Add admin console control for QR code display on big screen
- Add socket event forwarding from admin to screen display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 21:44:52 +08:00
empty
75570af8bc test: add comprehensive test suite for server
- Add load testing with Artillery (smoke, standard, peak, stress)
- Add functional tests: voting, lottery, admin (18 tests)
- Add fault tolerance tests (14 tests)
- Add network tests for WebSocket (7 tests)
- Add compatibility tests (15 tests)
- Add security tests: anti-fraud, auth, data integrity (10 tests)
- Fix optional callback handling in socket handlers
- Total: 64 test cases, all passing

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 19:53:16 +08:00
empty
22141c9263 feat: festive Chinese red background and prize config unification
- Change all big screen backgrounds to pure Chinese red (#c41230)
- Remove vignette effect for consistent display on different screens
- Unify all prize data to match prizes.json configuration
- Add demo participants fallback when no data imported
- Fix particle visibility reset in startGalaxy()

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 16:33:21 +08:00
empty
a442d050e4 feat: enhance lottery system with participant import and prize config
- Fix ES module import issue in admin.service.ts (require -> import)
- Fix lottery reveal ghosting by hiding name particles on complete
- Add participant import from Excel with tag calculation
- Add prize configuration service with JSON persistence
- Constrain winners overlay to scroll area dimensions
- Fix macOS lsof syntax in stop script
- Add HorseRace view and renderer (WIP)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 12:20:45 +08:00
empty
35d77cbb22 feat: enhance AdminControl and VoteResultsView
- Update AdminControl.vue with improved controls
- Enhance VoteResultsView.vue with better display

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 15:57:52 +08:00
empty
623617ecc1 fix: update PostcardItem stamp image import
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 15:32:28 +08:00