c26c62558e
fix: add status_badge_class for badge styling, restore posts table backgrounds
2026-06-04 16:17:41 +08:00
58e9dbc5b7
refactor: add status_label/status_class/formatted_date helpers to Post model
2026-06-04 16:13:49 +08:00
ce14c476b5
refactor: replace string-based navigation with typed Route and Link components
2026-06-04 14:55:18 +08:00
ccffab851a
fix: admin pages use client-only fetching; fix theme cookie parsing; restore custom skeletons
2026-06-03 14:55:50 +08:00
34e70f6c57
feat: SSR for admin pages
2026-06-03 14:33:49 +08:00
c6ced73bac
fix(admin): resolve compilation errors in posts and write pages
2026-06-03 10:57:22 +08:00
09060e12c0
fix(admin): cap tiptap editor ready-polling at 100 attempts
...
Replace infinite loop with bounded for-loop (100 × 100ms = 10s max).
On timeout the skeleton overlay is dismissed so the user can still
interact with the form instead of being stuck forever.
2026-06-03 10:34:06 +08:00
e6c3cacf12
chore: format with cargo fix
2026-06-03 10:12:04 +08:00
5544ea0c18
feat(admin): add cover_image input field in write form
2026-06-02 18:22:22 +08:00
f3c1718cd0
feat: add use_delayed_loading hook to prevent skeleton flash
2026-06-02 17:53:04 +08:00
9c5b09a278
chore: code cleanup - formatting, EOF newlines, model helper, and UI tweaks
2026-06-02 17:33:28 +08:00
b6cabe489f
feat: migrate frontend to database-driven posts
...
- Replace hardcoded POSTS with API-driven data in home, archives, tags
- Add post detail page /post/:slug with HTML rendering
- Add admin posts management page with list and soft delete
- Update dashboard with real stats from database
- Add admin navigation for posts management
- Fix PartialEq derives for Post, Tag, PostStats models
- Use use_resource and use_memo for data fetching with proper loading states
2026-06-02 17:33:28 +08:00
df339cb084
feat: add post creation form to write.rs
...
- Add summary, slug, tags, status fields to editor
- Integrate create_post API with validation
- Add loading and error states
- Keep Tiptap editor initialization intact
2026-06-02 17:33:28 +08:00
c924b1e643
修复编译器警告并改进代码质量
2026-06-02 17:33:28 +08:00
李林军
4093178fc3
添加tracing日志并重构服务器启动逻辑
2026-05-27 11:39:09 +08:00
9c834ba1df
添加骨架屏组件,优化 admin 路由切换和编辑器初始化体验
...
- AdminLayout 使用骨架屏替代简单"加载中"文字,保持布局结构一致避免闪烁
- WritePage 添加编辑器初始化骨架屏和就绪状态轮询
- 新增 admin_skeleton.rs 和 write_skeleton.rs 组件
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 09:25:26 +08:00
61376f6ba9
修复 admin 路由切换闪烁,全局替换原生导航为客户端路由
...
- 新增全局 UserContext,将用户认证状态提升到 App 级别缓存
- 将 /admin 和 /admin/write 改为嵌套路由,AdminLayout 作为共享父布局
- AdminLayout 使用 Outlet 渲染子页面,避免路由切换时重复挂载
- 修复所有原生 <a> 标签导致的整页刷新问题:
- Header 导航栏 Logo 和 NavItem
- 首页文章卡片、分页按钮
- 归档页文章条目
- 标签页标签云、文章卡片、标签链接
- 登录/注册页面链接
- Dashboard 快捷操作按钮
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 00:18:15 +08:00
f6d60520eb
集成 Tiptap Markdown 编辑器到文章撰写页面
...
- 新增 libs/tiptap-editor/ 打包子项目(Tiptap Core + StarterKit + Markdown)
- 构建产物输出到 public/tiptap/
- 替换原有的 textarea + pulldown_cmark 预览为 WYSIWYG 编辑器
- Makefile 新增 build-editor target
- Dioxus.toml 引入 editor.js 和 editor.css
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 17:46:04 +08:00
8b9c6aa83d
重构 admin 模块,新增共享组件和文章撰写页面
...
- 将 monolithic admin.rs 拆分为 admin/ 目录模块(dashboard、write)
- 新增 components 模块:Header、Footer、AdminLayout
- 新增 /admin/write 文章撰写页面,支持 Markdown 实时预览
- 添加 pulldown-cmark 依赖用于 Markdown 渲染
- .env 移出版本控制,新增 .env.example 模板
- Home、Archives、Tags、Login、Register 等页面适配新组件
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 16:13:18 +08:00