Commit graph

394 commits

Author SHA1 Message Date
vsxd
9b5154cc51 feat(web): add unified API error handling and complete i18n coverage
- Add ApiError class with status code for structured error handling
- Add global QueryCache/MutationCache error handlers with auto-toast
- Auto-redirect to login on 401, show appropriate messages for 403/404/5xx
- Add i18n to review-detail.tsx, token-list.tsx, confirm-dialog.tsx
- Add review, token, apiError translation keys to zh.json and en.json
2026-03-13 13:55:59 +08:00
vsxd
066bbc8f00 fix(web): fix i18n language switching and add translations
- Fixed language switcher to handle language codes with region (zh-CN -> zh)
- Added translations for publish page, toast, and dialog components
- Added i18n keys for all new UI text
- Created TODO.md to track pending frontend improvements

Pending tasks:
- Complete i18n for all remaining components
- Implement unified API error handling
- Replace remaining alert/confirm calls
2026-03-13 13:42:57 +08:00
vsxd
0200d21f0e feat(web): implement toast notifications and SPA dialogs
- Added sonner toast library for notifications
- Created Toaster component with custom styling
- Created toast utility with success/error/warning/info methods
- Created ConfirmDialog component for confirmations
- Replaced browser alert() with toast notifications in:
  - Publish page: added review notice and toast feedback
  - Token list: replaced confirm() with ConfirmDialog
  - Review detail: replaced alert/confirm with toast and dialogs
- Added review notice in publish page explaining admin approval process
- Improved user experience with in-page notifications instead of browser popups

Database changes:
- Added SKILL_ADMIN role to user usr_da52079c-3329-4a5c-a631-8eadfb865a79
2026-03-13 13:41:10 +08:00
vsxd
389604e866 fix(web): fix skill detail page issues
- Fixed double @ in namespace display (@@global -> @global)
- Added download button functionality to download skill package
- Download button is disabled when no version is available
- Cleaned namespace parameter before constructing download URL
2026-03-13 13:31:12 +08:00
vsxd
8d01cc0976 feat(web): add role-based menu item visibility
- Added platformRoles to User interface in UserMenu
- Implemented role checks for menu items:
  - Reviews: SKILL_ADMIN, NAMESPACE_ADMIN, SUPER_ADMIN
  - Promotions: SKILL_ADMIN, SUPER_ADMIN
  - User Management: USER_ADMIN, SUPER_ADMIN
  - Audit Log: AUDITOR, SUPER_ADMIN
- Added translations for new menu items
- Menu items now only show for users with appropriate permissions
2026-03-13 13:29:02 +08:00
vsxd
9905763f6b fix(web): correct terminology for reviews menu item
Changed "我的评论" to "审核管理" to accurately reflect that this
is the review management page, not comments page.
2026-03-13 13:26:19 +08:00
vsxd
e525e381d8 fix(web): correct route path parameters for namespace and skill detail
- Changed route paths from @$namespace to /$namespace to match TanStack Router syntax
- Added @ prefix stripping in API calls to match backend expectations
- Fixed useParams from parameter to match new route paths
- URL format remains /@namespace/slug but route captures @namespace as parameter
2026-03-13 13:25:37 +08:00
yun-zhi-ztl
cab3bc3f8c Merge branch 'main' into feature/project-review 2026-03-13 13:21:51 +08:00
vsxd
969464afba feat(web): implement i18n and user menu
- Added i18next for internationalization support
- Created language switcher component with zh/en support
- Refactored user navigation into dropdown menu
- Moved Dashboard, Security, and Account settings into user menu
- Added translation files for Chinese and English
- Updated layout to use i18n for all text content
2026-03-13 13:21:05 +08:00
vsxd
ebd72bc422 fix(web): ensure all page navigation uses 0-based index
Fixed remaining instances in landing.tsx and layout.tsx where
page was still set to 1 instead of 0.
2026-03-13 13:16:35 +08:00
vsxd
9811540141 fix(web): 修复路由导航参数替换问题
TanStack Router 的 to 路径不会自动替换 $param,需要用模板字符串手动拼接。
修复所有 navigate 调用,避免 URL 中出现字面量 @$namespace。

涉及: home, search, namespace, my-skills, my-namespaces, stars, reviews
2026-03-13 13:06:04 +08:00
vsxd
303c27bca7 fix(web): 统一前端分页为0-based page index
与后端 Spring Data 的 0-based 分页对齐,修复首页数据不显示的问题。
涉及: router, search, home, landing, pagination 组件
2026-03-13 12:58:28 +08:00
yun-zhi-ztl
447a34a1d1 merge(main): sync latest origin/main into feature/project-review 2026-03-13 12:49:12 +08:00
vsxd
ac32fce08f fix(auth): preserve return target across oauth login 2026-03-13 11:59:17 +08:00
yun-zhi-ztl
9021ba754e fix(web): clear lint gate and split route bundles
Remove the markdown renderer ts-ignore workaround by applying prose styling at the container level, which clears the remaining lint failure without changing rendered behavior.

Convert top-level pages to route-level lazy imports with a shared suspense fallback so the main bundle is no longer forced to include every page upfront. Verified with pnpm run lint, pnpm run typecheck, and pnpm run build; the entry chunk dropped from roughly 770 kB to 338.77 kB after the split.
2026-03-13 11:54:47 +08:00
vsxd
84dd08503d merge: bring feature/project-init into main for beta3
# Conflicts:
#	scripts/smoke-test.sh
2026-03-13 11:45:56 +08:00
vsxd
c499571408 fix(web): redirect unauthenticated users back after login 2026-03-13 11:43:14 +08:00
vsxd
f16885a39d fix(web): normalize protected route matching 2026-03-13 11:41:02 +08:00
vsxd
8171a190a7 fix(web): prevent landing page from matching nested routes 2026-03-13 11:37:22 +08:00
vsxd
68af8047b8 Complete phase 3 and 4 frontend flows 2026-03-13 11:36:39 +08:00
vsxd
56aeb424af fix(web): landing page no longer nested inside Layout header/footer
When pathname is '/', Layout now renders only the Outlet without its
own header/footer chrome, so the landing page's self-contained layout
displays correctly.
2026-03-13 11:08:35 +08:00
vsxd
3cee8fbb5a fix(phase4): harden smoke checks and metrics access 2026-03-13 10:56:28 +08:00
vsxd
0ca38e73ba merge: bring phase4 worktree implementation into feature/project-init
# Conflicts:
#	server/skillhub-app/src/main/java/com/iflytek/skillhub/controller/cli/CliPublishController.java
#	server/skillhub-app/src/main/java/com/iflytek/skillhub/controller/portal/SkillPublishController.java
#	server/skillhub-storage/src/main/java/com/iflytek/skillhub/storage/LocalFileStorageService.java
#	web/src/app/router.tsx
2026-03-13 10:35:42 +08:00
vsxd
07ea0fa822 merge: bring phase4 worktree implementation into main
# Conflicts:
#	server/skillhub-app/src/main/java/com/iflytek/skillhub/controller/cli/CliPublishController.java
#	server/skillhub-app/src/main/java/com/iflytek/skillhub/controller/portal/SkillPublishController.java
#	server/skillhub-storage/src/main/java/com/iflytek/skillhub/storage/LocalFileStorageService.java
#	web/src/app/router.tsx
2026-03-13 10:20:19 +08:00
vsxd
33c44fb9cc feat(phase4): complete auth, governance, observability, and ops polish 2026-03-13 10:17:48 +08:00
vsxd
62d9d88546 chore(release): cut v0.1.0-beta.2 2026-03-13 10:13:50 +08:00
vsxd
2ae5f7b43e docs: add landing page preview guide 2026-03-12 22:28:31 +08:00
vsxd
78a37e2430 feat(web): redesign homepage with modern landing page
- Add new landing page with particle animation system
- Implement "Tech Weave" aesthetic with cyan/violet gradient theme
- Update fonts to Syne (headings) and IBM Plex Sans (body)
- Create hero section with search bar and CTA buttons
- Add feature showcase with 6 core capabilities
- Include stats display and call-to-action section
- Update routing to use landing page as homepage
- Keep original home page accessible at /skills route

Design highlights:
- Canvas-based particle connection animation (80 nodes)
- Dark theme with gradient effects and glow orbs
- Smooth fade-up animations with staggered delays
- Hover effects on cards and buttons
- Responsive layout for mobile/tablet/desktop
2026-03-12 22:27:58 +08:00
vsxd
8c5b4d176a feat(auth): add local username-password login 2026-03-12 21:59:28 +08:00
vsxd
3c9b95fd98 refactor(auth): remove local auth flow 2026-03-12 21:36:49 +08:00
vsxd
7beda7cf54 merge: bring local auth from phase4-ops-polish
# Conflicts:
#	web/src/pages/login.tsx
2026-03-12 21:31:54 +08:00
vsxd
05ec9bfbc2 feat(auth): add local username-password login 2026-03-12 21:27:01 +08:00
vsxd
6305fcca39 feat(frontend): redesign UI with Aurora Tech theme
- Typography: Playfair Display (hero serif) + Outfit (headings) + DM Sans (body) + JetBrains Mono (code)
- Color: light-first with cyan primary + violet accent, deep navy dark theme via .dark class
- Visual: dot-grid texture, gradient glow orbs, glassmorphism nav/search, card hover animations, staggered fade-in
- Layout: glass header, footer with links, hero with gradient text + CTA buttons
- Components: all UI primitives (Button/Card/Input/Tabs/Dialog/Table/Select/Textarea) updated
- Pages: all 15+ pages restyled including home, search, detail, login, dashboard, admin
2026-03-12 21:11:41 +08:00
vsxd
af78262c81 fix(frontend): use fetchJson and getCsrfHeaders in admin user mutations
Replace manual fetch + CSRF handling with shared fetchJson utility
for consistency with other hooks and proper ApiResponse unwrapping.
2026-03-12 20:23:53 +08:00
vsxd
3063a40c8f feat(web): add admin management pages
- Add admin users management page with role and status controls
- Add audit log page with filtering capabilities
- Create useAdminUsers and useAuditLog hooks for API integration
- Add route guards for USER_ADMIN, AUDITOR, and SUPER_ADMIN roles
- Register /admin/users and /admin/audit-log routes
2026-03-12 19:46:55 +08:00
vsxd
ddb940d5d5 feat(web): add review center, social features, and device auth page 2026-03-12 19:12:50 +08:00
vsxd
dbb6d9f39e feat(ops): improve Dockerfile caching, add dockerignore, docker profile, Makefile help
- Server Dockerfile: add Maven dependency caching layer for faster rebuilds
- Add .dockerignore for server and web to reduce build context
- Add docker profile to application.yml for container env var mapping
- Makefile: add help, logs, db-reset targets with ## annotations
2026-03-12 17:50:34 +08:00
vsxd
c6fd3c02f6 feat(web): update API client, hooks, and pages for Phase 2-3 2026-03-12 17:48:17 +08:00
vsxd
fe32dcddb6 fix(web): resolve TypeScript errors in Phase 2 pages and hooks 2026-03-12 02:56:54 +08:00
vsxd
9a1b14b11a feat(web): add all Phase 2 pages and routes 2026-03-12 02:54:19 +08:00
vsxd
8d223dc875 fix(web): use plain fetch for Phase 2 API hooks 2026-03-12 02:45:32 +08:00
vsxd
a3fe76eaeb feat(web): add Phase 2 frontend foundation - types, hooks, shared and feature components 2026-03-12 02:43:01 +08:00
vsxd
0b1607630f fix(phase1): close auth and frontend acceptance gaps 2026-03-12 00:37:51 +08:00
vsxd
e6956e79fc feat(web): implement login page, dashboard, and API token management
- Login page with dynamic OAuth provider buttons from /api/v1/auth/providers
- Dashboard with AuthGuard, user info display, and token management
- TokenList component with create/delete operations via TanStack Query
- CreateTokenDialog with one-time token display and copy functionality
- API client with typed auth and token endpoints
- shadcn/ui components: Button, Card, Dialog, Table, Input, Label
- Tailwind CSS with CSS variables theming
- TanStack Router with Home, Login, Dashboard routes
- ESLint + TypeScript strict mode configuration
2026-03-12 00:13:50 +08:00