fix: repair resource tab and slash menu regressions

This commit is contained in:
lix-2026
2026-05-20 17:47:09 +08:00
parent bbd9dab701
commit 4c62ea7e35
8 changed files with 404 additions and 17 deletions
@@ -307,7 +307,7 @@ pub fn DocumentPage(
role="tab"
aria-selected="true"
>
<span class="material-symbols-outlined" aria-hidden="true">"description"</span>
<span class="mnote-main-tab-badge" aria-hidden="true"></span>
<span class="mnote-main-tab-title">{title.clone()}</span>
</button>
</div>
+33 -3
View File
@@ -2417,9 +2417,34 @@ body {
box-shadow: inset 0 1px 0 #E9E9E8, inset 1px 0 0 #E9E9E8, inset -1px 0 0 #E9E9E8;
}
.mnote-main-tab .material-symbols-outlined {
font-size: 16px;
flex: 0 0 auto;
.mnote-main-tab-badge {
width: 14px;
height: 14px;
flex: 0 0 14px;
border-radius: 2px;
background: #6b7280;
box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
}
.mnote-main-tab[data-mnote-tab-kind="page"] .mnote-main-tab-badge,
.mnote-main-tab[data-mnote-tab-badge-kind="code"] .mnote-main-tab-badge {
background: #111111;
}
.mnote-main-tab[data-mnote-tab-badge-kind="word"] .mnote-main-tab-badge {
background: #4f7df3;
}
.mnote-main-tab[data-mnote-tab-badge-kind="ppt"] .mnote-main-tab-badge {
background: #d94841;
}
.mnote-main-tab[data-mnote-tab-badge-kind="sheet"] .mnote-main-tab-badge {
background: #2f9e44;
}
.mnote-main-tab[data-mnote-tab-badge-kind="image"] .mnote-main-tab-badge {
background: #5b6cf0;
}
.mnote-main-tab-title {
@@ -4195,6 +4220,11 @@ mod tests {
assert!(MNOTE_CSS.contains("background: #2f9e44"));
assert!(MNOTE_CSS.contains("a.mnote-uploaded-attachment-code::before"));
assert!(MNOTE_CSS.contains("background: #111111"));
assert!(MNOTE_CSS.contains(".mnote-main-tab-badge"));
assert!(MNOTE_CSS.contains("[data-mnote-tab-badge-kind=\"word\"]"));
assert!(MNOTE_CSS.contains("[data-mnote-tab-badge-kind=\"ppt\"]"));
assert!(MNOTE_CSS.contains("[data-mnote-tab-badge-kind=\"sheet\"]"));
assert!(MNOTE_CSS.contains("[data-mnote-tab-badge-kind=\"code\"]"));
}
#[test]