Commit Graph

19 Commits

Author SHA1 Message Date
ef605de159 fix(user): default to current company in user edit popup
Pass currentCompanyId to Popup so the form defaults to the
currently active company instead of always picking the first
item from companyList.
2026-07-31 18:01:25 +08:00
08e695b9ad feat(company): enhance expiry warning with rich i18n and day ranges
Add red rich-text style to useRichI18n. Update CompanyExpireWarning to
show info/warning/error states based on remaining days and render rich
formatted countdown text.
2026-07-31 17:01:23 +08:00
795962e61f feat(company): add quick expiry date presets and i18n translations
Add date picker presets for validityEndTime: 7/30/60/90 days later.
Extract preset labels into i18n files for zh-CN and en-US.
2026-07-31 17:00:06 +08:00
318728b121 refactor(company): extract ExpireOrApp guard component from app.tsx
- Move ExpireOrApp logic into standalone component under components/ExpireOrApp
- Remove unused React hooks and CompanyExpireGuard import from app.tsx
- Use dayjs.utc for validity date to prevent timezone offset issues
- Remove stale console.log from CompanyExpireWarning
2026-07-30 21:33:48 +08:00
2a8d213c0f feat(profile): fix expired text show 2026-07-29 20:59:47 +08:00
2589205efd Merge branches 'feat/company-expire' and 'feat/platform-limit' into dev/2.0
Resolved conflicts:
- typings.d.ts: Keep both validity fields and platform quota fields in CompanyListItem
- company/Popup.tsx: Merge imports (Card, Col, Row from platform-limit + Dayjs from company-expire)
- company/index.tsx: Keep useAccess and Typography imports needed by company-expire
- rules/index.tsx: Keep validityStatus check from company-expire, adopt simplified clone button from platform-limit

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-29 20:38:13 +08:00
4085393db1 feat(company): add expiry warning banner, route wrapper, and conditional UI for expired companies
- Add CompanyExpireWarning component to layout header for expiring subscription alerts
- Add CompanyExpire wrapper to guard rules and data-source routes
- Refactor CompanyExpireGuard to support optional fullscreen mode via prop
- Add responsive Popover support to VoiceCheck for mobile breakpoints
- Hide rule CRUD action buttons when company validity is expired
- Update profile page to display expiry status alongside validity date
- Update i18n strings for clearer expiry messaging

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-29 20:28:06 +08:00
fc55965555 feat(company): add subscription expiry management and expired company guard
Add validity period fields to company CRUD, display expiry info in
table and profile, and block access for expired companies via a
full-screen guard component.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-29 16:15:58 +08:00
3c636bcaa2 refactor(copy-rule): extract context and improve batch clone modal
- Extract MultiCopyPopupContext to standalone context.ts file
- Add Task type and improve type safety in BatchCloneModal
- Use useRef/useCallback to stabilize batch clone handlers
- Add cleanup effect for selectRules in RuleCheckCard on unmount

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-15 23:05:56 +08:00
16999ca583 feat(clone): allow same-source cloning and disable cross-sourceType targets
- Remove the restriction that prevents cloning to the same data source
- Disable (instead of hide) target options with different sourceType
- Add sourceType label (MT4/MT5) to data source select options
- Preserve groupFilter/param1/param2 when cloning to same source
- Auto-reset target when source changes to incompatible sourceType
- Remove parent-level check requiring at least 2 data sources

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-14 21:39:01 +08:00
dfcba94cf5 feat(platform): add platform access control with quota management
- Add userPlatform hook to derive available platforms from company config
- Add platform access section in company popup with MT4/MT5 switch and quota limits
- Add platform access column in company list showing quota usage
- Replace hardcoded platform options with dynamic userPlatform in account/alert/data-source pages
- Add getPlatformList API and extend CompanyListItem typings
- Add i18n translations for platform access related keys
- Update dev proxy target port to 8082

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-12 17:57:25 +08:00
43d6e9207a feat: add permission-based access control and improve alert table UI
- Implement PermissionGuard component for route-level permission enforcement
- Add tree-based permission checkbox group in role management popup
- Gate SSE connection, unread count fetch, and rule edit actions on user permissions
- Add skip401Refresh option and auto token refresh on 401 response
- Improve alert table with fixed columns, explicit widths, and text ellipsis
- Add i18n entries for permission guide and rule menu descriptions (en/zh)
- Add expo-api nginx proxy configuration
- Add .claude to .gitignore

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 18:04:07 +08:00
710da86521 fix(oper-log): fix json.parse error again 2026-05-24 16:22:42 +08:00
8c77d91e00 fix(oper-log): fix json.parse error 2026-05-24 15:54:24 +08:00
961a4076fb perf‌(group & symbol select): styles change 2026-05-19 14:10:08 +08:00
9cafea8efb feat(account): show account id and group in popup 2026-05-18 22:56:13 +08:00
331e4ff625 feat: add search result actions to symbol select 2026-05-18 17:42:02 +08:00
4efa3b7ac3 组选择加上对结果的操作 2026-05-18 17:18:22 +08:00
704bc34625 new 2026-04-24 20:30:52 +08:00