style(admin/posts): 顶部重建按钮 loading 用 spinner 覆盖文字
工具条「重建内容」「重建全部」按钮 loading 时由「重建中...」文案 改为 spinner 居中覆盖、文字 opacity-40 衬底,与行内重建按钮的 loading 样式统一。
This commit is contained in:
parent
db87d3c886
commit
1530d3a2f4
@ -236,14 +236,19 @@ fn RebuildCacheBar(
|
|||||||
div { class: "flex items-center gap-3",
|
div { class: "flex items-center gap-3",
|
||||||
div { class: "group relative",
|
div { class: "group relative",
|
||||||
button {
|
button {
|
||||||
class: if rebuilding() { "px-4 py-2 rounded-full text-sm font-medium cursor-not-allowed text-paper-secondary border border-paper-border" } else { "px-4 py-2 rounded-full text-sm font-medium cursor-pointer text-paper-primary border border-paper-border hover:border-paper-accent hover:text-paper-accent transition-all" },
|
class: if rebuilding() { "relative px-4 py-2 rounded-full text-sm font-medium cursor-not-allowed text-paper-secondary border border-paper-border" } else { "px-4 py-2 rounded-full text-sm font-medium cursor-pointer text-paper-primary border border-paper-border hover:border-paper-accent hover:text-paper-accent transition-all" },
|
||||||
disabled: rebuilding(),
|
disabled: rebuilding(),
|
||||||
onclick: move |_| do_rebuild(false),
|
onclick: move |_| do_rebuild(false),
|
||||||
if rebuilding() {
|
span {
|
||||||
"重建中..."
|
class: if rebuilding() { "opacity-40" } else { "" },
|
||||||
} else {
|
|
||||||
"重建内容"
|
"重建内容"
|
||||||
}
|
}
|
||||||
|
if rebuilding() {
|
||||||
|
span {
|
||||||
|
class: "absolute inset-0 flex items-center justify-center",
|
||||||
|
dangerous_inner_html: SPINNER_SVG,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
div { class: "pointer-events-none absolute top-full left-1/2 -translate-x-1/2 mt-2 px-3 py-1.5 text-xs font-medium whitespace-nowrap rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 bg-paper-primary text-paper-theme shadow-lg z-50",
|
div { class: "pointer-events-none absolute top-full left-1/2 -translate-x-1/2 mt-2 px-3 py-1.5 text-xs font-medium whitespace-nowrap rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 bg-paper-primary text-paper-theme shadow-lg z-50",
|
||||||
"重建 content_html 为空的文章渲染缓存"
|
"重建 content_html 为空的文章渲染缓存"
|
||||||
@ -251,14 +256,19 @@ fn RebuildCacheBar(
|
|||||||
}
|
}
|
||||||
div { class: "group relative",
|
div { class: "group relative",
|
||||||
button {
|
button {
|
||||||
class: if rebuilding() { "px-4 py-2 rounded-full text-sm font-medium cursor-not-allowed text-paper-secondary border border-paper-border" } else { "px-4 py-2 rounded-full text-sm font-medium cursor-pointer text-paper-primary border border-paper-border hover:border-paper-accent hover:text-paper-accent transition-all" },
|
class: if rebuilding() { "relative px-4 py-2 rounded-full text-sm font-medium cursor-not-allowed text-paper-secondary border border-paper-border" } else { "px-4 py-2 rounded-full text-sm font-medium cursor-pointer text-paper-primary border border-paper-border hover:border-paper-accent hover:text-paper-accent transition-all" },
|
||||||
disabled: rebuilding(),
|
disabled: rebuilding(),
|
||||||
onclick: move |_| do_rebuild(true),
|
onclick: move |_| do_rebuild(true),
|
||||||
if rebuilding() {
|
span {
|
||||||
"重建中..."
|
class: if rebuilding() { "opacity-40" } else { "" },
|
||||||
} else {
|
|
||||||
"重建全部"
|
"重建全部"
|
||||||
}
|
}
|
||||||
|
if rebuilding() {
|
||||||
|
span {
|
||||||
|
class: "absolute inset-0 flex items-center justify-center",
|
||||||
|
dangerous_inner_html: SPINNER_SVG,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
div { class: "pointer-events-none absolute top-full left-1/2 -translate-x-1/2 mt-2 px-3 py-1.5 text-xs font-medium whitespace-nowrap rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 bg-paper-primary text-paper-theme shadow-lg z-50",
|
div { class: "pointer-events-none absolute top-full left-1/2 -translate-x-1/2 mt-2 px-3 py-1.5 text-xs font-medium whitespace-nowrap rounded-lg opacity-0 group-hover:opacity-100 transition-opacity duration-200 bg-paper-primary text-paper-theme shadow-lg z-50",
|
||||||
"重建所有文章的渲染缓存(含已有内容)"
|
"重建所有文章的渲染缓存(含已有内容)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user