Commit Graph

91 Commits

Author SHA1 Message Date
congsh 3d1d325203 Merge branch 'uat' of http://jiulu-gameplay.com.cn:13001/congsh/gamegroup2 into uat 2026-06-18 13:54:21 +08:00
congsh 80dc45f528 fix(join-group): redirect unauthenticated users to login + docs update
- JoinGroupPage: redirect to login when user is not authenticated
- CLAUDE.md: add env details, path alias, and coding constraints

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 13:53:38 +08:00
锦麟 王 2af0025c3e feat(mobile): stage 11 - events + join landing pages (final stage)
- new EventListMobile.vue: upcoming/past sections + expandable detail
  with RSVP (going/interested/maybe) + comments + realtime subscription
- new CreateEventSheetMobile.vue: title/desc/location/start/end/max-participants
- new JoinGroupPageMobile.vue: group invite landing (login/join/approval flow)
- new JoinTeamPageMobile.vue: team invite landing (login/join/source-group check)
- GroupViewMobile: add '活动' tab, wire EventListMobile; all 8 tabs now live
- router: wire JoinGroup/JoinTeam mobile views; remove unused mobilePlaceholder
- reuses uat event store (loadEvents/rsvp/cancelRSVP/addComment/removeEvent)
  + sessions API (getTeamSession/joinTeamSession)

All 11 stages complete. Full mobile frontend on uat covering all PC features
including uat-exclusive bulletin board, events, group-scoped games, and
invite landing pages.

build verified: vue-tsc + vite build pass
2026-06-18 11:33:23 +08:00
锦麟 王 062c044295 feat(mobile): stage 10 - bulletin board (group detail '公告' tab)
- new BulletinListMobile.vue: pinned section + normal list + publish button
  + unread dots + realtime subscription + mark-all-read
- new BulletinPostSheetMobile.vue: 3-in-1 bottom sheet (detail / edit / create)
  with priority/pinned/expires + permission-based edit/delete (owner/admin/creator)
- GroupViewMobile: add '公告' tab (after 动态), wire BulletinListMobile
- reuses uat bulletin store (posts/pinnedPosts/normalPosts/isRead/create/update/remove)

build verified: vue-tsc + vite build pass
2026-06-18 11:28:50 +08:00
锦麟 王 4b54f71902 feat(mobile): stage 9 - memories, stats, profile, settings, changelog
- migrate MemoryGridMobile.vue (grid + upload + fullscreen preview + delete)
- migrate StatsPanelMobile.vue (overview + points ranking)
- migrate ProfileMobile.vue (user header + stats + status + entries + logout)
- migrate SettingsMobile.vue (notify/sound toggles + desktop switch + about)
- migrate ChangelogMobile.vue (timeline; data synced with uat PC v0.3.6 + mobile v2.1.0 entry)
- GroupViewMobile: wire memories/stats tabs (replace placeholders)
- router: wire Profile/Settings/Changelog mobile views
- verified: memories/points APIs + Memory type + user store logout/setStatus match uat

build verified: vue-tsc + vite build pass
2026-06-18 11:25:10 +08:00
锦麟 王 13e87110ae feat(mobile): stage 8 - ledger + assets + blacklist
- migrate LedgerMobile.vue (monthly summary + list + add + swipe-delete)
- migrate AssetMobile.vue (list + add with image + transfer + delete)
- migrate BlacklistMobile.vue (game/player dual tabs + add + delete)
- router: wire LedgerView/AssetView/BlacklistView mobile views
- verified: ledger/asset stores + assets/gameBlacklist/playerBlacklist APIs + types maps all match uat

build verified: vue-tsc + vite build pass
2026-06-18 11:20:52 +08:00
锦麟 王 6ba671d2c3 feat(mobile): stage 7 - games library (group-scoped, detail/comments/favorites/add/import)
- rewrite GamesLibraryMobile.vue for uat model (games bound to group, not global):
  group selector + search + platform filter + 2-col grid + add/import entries
- new GameDetailSheetMobile.vue: cover/name/aliases/tags/platform + favorite/edit/delete
  + quick-team + comments list with rating
- new AddGameSheetMobile.vue: name/aliases/platform/tags/cover-upload (bound to group)
- new ImportGamesSheetMobile.vue: bulk import via text (name | platform | tags per line)
- router: wire GamesLibrary mobile view
- diverges from master: uat games API requires groupId (addGame/importGames/getGroupGames)
  vs master's global getPopularGames/searchGames; mobile rewritten to match uat PC behavior

build verified: vue-tsc + vite build pass
2026-06-18 11:17:38 +08:00
锦麟 王 1cc23a0836 feat(mobile): stage 6 - polls + bets
- migrate PollListMobile.vue (list + detail/vote + create + settle)
- migrate BetListMobile.vue (list + detail/place-bet + create + close/settle)
- GroupViewMobile: wire polls/bets tabs (replace placeholders)
- verified: polls API (8 fns) + bets API (8 fns) match uat

build verified: vue-tsc + vite build pass
2026-06-18 11:11:40 +08:00
锦麟 王 0ec868c949 feat(mobile): stage 5 - voice room (VoiceRoomMobile)
- migrate VoiceRoomMobile.vue (member grid + mic/speaker/leave controls + app placeholder)
- router: wire VoiceRoom mobile view
- verified: users API getUser() + team store loadActiveSession() + types displayName() match uat

build verified: vue-tsc + vite build pass
2026-06-18 11:09:10 +08:00
锦麟 王 446dbf8ae0 feat(mobile): stage 4 - group detail core (GroupViewMobile + activity/members tabs)
- migrate GroupViewMobile.vue (group header + quick entries + swipeable tabs)
- migrate ActivityFeedMobile.vue (team status + status-grouped members + create team popup)
- migrate MemberListMobile.vue (status groups + owner management: remove/approval/join requests)
- router: wire GroupView mobile view
- tabs structure: activity/members live; polls/bets/memories/stats use Placeholder
  pending stage 6/9 (sub-components not yet migrated)
- verified: sessions/group/user stores + groups/sessions/invitations APIs match uat

build verified: vue-tsc + vite build pass
2026-06-18 11:07:19 +08:00
锦麟 王 a303415857 feat(mobile): stage 3 - home, groups, notifications
- migrate HomeMobile.vue (status card, current session, groups, popular games)
- migrate GroupsMobile.vue (list + create/join popup + pull refresh)
- migrate NotificationsMobile.vue (invitations/join-requests tabs + app notifications)
- router: wire Home/MobileGroups/MobileNotifications mobile views
- verified: user/group/team/notification stores + groups/invitations APIs all match uat

note: event board NOT added to home (uat PC Home.vue doesn't integrate it either);
      events will be handled in stage 11 group detail tab

build verified: vue-tsc + vite build pass
2026-06-18 11:03:51 +08:00
锦麟 王 d4dbb1a10f feat(mobile): stage 2 - auth (LoginMobile + RegisterMobile)
- migrate LoginMobile.vue (nickname/email login, password field)
- migrate RegisterMobile.vue (auto-generated username)
- router: wire Login/Register mobile views
- verified: user store login()/register() signatures match uat

build verified: vue-tsc + vite build pass
2026-06-18 10:57:33 +08:00
锦麟 王 38c13ec50e feat(mobile): stage 1 - infrastructure (vant, useDevice, MobileLayout, router, mobile.css)
- add vant@^4.9.0 dependency
- migrate useDevice.ts (device detection + localStorage)
- migrate MobileLayout.vue (tabbar + navbar + store init)
- migrate mobile.css (vant theme -> --gg-* mapping)
- migrate Placeholder.vue for unimplemented mobile views
- index.html: viewport for mobile (no-zoom, safe-area)
- main.ts: register Vant + import mobile.css
- vite.config.ts: manualChunks code splitting (vue/element/vant/pocketbase/livekit)
- router/index.ts: device-based routing via isMobile() + view() helper,
  preserve uat's JoinGroup/JoinTeam routes, mobile views use Placeholder
  pending stages 2-11

build verified: vue-tsc + vite build pass
2026-06-18 10:54:12 +08:00
锦麟 王 0b999eebb0 docs(mobile): add uat mobile frontend redo design spec 2026-06-18 10:45:37 +08:00
congsh d76ecb15d6 feat: game aliases + edit permissions + scoped game select (v0.3.6)
- Add aliases field to games (json array), searchable in game library and team session
- Add edit functionality inside GameDetailDialog (creator/owner/admin can modify)
- Add permission control for delete/edit buttons (only visible to authorized users)
- Scope GameSelectDialog to current group only
- Support aliases in import/export

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 16:33:08 +08:00
congsh f3fe7d4f2d fix: PNG cover 404 via nginx + clear upload residual after submit
- Fix UAT nginx static cache rule intercepting /api/files/*.png requests,
  use negative lookahead to exclude /api/ paths (same as Dev config)
- Clear el-upload file list after successful game creation to prevent
  residual file path showing in next upload

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 14:29:32 +08:00
congsh ceafc873c7 feat: game cover file upload + fix game visibility rules
- Change game cover field from URL text to file upload (PocketBase migration)
- AddGameDialog now supports drag-and-drop image upload instead of URL input
- Add getGameCoverUrl() helper using pb.files.getUrl() for cover display
- Fix games listRule/viewRule: group.members.id syntax doesn't work in PB 0.22,
  changed to group.members ~ @request.auth.id for correct member visibility
- Update changelog with all v0.3.5 entries

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-23 19:09:57 +08:00
congsh 625645dad4 fix: approval queue loading timing and sync issues
- Fix GroupMembersPanel join requests not loading when navigating
  from homepage (onMounted timing issue), replaced with watch
- Fix GroupView pending count not syncing after reject/approve,
  added requestHandled event communication between components
- Update changelog with all v0.3.5 fixes and new features

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-23 17:21:04 +08:00
congsh a762a5bb4c feat: improve join request visibility for admins and applicants
- Add prominent pending join request badge on GroupView header
  with pulse animation for admins/owners
- Clicking badge smoothly scrolls to request list with highlight
- Add "My Join Requests" section on Profile page
- Show status (pending/approved/rejected), timestamp, and reject reason
- Add API: getMyJoinRequests() to fetch user's full request history

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-23 16:46:29 +08:00
congsh a062889a11 fix: bug fixes and UX improvements (v0.3.5)
- Fix clipboard copy error in HTTP environment with execCommand fallback
- Fix team invite page not loading user groups, always showing "join group first"
- Fix JoinGroupPage isMember check using group object instead of user ID
- Fix cancelRSVP deleting all users' RSVP records instead of current user's
- Fix event detail not loading event data itself
- Fix event comment avatar URL missing PocketBase baseUrl prefix
- Fix event creation missing endTime > startTime validation
- Fix event manage/delete permission split (creator+owner vs creator+owner)
- Fix event create button only visible to admins, now all members can create
- Fix event expand not subscribing to comments/RSVP realtime updates
- Fix event relative time not using status field
- Remove duplicate create/join group buttons from header and welcome bar
- Refactor team invite link to use API function

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 22:19:18 +08:00
congsh 2fec2108ca feat: onboarding optimization, invite links, admin roles, and event board
- Home: hide duplicate create/join buttons when user has no groups
- Invite links: /join/group/:id and /join/team/:id pages for one-click joining
- Admin: group admins field, ownership transfer, member management toggle
- Events: new events collection with RSVP (going/interested/maybe) and comments

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 17:27:24 +08:00
congsh 0cde794c85 chore: update gitignore for electron-update and docs/plans
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 16:14:33 +08:00
congsh 7f17dc826e refactor(deploy): separate Dev/UAT into independent full-stack environments
- Each environment now runs its own PB + LiveKit + Voice Token + frontend
- UAT LiveKit: 7890, Voice Token: 7893 (separate from Dev 7880/7883)
- Remove docker-compose.backend.yml, merge into dev compose
- Delete duplicate bulletin migration files that caused PB crash on startup
- Update CLAUDE.md, nginx configs, and .env files accordingly

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 16:12:18 +08:00
congsh 01412a0a94 feat(electron): separate dev/uat build targets with isolated update channels
- Add build.dev.json to override publish.url for dev environment
- Add build:dev and build:uat scripts; each sets its own feed URL
- copy-to-nas.js now accepts env argument; outputs to
  electron-update/{dev|uat}/ locally and on NAS
- docker-compose volume mounts updated to serve from env subdirs
- Remove stale artifacts from electron-update root

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 15:35:07 +08:00
congsh 671933d960 fix(electron): place update files in GameGroup2/electron-update subdir
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 15:18:38 +08:00
congsh 6b3cd288b1 feat(electron): add persistent auth, auto-updater, and NAS copy script
- Integrate electron-store for persistent PocketBase auth backup
  across localStorage clears and app reinstalls
- Switch build target from portable to nsis to generate latest.yml
  for electron-updater generic provider
- Add user confirmation dialogs before download and before install
- Add post-build script to copy .exe/.yml/.nupkg to NAS share and
  local electron-update/ directory for nginx volume mount
- Mount ./electron-update into frontend nginx containers via
  docker-compose for automatic update file serving

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 14:38:48 +08:00
congsh d3ef22f06e feat(bulletin): add detail dialog for full bulletin content viewing
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-21 14:07:51 +08:00
congsh 068708bbd7 Merge branch 'uat' of http://jiulu-gameplay.com.cn:13001/congsh/gamegroup2 into uat 2026-04-21 13:00:33 +08:00
congsh f99c44f716 feat(bulletin): add group bulletin board (信息公示板)
- Add bulletin_posts and bulletin_reads PocketBase collections with migrations
- Add BulletinPost/BulletinRead types and priority levels (low/normal/high/urgent)
- Add bulletin API (CRUD, read tracking, realtime subscription)
- Add bulletin Pinia store with pinned/normal sections and expiration filtering
- Add BulletinPinned header component for pinned announcements
- Add BulletinBoard tab component with sectioned list layout
- Add BulletinPostCard with priority tags, unread dots, and hover actions
- Add CreateBulletinDialog with title, content, priority, pinned, expiresAt
- Integrate bulletin tab into GroupView with Bell icon and real-time updates

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-21 12:46:35 +08:00
congsh 860ad7cbd8 docs: add v0.3.3 changelog entry
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 20:00:27 +08:00
congsh 3c2b68bbc3 fix(electron): enable mediaDevices on HTTP origins and fix voice auth
- Add --unsafely-treat-insecure-origin-as-secure flag for dev/uat URLs
- Set auto-granted permission handlers for mic/camera in main process
- Adapt useVoiceRoom error message for Electron (no Chrome flags hint)
- Add debug logging to voice-token service and frontend voice API

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-20 18:08:05 +08:00
congsh 4c7152ff50 feat(electron): add Electron desktop wrapper
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:54:27 +08:00
congsh 10574845f6 docs: add v0.3.2 changelog entry
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:48:35 +08:00
congsh 6b9fef1d69 fix(voice): add clear error message for HTTP mediaDevices restriction
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:42:29 +08:00
congsh c01aef48bd fix(voice): set LiveKit node-ip to host IP for WebRTC ICE connectivity
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:39:01 +08:00
congsh 2ed582faf0 fix(voice): upgrade LiveKit server from v1.7 to v1.10 for client v2 compatibility
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:36:01 +08:00
congsh f96652a8aa fix(voice): fix LiveKit LIVEKIT_KEYS env format in docker-compose
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:29:47 +08:00
congsh 5d434ead6f feat(voice): add real-time voice room with LiveKit
- LiveKit WebRTC SFU container in docker-compose
- Voice token microservice (Node.js + Express)
- VoiceRoom page with member grid and controls
- useVoiceRoom composable for LiveKit connection
- Voice entry button in TeamSessionPanel
- Nginx proxy for voice-token service API

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:24:28 +08:00
congsh 9d224e2fcd feat(voice): add livekit-client dependency
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 22:12:51 +08:00
congsh 81abb4b220 feat(voice): add LiveKit server container to docker-compose
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 21:06:21 +08:00
congsh c3d34c4660 docs: add v0.3.1 changelog entry
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 13:30:55 +08:00
congsh d528358867 feat: 玩家黑名单 - 记录外部平台坑玩家
- 新增 player_blacklist collection 迁移
- 添加 PlayerTag/PlayerBlacklistEntry 类型定义和 API
- 创建 PlayerBlacklistMain + CreatePlayerBlacklistDialog 组件
- BlacklistView 支持 Tab 切换游戏/玩家黑名单
- 支持搜索、标签筛选、严重程度筛选、实时订阅

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 13:03:55 +08:00
congsh 60ad9a04cd feat: phase 4 - 积分竞猜和游戏黑名单 v0.3.0
竞猜功能:发起竞猜、下注、关闭、开奖、奖池分配
黑名单功能:标记游戏、按原因/严重程度筛选、详情展开
修复:双重结算、TOCTOU竞态、订阅泄漏、选项选择兼容性

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-19 00:21:43 +08:00
congsh 2d56df940d docs: add v0.2.0 changelog entry
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:44:07 +08:00
congsh fdd1ae0929 fix: add $autoCancel:false to games API calls
GamesLibrary auto-cancellation error was caused by missing
$autoCancel:false on all games.ts PocketBase SDK calls.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:40:55 +08:00
congsh 19bf317d85 fix(phase3): description optional, restore nginx to host IP
- Make ledger description field optional (was required, caused 400)
- Revert nginx.conf back to 192.168.1.14:8090 (host IP, reliable)
- Keep docker-compose port mapping as 8090:8090
- Add $autoCancel:false to ledger/asset API calls

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:32:06 +08:00
congsh 221a8d7108 fix: restore Dev PocketBase port mapping to 8090
Was 8711:8090 but Dev PB should be on host port 8090 per CLAUDE.md
environment table. UAT remains on 8712.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:22:43 +08:00
congsh 09a7fe7708 fix: remove duplicate migrations, fix Dev nginx proxy target
- Remove 6 duplicate Phase 2 migration files (1776500001-0006) that
  failed on restart and blocked Phase 3 migrations from running
- Fix Dev nginx.conf proxy target from 192.168.1.14:8090 to
  gamegroup-pb:8090 (Docker internal DNS) since host port 8090 is
  not exposed (mapped as 8711:8090)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:14:11 +08:00
congsh dc11ef90fd fix(phase3): add $autoCancel:false to prevent SDK auto-cancellation
PocketBase JS SDK auto-cancels pending requests when a new request
targets the same collection. This causes errors when loadLedgers and
getLedgerSummary run in parallel via Promise.all. Added $autoCancel:false
to all API calls in ledgers.ts and assets.ts, matching project convention.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 20:05:27 +08:00
congsh e4b730c8db fix(phase3): subscription leak, image mime type validation
- Ledger store: add stopSubscription() to properly clean up realtime
  subscriptions, matching asset store pattern
- LedgerList: call stopSubscription on unmount
- Assets migration: restrict image upload to image/* mime types
  (C3 updateRule is a known tradeoff — PocketBase lacks field-level
  permissions, frontend enforces edit restrictions instead)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 19:52:34 +08:00