Skip to content

Commit 507bbc7

Browse files
committed
style: update colors for image
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
1 parent bf9d1e4 commit 507bbc7

2 files changed

Lines changed: 15 additions & 18 deletions

File tree

src/components/Base.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ export const BoxWithFullScreen = (props: Parameters<typeof Box>[0]) => {
117117
right="$2"
118118
bottom="$2"
119119
spacing="$2"
120-
opacity="0.2"
120+
opacity="0.7"
121121
_hover={{ opacity: "1" }}
122122
transition="opacity 0.3s ease"
123123
pointerEvents="auto"

src/pages/home/previews/image.tsx

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,7 @@ import {
3535
import { useCDN, useRouter, useT } from "~/hooks"
3636
import { objStore } from "~/store"
3737
import { Obj, ObjType } from "~/types"
38-
import {
39-
alphaBgColor,
40-
ext,
41-
formatDate,
42-
getFileSize,
43-
loadScriptIIFE,
44-
} from "~/utils"
38+
import { ext, formatDate, getFileSize, loadScriptIIFE } from "~/utils"
4539

4640
const HEIF_EXTS = new Set(["heic", "heif", "avif", "vvc", "avc"])
4741
const isHeif = (name: string) => HEIF_EXTS.has(ext(name))
@@ -300,15 +294,15 @@ const Preview = (props: PreviewProps) => {
300294
{/* ── Toolbar ── */}
301295
<Flex
302296
w="$full"
303-
bg={alphaBgColor()}
297+
bg="$neutral1"
304298
p="$2"
305299
position={isFullscreen() ? "absolute" : "relative"}
306300
top={isFullscreen() ? "0" : undefined}
307301
left={isFullscreen() ? "0" : undefined}
308302
zIndex="$docked"
309-
css={{
310-
"backdrop-filter": "blur(8px)",
311-
}}
303+
transition="opacity 0.3s ease"
304+
opacity={isFullscreen() ? "0.7" : undefined}
305+
_hover={{ opacity: isFullscreen() ? "1" : undefined }}
312306
>
313307
<HStack spacing="$1">
314308
<Show when={curIdx() > 0}>
@@ -342,6 +336,7 @@ const Preview = (props: PreviewProps) => {
342336
"text-overflow": "ellipsis",
343337
"white-space": "nowrap",
344338
}}
339+
display={{ "@initial": "none", "@sm": "block" }}
345340
>
346341
{objStore.obj.name}
347342
</Text>
@@ -449,24 +444,26 @@ const Preview = (props: PreviewProps) => {
449444
bottom="$2"
450445
left="$2"
451446
p="$2"
452-
bg={alphaBgColor()}
447+
bg="$blackAlpha9"
453448
borderRadius="$md"
454449
zIndex="$docked"
455450
fontSize="$sm"
456451
css={{
457-
"backdrop-filter": "blur(2px)",
452+
"backdrop-filter": "blur(8px)",
458453
}}
459454
>
460-
<Text color="$neutral12" fontWeight="$semibold">
455+
<Text color="$whiteAlpha12" fontWeight="$semibold">
461456
{objStore.obj.name}
462457
</Text>
463-
<Text color="$neutral11">{getFileSize(objStore.obj.size)}</Text>
458+
<Text color="$whiteAlpha11">
459+
{getFileSize(objStore.obj.size)}
460+
</Text>
464461
<Show when={imgSize().w > 0}>
465-
<Text color="$neutral11">
462+
<Text color="$whiteAlpha11">
466463
{imgSize().w} × {imgSize().h}px
467464
</Text>
468465
</Show>
469-
<Text color="$neutral11">
466+
<Text color="$whiteAlpha11">
470467
{formatDate(objStore.obj.modified)}
471468
</Text>
472469
</Box>

0 commit comments

Comments
 (0)