Skip to content

Commit 440e750

Browse files
committed
feat(download): display provider
Signed-off-by: MadDogOwner <xiaoran@xrgzs.top>
1 parent 56fb512 commit 440e750

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/pages/home/previews/info.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import { Heading, Icon, Image, Text, VStack } from "@hope-ui/solid"
22
import { JSXElement } from "solid-js"
3+
import { useT } from "~/hooks"
34
import { getMainColor, objStore } from "~/store"
45
import { formatDate, getFileSize } from "~/utils"
56
import { getIconByObj } from "~/utils/icon"
67

78
export const FileInfo = (props: { children: JSXElement }) => {
9+
const t = useT()
810
return (
9-
<VStack class="fileinfo" py="$6" spacing="$6">
11+
<VStack class="fileinfo" py="$6" spacing="$6" w="$full">
1012
<Image
1113
boxSize="$20"
1214
fallback={
@@ -28,7 +30,11 @@ export const FileInfo = (props: { children: JSXElement }) => {
2830
{objStore.obj.name}
2931
</Heading>
3032
<Text color="$neutral10" size="sm">
31-
{getFileSize(objStore.obj.size)} · {formatDate(objStore.obj.modified)}
33+
{[
34+
getFileSize(objStore.obj.size),
35+
formatDate(objStore.obj.modified),
36+
t(`drivers.drivers.${objStore.provider}`),
37+
].join(" · ")}
3238
</Text>
3339
</VStack>
3440
<VStack spacing="$2">{props.children}</VStack>

0 commit comments

Comments
 (0)