feat(admin): add tooltip to rebuild content button
Pure CSS tooltip appears on hover, inverted color scheme (white-on-dark / dark-on-light) matching admin aesthetic.
This commit is contained in:
parent
67e23d672c
commit
c62cf5a239
@ -61,6 +61,7 @@ pub fn PostsPage(page: i32) -> Element {
|
||||
"文章管理"
|
||||
}
|
||||
div { class: "flex items-center gap-3",
|
||||
div { class: "group relative",
|
||||
button {
|
||||
class: if rebuilding() {
|
||||
"px-4 py-2 rounded-full text-sm font-medium cursor-not-allowed text-gray-400 dark:text-[#666] border border-gray-300 dark:border-[#444]"
|
||||
@ -85,6 +86,10 @@ pub fn PostsPage(page: i32) -> Element {
|
||||
},
|
||||
if rebuilding() { "重建中..." } else { "重建内容" }
|
||||
}
|
||||
div { class: "pointer-events-none absolute bottom-full left-1/2 -translate-x-1/2 mb-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-gray-900 dark:bg-white text-white dark:text-gray-900 shadow-lg",
|
||||
"重建 content_html 为空的文章渲染缓存"
|
||||
}
|
||||
}
|
||||
Link {
|
||||
class: "px-4 py-2 bg-gray-900 dark:bg-[#dadadb] text-white dark:text-gray-900 rounded-full text-sm font-medium hover:opacity-80 transition-opacity cursor-pointer",
|
||||
to: Route::Write {},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user