mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-25 11:39:51 +01:00
feat: cleaner popup
This commit is contained in:
1 parent
35275d4aa8
commit
ae616fbaf3
7 files changed
+24
-8
No files matched your search
@@ -50,7 +50,8 @@
|
|||||||
|
|
||||||
"avatars": {
|
"avatars": {
|
||||||
"search": "Search avatars...",
|
"search": "Search avatars...",
|
||||||
"no_description": "Avatar has no description."
|
"no_description": "Avatar has no description.",
|
||||||
|
"download": "Download"
|
||||||
},
|
},
|
||||||
|
|
||||||
"grades": {
|
"grades": {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
.details {
|
.details {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: var(--space-4);
|
gap: var(--space-5);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.preview {
|
.preview {
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
import { literals } from "@blitzkit/i18n";
|
import { literals } from "@blitzkit/i18n";
|
||||||
import { Grade } from "@protos/auto_items";
|
import { Grade } from "@protos/auto_items";
|
||||||
import { StarFilledIcon } from "@radix-ui/react-icons";
|
import { DownloadIcon, StarFilledIcon } from "@radix-ui/react-icons";
|
||||||
import type { Color } from "../../core/ui/color";
|
import type { Color } from "../../core/ui/color";
|
||||||
import { useGameStrings } from "../../hooks/useGameStrings";
|
import { useGameStrings } from "../../hooks/useGameStrings";
|
||||||
import { useStrings } from "../../hooks/useStrings";
|
import { useStrings } from "../../hooks/useStrings";
|
||||||
import type { Avatar } from "../../protos/avatar";
|
import type { Avatar } from "../../protos/avatar";
|
||||||
import type { PropsWithSkeleton } from "../../types/propsWithSkeleton";
|
import type { PropsWithSkeleton } from "../../types/propsWithSkeleton";
|
||||||
import { Badge } from "../Badge";
|
import { Badge } from "../Badge";
|
||||||
|
import { Button } from "../Button";
|
||||||
import { Dialog } from "../Dialog";
|
import { Dialog } from "../Dialog";
|
||||||
import { InlineSkeleton } from "../InlineSkeleton";
|
import { InlineSkeleton } from "../InlineSkeleton";
|
||||||
|
import { Link } from "../Link";
|
||||||
import { Skeleton } from "../Skeleton";
|
import { Skeleton } from "../Skeleton";
|
||||||
import { Text } from "../Text";
|
import { Text } from "../Text";
|
||||||
import styles from "./index.module.css";
|
import styles from "./index.module.css";
|
||||||
@@ -97,6 +99,16 @@ function Details({ avatars }: DetailsProps) {
|
|||||||
strings.avatars.no_description
|
strings.avatars.no_description
|
||||||
)}
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
|
|
||||||
|
<Link
|
||||||
|
underline="never"
|
||||||
|
href={`/api/avatars/${avatar.name}.webp`}
|
||||||
|
download
|
||||||
|
>
|
||||||
|
<Button>
|
||||||
|
<DownloadIcon /> {strings.avatars.download}
|
||||||
|
</Button>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+1
@@ -2,6 +2,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
gap: var(--space-2);
|
||||||
|
|
||||||
border-radius: var(--max-size);
|
border-radius: var(--max-size);
|
||||||
padding: var(--space-3) var(--space-4);
|
padding: var(--space-3) var(--space-4);
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { ComponentProps } from "react";
|
import type { ComponentProps } from "react";
|
||||||
import { classNames } from "../../core/ui/classNames";
|
import { classNames } from "../../core/ui/classNames";
|
||||||
import type { Color } from "../../core/ui/color";
|
import type { Color } from "../../core/ui/color";
|
||||||
import "./index.css";
|
import styles from "./index.module.css";
|
||||||
|
|
||||||
export interface ButtonProps extends ComponentProps<"button"> {
|
export interface ButtonProps extends ComponentProps<"button"> {
|
||||||
color?: Color;
|
color?: Color;
|
||||||
@@ -25,7 +25,7 @@ export function Button({
|
|||||||
}: ButtonProps) {
|
}: ButtonProps) {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
className={classNames("button", className)}
|
className={classNames(styles.button, className)}
|
||||||
data-color={color}
|
data-color={color}
|
||||||
data-variant={variant}
|
data-variant={variant}
|
||||||
data-light-text={color ? LIGHT_TEXT_COLORS.has(color) : undefined}
|
data-light-text={color ? LIGHT_TEXT_COLORS.has(color) : undefined}
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100dvh;
|
height: 100dvh;
|
||||||
|
overflow-y: scroll;
|
||||||
|
|
||||||
background-color: var(--black-a9);
|
background-color: var(--black-a9);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -16,12 +17,14 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
padding: var(--space-4);
|
box-sizing: border-box;
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: var(--space-4);
|
gap: var(--space-4);
|
||||||
|
margin: var(--space-4);
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
min-width: 25rem;
|
min-width: 25rem;
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ const strings = await api.strings(locale);
|
|||||||
.logo {
|
.logo {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
gap: var(--space-4);
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
width: var(--space-6);
|
width: var(--space-6);
|
||||||
@@ -41,7 +41,6 @@ const strings = await api.strings(locale);
|
|||||||
.info {
|
.info {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: end;
|
|
||||||
gap: var(--space-1);
|
gap: var(--space-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user