Commit graph

274 commits

Author SHA1 Message Date
yun-zhi-ztl
3f1985da46 fix(web): adapt header controls to landing theme 2026-03-14 18:19:41 +08:00
yun-zhi-ztl
c08fd7306b fix(web): align language switcher text color 2026-03-14 18:18:08 +08:00
yun-zhi-ztl
a6cf862e8e merge(main): sync latest origin/main into feature/project-review
Resolved 9 conflicts according to documented strategy:
- .gitignore: kept both entries (docs/review/ + CLAUDE.md)
- ClawHubCompatController.java: manual merge (use @AuthenticationPrincipal + platformRoles)
- ClawHubCompatControllerTest.java: kept ours (HEAD security tests)
- CliControllerTest.java: kept ours (HEAD platform roles tests)
- ReviewPermissionChecker.java: kept ours (stricter permission model)
- SkillPublishService.java: kept theirs (main SUPER_ADMIN bypass + events)
- SkillPublishServiceTest.java: kept theirs (main complete test suite)
- router.tsx: manual merge (HEAD's createLazyRouteComponent + main's privacy/terms)
- markdown-renderer.tsx: kept ours (HEAD frontmatter stripping + styles)

All A1-A9 security fixes preserved. No new logic introduced.
2026-03-14 17:50:38 +08:00
yun-zhi-ztl
d64c92f4cf fix(web): use light text colors for landing page header nav
Override LanguageSwitcher, UserMenu, and login link text colors
to slate-200/300 so they are visible on the dark landing background.
2026-03-14 17:36:56 +08:00
yun-zhi-ztl
fd790a9610 feat(web): add header nav to landing page and local dev improvements
- Add sticky header with LanguageSwitcher and UserMenu to landing page
- Update token dialog and i18n translations
- Fix dev process script and compose release config
- Remove stale skillhub submodule reference
2026-03-14 17:32:47 +08:00
yun-zhi-ztl
cfc296181f fix : temp debug 2026-03-14 17:32:47 +08:00
wowo
b96126a267 Merge pull request #20 from iflytek/bugfix/require-auth-for-download
fix: require authentication for downloads and fix download count increment
2026-03-14 17:22:38 +08:00
wowo_zZ
41b0f8ce1b feat(web): add legal pages and footer links 2026-03-14 17:14:16 +08:00
wowo-zZ
56e7baed15 fix(auth): require authentication for skill downloads
- Remove download endpoints from permitAll list in SecurityConfig
- Add authentication checks to download tests
- Add login redirect for unauthenticated download attempts in frontend

This prevents unauthorized access to skill package downloads while
maintaining public access to skill metadata and file listings.
2026-03-14 16:54:10 +08:00
wowo-zZ
e97752735c fix(auth): improve logout flow to always redirect to home
- Use window.location.href for full page refresh
- Move redirect to finally block to ensure it always executes
- Fix V7 migration to be a no-op since column is already jsonb
2026-03-14 15:40:53 +08:00
wowo-zZ
611253fe21 feat(nav): add explore link to navbar with responsive design
- Group Logo and main nav links on the left
- Add explore link pointing to /search
- Use hidden md:flex for mobile responsiveness
- Maintain consistent spacing (gap-8 for Logo-nav, gap-6 for nav links)
2026-03-14 15:40:53 +08:00
wowo-zZ
39fc20f124 feat(i18n): add English translation for explore nav link 2026-03-14 15:40:53 +08:00
wowo-zZ
7f481cb958 feat(i18n): add Chinese translation for explore nav link 2026-03-14 15:40:53 +08:00
wowo
58ca1d0c9e Merge pull request #13 from iflytek/fix/allow-anonymous-skill-detail-view
fix(web): improve anonymous user experience on skill detail page
2026-03-14 14:27:10 +08:00
wowo-zZ
798872f09a fix(web): improve anonymous user experience on skill detail page
- Add proper error handling for skill detail API errors
- Show friendly login prompt when anonymous users access private skills
- Show access denied message when authenticated users lack permission
- Add i18n translations for new error messages (en/zh)

This allows anonymous users to view PUBLIC skills while providing
clear guidance when they encounter private or restricted content.
2026-03-14 12:01:21 +08:00
wowo-zZ
01c5d43625 feat(web): add SkillHub logo as browser favicon
Add favicon.svg to web/public directory and configure it in index.html
to display the SkillHub logo in browser tabs.
2026-03-14 11:45:55 +08:00
vsxd
ac352314f7 Add extensible auth compatibility layer for private SSO 2026-03-13 18:00:22 +08:00
vsxd
b1aeb3c8a2 Fix web health check for release compose 2026-03-13 17:00:47 +08:00
vsxd
9ae9b93ca7 Refine production compose runtime config 2026-03-13 17:00:47 +08:00
vsxd
14d86c290a chore(release): v0.1.0-beta.7 2026-03-13 16:05:08 +08:00
vsxd
a773b87e68 Adjust landing footer and remove CTA section 2026-03-13 15:15:13 +08:00
vsxd
0ab6b48ac6 fix(web): localize landing footer license text 2026-03-13 14:53:28 +08:00
vsxd
1fb70a99f2 Merge remote-tracking branch 'origin/main' 2026-03-13 14:50:32 +08:00
vsxd
de5956476b Sync header auth state after login 2026-03-13 14:48:01 +08:00
vsxd
c2b75bf961 Refine skill install command layout 2026-03-13 14:44:28 +08:00
vsxd
2170412bda feat(web): complete i18n coverage for all pages and components
Replace hardcoded Chinese strings with t() calls across 36 files.
Expand translation keys from ~160 to 412 covering all pages, features,
and shared components. Fix date formatting to use dynamic i18n locale.
2026-03-13 14:43:26 +08:00
wowo-zZ
72a14d2e8a refactor(web): simplify landing page and update typography
- Change font class from font-display to font-heading in home page
- Adjust landing page title tracking from tight to normal
- Remove redundant CTA section from landing page
- Simplify footer links to GitHub only with proper external link attributes
2026-03-13 14:34:17 +08:00
vsxd
d82665baba feat(review): allow admins to review their own submissions 2026-03-13 14:23:20 +08:00
vsxd
7f1e9b96fe fix(web): change namespace URL prefix from /@namespace to /space/namespace to avoid route conflicts 2026-03-13 13:59:55 +08:00
vsxd
e4ae46515e chore: remove stale package-lock.json and add to gitignore
Project uses pnpm, these npm lock files were causing spurious changes on every install.
2026-03-13 13:58:11 +08:00
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