Commit Graph
4 Commits
Author SHA1 Message Date
kongkxandClaude Fable 5 46056ae4b0 feat(auth): wire permission gating through menu, routes and actions
The store's can()/useCan() helpers existed but were unused. Now:
- src/auth/permissions.ts PERM catalog mirrors backend keys
- every nav item carries a permission; sidebar filter reuses can()
- requirePermission() beforeLoad guard on all child routes (direct URLs
  redirect home when the session lacks the key)
- useCan() hides/disables mutation buttons: moderation actions,
  retranslate, robot-author edit/pause, category + locale CRUD, and the
  reserved-SID assign path (admin:sid:override hint)
- 403 responses toast 无权限执行此操作; can() unit tests added

Co-Authored-By: Claude Fable 5 <[email protected]>
2026-07-12 06:42:31 +08:00
kongkx 9c308c28da feat(studio/articles): show drafting_model (LLM used for draft)
Adds drafting_model to the article type and surfaces it in the detail sheet
(provider / model line + raw JSON block). Regenerates admin API types.
2026-07-08 22:33:22 +08:00
kongkx 3f3a8347eb feat(studio/articles): Dimzou draft preview
Adds a 预览 action (enabled once an article has a Dimzou document) opening a
sheet that fetches and renders the draft — cover, title, summary, and body HTML
(typography/prose). Re-enables the @tailwindcss/typography plugin for prose.
2026-07-08 22:23:49 +08:00
kongkx 61cb549e72 feat(studio): authors/series/articles/subtopics/briefs/style-presets + agent tokens (show-once) 2026-07-07 22:30:27 +08:00