Skip to content

Commit ea31a4c

Browse files
authored
fix: assistant style compatibility (#225)
1 parent ed201b0 commit ea31a4c

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

.changeset/two-rabbits-taste.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@alauda/doom": patch
3+
---
4+
5+
fix: assistant style compatibility

packages/doom/src/global/SiteOverrides/index.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,13 @@ export const SiteOverrides = () => {
6868
newTitle = title
6969
}
7070

71-
requestAnimationFrame(() => {
71+
const timeoutId = setTimeout(() => {
7272
document.title = newTitle
73-
})
73+
}, 1)
74+
75+
return () => {
76+
clearTimeout(timeoutId)
77+
}
7478
}, [
7579
articleTitle,
7680
frontmatter.title,

packages/doom/styles/ai-assistant.module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
position: fixed;
55
right: 1rem;
66
bottom: 1rem;
7-
z-index: 10;
7+
z-index: var(--rp-z-index-nav);
88
background-color: var(--rp-c-bg);
9-
width: calc(min(100vw, 440px));
10-
height: calc(min(100vh, 700px));
9+
width: min(100vw, 440px);
10+
height: min(calc(100vh - 2rem), 700px);
1111
padding: 16px;
1212
box-shadow: 0px 0px 8px 0px var(--rp-c-divider);
1313
border-radius: 8px;

0 commit comments

Comments
 (0)