Skip to content

Commit 7209be7

Browse files
committed
CAIS:fix:收藏页和剪贴板页面搜索框在暗色模式下显示异常
1 parent 2751687 commit 7209be7

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

CAIS/components/AppRoot.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ function ImageViewerView(props: {
182182
}
183183

184184
export function AppRoot() {
185+
const colorScheme = useColorScheme()
185186
const activeTab = useObservable(TAB_CLIPS)
186187
const pipPresented = useObservable(false)
187188
const deleteDialogPresented = useObservable(false)
@@ -205,6 +206,7 @@ export function AppRoot() {
205206
lastMessage: "未启动",
206207
capturedCount: 0,
207208
})
209+
const cardFill = colorScheme === "dark" ? "secondarySystemBackground" : "systemBackground"
208210

209211
useEffect(() => {
210212
settingsRef.current = settings
@@ -958,9 +960,12 @@ export function AppRoot() {
958960
<VStack
959961
frame={{ maxWidth: "infinity", alignment: "leading" as any }}
960962
padding={{ top: 10, bottom: 10, leading: 14, trailing: 14 }}
961-
background={{ style: "systemBackground", shape: { type: "rect", cornerRadius: 18 } }}
963+
background={{ style: cardFill, shape: { type: "rect", cornerRadius: 18 } }}
962964
>
963-
<TextField title="搜索" value={query} prompt="输入关键词" onChanged={setQuery} />
965+
<HStack spacing={8} frame={{ maxWidth: "infinity", alignment: "center" as any }}>
966+
<Image systemName="magnifyingglass" foregroundStyle="secondaryLabel" frame={{ width: 18 }} />
967+
<TextField title="" value={query} prompt="输入关键词" onChanged={setQuery} />
968+
</HStack>
964969
</VStack>
965970
</VStack>
966971
)

0 commit comments

Comments
 (0)