mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-02-03 00:33:49 +03:00
fix: adding color as library
This commit is contained in:
parent
adad23530e
commit
3c340d1667
@ -41,6 +41,7 @@
|
|||||||
"better-sqlite3": "^9.5.0",
|
"better-sqlite3": "^9.5.0",
|
||||||
"check-disk-space": "^3.4.0",
|
"check-disk-space": "^3.4.0",
|
||||||
"classnames": "^2.5.1",
|
"classnames": "^2.5.1",
|
||||||
|
"color": "^4.2.3",
|
||||||
"color.js": "^1.2.0",
|
"color.js": "^1.2.0",
|
||||||
"date-fns": "^3.6.0",
|
"date-fns": "^3.6.0",
|
||||||
"easydl": "^1.1.1",
|
"easydl": "^1.1.1",
|
||||||
@ -51,7 +52,6 @@
|
|||||||
"jsdom": "^24.0.0",
|
"jsdom": "^24.0.0",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"lottie-react": "^2.4.0",
|
"lottie-react": "^2.4.0",
|
||||||
"node-unrar-js": "^2.0.2",
|
|
||||||
"parse-torrent": "^11.0.16",
|
"parse-torrent": "^11.0.16",
|
||||||
"ps-list": "^8.1.1",
|
"ps-list": "^8.1.1",
|
||||||
"react-i18next": "^14.1.0",
|
"react-i18next": "^14.1.0",
|
||||||
|
@ -8,7 +8,7 @@ export interface TextFieldProps
|
|||||||
HTMLInputElement
|
HTMLInputElement
|
||||||
> {
|
> {
|
||||||
theme?: NonNullable<RecipeVariants<typeof styles.textField>>["theme"];
|
theme?: NonNullable<RecipeVariants<typeof styles.textField>>["theme"];
|
||||||
label?: string;
|
label?: string | React.ReactNode;
|
||||||
textFieldProps?: React.DetailedHTMLProps<
|
textFieldProps?: React.DetailedHTMLProps<
|
||||||
React.HTMLAttributes<HTMLDivElement>,
|
React.HTMLAttributes<HTMLDivElement>,
|
||||||
HTMLDivElement
|
HTMLDivElement
|
||||||
|
@ -2,12 +2,18 @@ import { SPACING_UNIT, vars } from "../../theme.css";
|
|||||||
import { style } from "@vanilla-extract/css";
|
import { style } from "@vanilla-extract/css";
|
||||||
import { recipe } from "@vanilla-extract/recipes";
|
import { recipe } from "@vanilla-extract/recipes";
|
||||||
|
|
||||||
|
export const downloadTitleWrapper = style({
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
marginBottom: `${SPACING_UNIT}px`,
|
||||||
|
gap: `${SPACING_UNIT}px`,
|
||||||
|
});
|
||||||
|
|
||||||
export const downloadTitle = style({
|
export const downloadTitle = style({
|
||||||
fontWeight: "bold",
|
fontWeight: "bold",
|
||||||
cursor: "pointer",
|
cursor: "pointer",
|
||||||
color: vars.color.bodyText,
|
color: vars.color.bodyText,
|
||||||
textAlign: "left",
|
textAlign: "left",
|
||||||
marginBottom: `${SPACING_UNIT}px`,
|
|
||||||
fontSize: "16px",
|
fontSize: "16px",
|
||||||
display: "block",
|
display: "block",
|
||||||
":hover": {
|
":hover": {
|
||||||
@ -15,6 +21,16 @@ export const downloadTitle = style({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const downloaderName = style({
|
||||||
|
color: "#c0c1c7",
|
||||||
|
fontSize: "10px",
|
||||||
|
padding: `${SPACING_UNIT / 2}px ${SPACING_UNIT}px`,
|
||||||
|
border: "solid 1px #c0c1c7",
|
||||||
|
borderRadius: "4px",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
});
|
||||||
|
|
||||||
export const downloads = style({
|
export const downloads = style({
|
||||||
width: "100%",
|
width: "100%",
|
||||||
gap: `${SPACING_UNIT * 2}px`,
|
gap: `${SPACING_UNIT * 2}px`,
|
||||||
|
@ -65,6 +65,11 @@ export function Downloads() {
|
|||||||
return game.repack?.fileSize ?? "N/A";
|
return game.repack?.fileSize ?? "N/A";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const downloaderName = {
|
||||||
|
[Downloader.Http]: t("real_debrid"),
|
||||||
|
[Downloader.Torrent]: t("torrent"),
|
||||||
|
};
|
||||||
|
|
||||||
const getGameInfo = (game: Game) => {
|
const getGameInfo = (game: Game) => {
|
||||||
const isGameDownloading = gameDownloading?.id === game?.id;
|
const isGameDownloading = gameDownloading?.id === game?.id;
|
||||||
const finalDownloadSize = getFinalDownloadSize(game);
|
const finalDownloadSize = getFinalDownloadSize(game);
|
||||||
@ -251,15 +256,21 @@ export function Downloads() {
|
|||||||
/>
|
/>
|
||||||
<div className={styles.downloadRightContent}>
|
<div className={styles.downloadRightContent}>
|
||||||
<div className={styles.downloadDetails}>
|
<div className={styles.downloadDetails}>
|
||||||
<button
|
<div className={styles.downloadTitleWrapper}>
|
||||||
type="button"
|
<button
|
||||||
className={styles.downloadTitle}
|
type="button"
|
||||||
onClick={() =>
|
className={styles.downloadTitle}
|
||||||
navigate(`/game/${game.shop}/${game.objectID}`)
|
onClick={() =>
|
||||||
}
|
navigate(`/game/${game.shop}/${game.objectID}`)
|
||||||
>
|
}
|
||||||
{game.title}
|
>
|
||||||
</button>
|
{game.title}
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<small className={styles.downloaderName}>
|
||||||
|
{downloaderName[game?.downloader]}
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
{getGameInfo(game)}
|
{getGameInfo(game)}
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
export const DONT_SHOW_ONLINE_FIX_INSTRUCTIONS_KEY =
|
export const DONT_SHOW_ONLINE_FIX_INSTRUCTIONS_KEY =
|
||||||
"dontShowOnlineFixInstructions";
|
"dontShowOnlineFixInstructions";
|
||||||
|
|
||||||
export const DONT_SHOW_DODI_INSTRUCTIONS_KEY = "dontShowDodiInstructions";
|
export const DONT_SHOW_DODI_INSTRUCTIONS_KEY = "dontShowDodiInstructions";
|
||||||
|
Loading…
Reference in New Issue
Block a user