|
|
b95777e58d
|
fix(editor): 修复 SSR 直接访问时可运行代码块不挂载 CodeMirror
CodeRunner 原用 use_hook(|| format!("code-runner-{}", now_pseudo_unique()))
生成容器 id,后缀依赖 now_millis() 时间戳。Dioxus hydration 不传递
use_hook 状态——SSR 渲染与客户端 hydration 各执行一次 use_hook,时间戳
(以及顺带验证过的 ScopeId)两端不同,导致 CodeMirror create() 在 hydration
时用新 id 去 getElementById,找不到 SSR 渲染的容器(id 是旧值),返回 null
不挂载。路由跳转是纯客户端渲染,use_hook 只跑一次 id 一致,故正常。
改为由父组件传入确定性的 instance_id(PostContent 的片段索引 i,来自纯函数
split_content_fragments 对同一 content_html 的解析,SSR 与 hydration 一致),
container_id 直接派生自该 prop,不进 use_hook。admin 试运行页单实例固定 0。
Playwright(release 构建)验证:SSR 直接访问与路由跳转 .cm-editor 均为 1。
|
2026-07-08 11:04:40 +08:00 |
|
|
|
a4331bd813
|
feat(build): add FreeBSD x86_64 cross-compile support
方案 A(clang + lld + 本地 sysroot)。rustc 为 freebsd target 链接的系统库
(libc/libexecinfo/libgcc_s/libthr)及 sysinfo 依赖的 freebsd 专有库
(libkvm/libmemstat/libprocstat/libdevstat)需 FreeBSD 运行时,无法纯靠
clang+lld 无 sysroot 完成;故从 FreeBSD 15.1 base.txz 解出 crt 对象 + 系统库
到 .freebsd-sysroot/(gitignored,machine-local)。
- .cargo/config.toml: freebsd target 配置作为注释模板(sysroot 路径机器相关,
不硬编码进仓库);linker 经 rustflags 的 -C linker=clang 设置,使 Makefile
能用 CARGO_TARGET_*_RUSTFLAGS 环境变量整体注入。
- Makefile: 新增 freebsd-sysroot(幂等下载+解压 base.txz)与 build-freebsd
(release server 二进制交叉编译)target。server 用 cargo 直出而非 dx CLI,
因 dx 对该 target 的支持未经验证。
- .gitignore: 忽略 .freebsd-sysroot/。
- AGENTS.md: 补充构建命令说明。
实测 release 二进制 16MB,stripped ELF for FreeBSD 15.1,动态依赖均为
FreeBSD base 自带库(libc.so.7 libthr.so.3 libkvm.so.7 等)。
|
2026-07-01 13:40:00 +08:00 |
|
|
|
6e94db0c2b
|
feat(admin): add backup/restore tab (dual-mode + task progress polling)
新增 dashmap 依赖。create_backup 探测 pg_dump 优先(含 schema,签名头前置)、
不可用回退纯 SQL(COPY TO STDOUT 逐表,按表精确进度)。restore_backup 校验
签名头(仅本系统备份)+ 路径穿越防护 + 二次确认,探测 psql 执行。
list_backups/delete_backup 管理备份,GET /api/database/backups/{name} 下载
(admin 鉴权 + 白名单)。tasks.rs DashMap 进度表(1h 惰性 GC),前端每 1.5s
轮询 get_task_progress 显示进度条/stage,完成后刷新列表。
backups/ gitignored 不直接暴露。AGENTS.md 同步新增 CodeMirror 子项目与
数据库管理章节。
|
2026-06-29 19:16:11 +08:00 |
|
|
|
c74e59485d
|
feat(editor): add codemirror-editor subproject + Rust bridge
新建 libs/codemirror-editor(pnpm/Vite IIFE/@catppuccin/codemirror Catppuccin
Latte+Mocha 主题/@codemirror/lang-sql schema 补全/@replit/codemirror-vim),
输出 public/codemirror/。Rust 桥接 codemirror_bridge.rs 镜像 tiptap_bridge.rs
(Reflect::get 取对象字面量 + EditorHandle 持有闭包 + Drop→destroy)。
接入 Makefile/Dioxus.toml/.gitignore。
注意:thememirror 不含 catppuccin 主题,改用官方 @catppuccin/codemirror@1.0.3
(导出 catppuccinLatte/catppuccinMocha)。
|
2026-06-29 18:24:38 +08:00 |
|
|
|
afabdf4655
|
chore(core): 搭建 yggdrasil-core 子工程骨架
照搬 lightbox 的 Vite IIFE 工程结构,作为核心 JS 统一归处。
此 commit 仅打通构建管线,业务逻辑后续 task 填入。
同时把 public/yggdrasil-core 加入根 .gitignore。
|
2026-06-26 13:51:39 +08:00 |
|
|
|
33db6dc5aa
|
feat(doc): 文档托管到 /doc 路径
- main.rs: static_routes 加 /doc 与 /doc/ 的 301 重定向到
/doc/yggdrasil/index.html,绕开 Router 的 /:..segments 兜底。
文档深层路径由 Dioxus 自动托管 public/ 提供,无需额外代码。
- .gitignore: 忽略 public/doc 构建产物(配合 make doc 拷贝)
|
2026-06-26 11:04:29 +08:00 |
|
|
|
3284b03819
|
build: register lightbox assets in Dioxus.toml, gitignore public/lightbox
|
2026-06-24 11:04:29 +08:00 |
|
|
|
81ee60a77d
|
chore: ignore .worktrees directory
Add .worktrees/ to .gitignore so isolated git worktrees created for
parallel development work are not accidentally tracked.
|
2026-06-15 10:50:48 +08:00 |
|
|
|
b898b55308
|
chore: add profile.json.gz to .gitignore
|
2026-06-12 10:56:56 +08:00 |
|
|
|
5ecd8a9b86
|
feat: add disk-level cache for processed image variants
|
2026-06-09 13:45:49 +08:00 |
|
|
|
16248ca330
|
chore: create uploads directory for image storage
|
2026-06-05 14:49:22 +08:00 |
|
|
|
45b784d6b4
|
chore: add superpowers to gitignore
|
2026-06-03 17:35:25 +08:00 |
|
|
|
a886574696
|
chore: ignore static/ SSR cache dir
|
2026-06-03 14:56:43 +08:00 |
|
|
|
5e449013d6
|
refactor(highlight): output CSS to public/, add syntax aliases and case-insensitive lookup, fix code block CSS
|
2026-06-03 14:08:16 +08:00 |
|
|
|
34e3bcdf95
|
fix: address code review feedback
- Remove unnecessary 'style' from ammonia whitelist (syntect uses classes)
- Log syntect parse errors instead of silently discarding them
- Simplify find_syntax fallback: return &'static directly, remove OnceLock
- Add generated/highlight.css to .gitignore (build artifact)
- Add #[cfg(feature = "server")] guard on mod highlight in main.rs
- Remove redundant code_buffer/code_lang clear on CodeBlock end
|
2026-06-03 13:13:29 +08:00 |
|
|
|
2b90fd05d6
|
将 session 清理错误日志改为 Debug 格式并忽略 tiptap 资源目录
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
2026-06-02 17:33:28 +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 |
|
|
|
4a73e4d931
|
将生成的 style.css 从版本控制中移除
|
2026-05-26 14:29:59 +08:00 |
|
|
|
c2d5619855
|
移除首页,将根路径重定向到登录页,添加注册链接
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-26 10:22:05 +08:00 |
|
|
|
0b15cc7e1c
|
切换到本地 Tailwind CSS 构建并清理项目文件
- 移除 CDN Tailwind,改用本地构建的 style.css
- 添加 package.json、tailwind.config.js、input.css 构建配置
- 清理 prd.json、progress.txt 及误创建的文件
- 修复 login.rs 中未使用变量命名 (_token → token)
- 更新 .gitignore 排除 node_modules 和 package-lock.json
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-25 17:35:02 +08:00 |
|
|
|
2dd53e3516
|
Initial commit: Dioxus project scaffold
Add project configuration and main entry point.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
2026-05-25 15:00:12 +08:00 |
|