mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-01-23 21:44:55 +03:00
feat: add link to game in achievements page
This commit is contained in:
parent
f7b9a88219
commit
89bb099caa
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -18,7 +18,6 @@ jobs:
|
|||||||
uses: actions/setup-node@v4
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: 20.11.1
|
node-version: 20.11.1
|
||||||
cache: "yarn"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: yarn
|
run: yarn
|
||||||
@ -27,7 +26,6 @@ jobs:
|
|||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: 3.9
|
python-version: 3.9
|
||||||
cache: "pip"
|
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pip install -r requirements.txt
|
run: pip install -r requirements.txt
|
||||||
|
@ -4,7 +4,10 @@ import { steamUrlBuilder } from "@shared";
|
|||||||
import { useContext, useEffect, useMemo, useRef, useState } from "react";
|
import { useContext, useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import * as styles from "./achievements.css";
|
import * as styles from "./achievements.css";
|
||||||
import { formatDownloadProgress } from "@renderer/helpers";
|
import {
|
||||||
|
buildGameDetailsPath,
|
||||||
|
formatDownloadProgress,
|
||||||
|
} from "@renderer/helpers";
|
||||||
import {
|
import {
|
||||||
CheckCircleIcon,
|
CheckCircleIcon,
|
||||||
LockIcon,
|
LockIcon,
|
||||||
@ -16,6 +19,7 @@ import { gameDetailsContext } from "@renderer/context";
|
|||||||
import { UserAchievement } from "@types";
|
import { UserAchievement } from "@types";
|
||||||
import { average } from "color.js";
|
import { average } from "color.js";
|
||||||
import Color from "color";
|
import Color from "color";
|
||||||
|
import { Link } from "@renderer/components";
|
||||||
|
|
||||||
interface UserInfo {
|
interface UserInfo {
|
||||||
userId: string;
|
userId: string;
|
||||||
@ -95,7 +99,9 @@ function AchievementSummary({ user, isComparison }: AchievementSummaryProps) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<LockIcon size={24} />
|
<LockIcon size={24} />
|
||||||
<h3>{t("subscription_needed")}</h3>
|
<h3>
|
||||||
|
<Link to={""}>{t("subscription_needed")}</Link>
|
||||||
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
@ -403,11 +409,15 @@ export function AchievementsContent({ otherUser }: AchievementsContentProps) {
|
|||||||
>
|
>
|
||||||
<div ref={heroRef} className={styles.hero}>
|
<div ref={heroRef} className={styles.hero}>
|
||||||
<div className={styles.heroContent}>
|
<div className={styles.heroContent}>
|
||||||
|
<Link
|
||||||
|
to={buildGameDetailsPath({ shop, objectId, title: gameTitle })}
|
||||||
|
>
|
||||||
<img
|
<img
|
||||||
src={steamUrlBuilder.logo(objectId)}
|
src={steamUrlBuilder.logo(objectId)}
|
||||||
className={styles.gameLogo}
|
className={styles.gameLogo}
|
||||||
alt={gameTitle}
|
alt={gameTitle}
|
||||||
/>
|
/>
|
||||||
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -62,6 +62,10 @@ export const gameLogo = style({
|
|||||||
width: LOGO_MAX_WIDTH,
|
width: LOGO_MAX_WIDTH,
|
||||||
height: LOGO_HEIGHT,
|
height: LOGO_HEIGHT,
|
||||||
objectFit: "contain",
|
objectFit: "contain",
|
||||||
|
transition: "all ease 0.2s",
|
||||||
|
":hover": {
|
||||||
|
transform: "scale(1.05)",
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
export const container = style({
|
export const container = style({
|
||||||
|
Loading…
Reference in New Issue
Block a user