Compare commits
3 Commits
886eeca915
...
22d05a98b3
| Author | SHA1 | Date | |
|---|---|---|---|
| 22d05a98b3 | |||
| 27ed605223 | |||
| bdc9f0f711 |
8
Makefile
8
Makefile
@ -120,11 +120,17 @@ lint:
|
|||||||
@cargo clippy --all-targets --all-features -- -D warnings
|
@cargo clippy --all-targets --all-features -- -D warnings
|
||||||
|
|
||||||
# JS + Rust 自动修复(直接写入文件)。
|
# JS + Rust 自动修复(直接写入文件)。
|
||||||
|
# 顺序:Biome → cargo fix(应用编译器建议,重写代码)→ cargo fmt(格式化 Rust)
|
||||||
|
# → dx fmt(格式化 RSX 宏)。两道格式化收尾,保证最终文件状态整洁。
|
||||||
fix:
|
fix:
|
||||||
@echo "==> Biome format (libs, 写入文件)"
|
@echo "==> Biome format (libs, 写入文件)"
|
||||||
@cd libs && pnpm exec biome format --write .
|
@cd libs && pnpm exec biome format --write .
|
||||||
@echo "==> Cargo fix (Rust)"
|
@echo "==> Cargo fix (Rust, 应用编译器建议)"
|
||||||
@cargo fix --allow-dirty
|
@cargo fix --allow-dirty
|
||||||
|
@echo "==> Cargo fmt (Rust, 格式化)"
|
||||||
|
@cargo fmt
|
||||||
|
@echo "==> Dioxus fmt (RSX 宏, 格式化)"
|
||||||
|
@dx fmt
|
||||||
|
|
||||||
# 只编译当前 crate 的文档(--no-deps 跳过依赖,--document-private-items
|
# 只编译当前 crate 的文档(--no-deps 跳过依赖,--document-private-items
|
||||||
# 让纯 binary crate 的内部模块/私有项也进文档,否则页面基本是空的)。
|
# 让纯 binary crate 的内部模块/私有项也进文档,否则页面基本是空的)。
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://biomejs.dev/schemas/2.5.1/schema.json",
|
"$schema": "https://biomejs.dev/schemas/2.5.3/schema.json",
|
||||||
"vcs": {
|
"vcs": {
|
||||||
"enabled": false
|
"enabled": false
|
||||||
},
|
},
|
||||||
|
|||||||
@ -154,7 +154,7 @@ export class CodeBlockNodeView {
|
|||||||
if (mutation.target === this.contentDOM && mutation.type === 'attributes') return true;
|
if (mutation.target === this.contentDOM && mutation.type === 'attributes') return true;
|
||||||
// contentDOM 内的 mutation(characterData/childList):交给 ProseMirror(编辑核心)
|
// contentDOM 内的 mutation(characterData/childList):交给 ProseMirror(编辑核心)
|
||||||
// 注意 contains 对 target===contentDOM 自身也返回 true,故上面的 attributes 判断须在前。
|
// 注意 contains 对 target===contentDOM 自身也返回 true,故上面的 attributes 判断须在前。
|
||||||
if (this.contentDOM && this.contentDOM.contains(mutation.target)) return false;
|
if (this.contentDOM?.contains(mutation.target)) return false;
|
||||||
// 工具栏/结果区等装饰元素的 mutation:忽略
|
// 工具栏/结果区等装饰元素的 mutation:忽略
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -53,5 +53,6 @@ html.is-theme-transitioning *::after {
|
|||||||
html.is-theme-transitioning .animate-page-enter {
|
html.is-theme-transitioning .animate-page-enter {
|
||||||
/* !important 必需:animation-fill-mode: both 保留的关键帧值优先级高于普通
|
/* !important 必需:animation-fill-mode: both 保留的关键帧值优先级高于普通
|
||||||
规则,只有 !important 能覆盖,确保 VT 期间 transform 被清为 none。 */
|
规则,只有 !important 能覆盖,确保 VT 期间 transform 被清为 none。 */
|
||||||
|
/* biome-ignore lint/complexity/noImportantStyles: animation-fill-mode: both 保留非 none transform 创建堆叠上下文,仅 !important 可覆盖(详见上方注释) */
|
||||||
transform: none !important;
|
transform: none !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -121,7 +121,6 @@ pub fn CommentSection(post_id: i32) -> Element {
|
|||||||
rsx! {
|
rsx! {
|
||||||
p { class: "text-paper-tertiary text-center py-8", "暂无评论,成为第一个评论的人吧!" }
|
p { class: "text-paper-tertiary text-center py-8", "暂无评论,成为第一个评论的人吧!" }
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
rsx! {
|
rsx! {
|
||||||
CommentList {
|
CommentList {
|
||||||
|
|||||||
@ -115,8 +115,7 @@ pub fn Admin() -> Element {
|
|||||||
"text-[var(--color-paper-secondary)]",
|
"text-[var(--color-paper-secondary)]",
|
||||||
"text-[var(--color-paper-primary)]",
|
"text-[var(--color-paper-primary)]",
|
||||||
)
|
)
|
||||||
}
|
};
|
||||||
}
|
|
||||||
rsx! {
|
rsx! {
|
||||||
div { class: "text-sm font-medium {color_class}", "待审评论" }
|
div { class: "text-sm font-medium {color_class}", "待审评论" }
|
||||||
div { class: "flex items-baseline justify-between mt-4",
|
div { class: "flex items-baseline justify-between mt-4",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user