fix: fixing modal issue
Some checks failed
Release / build (ubuntu-latest) (push) Has been cancelled
Release / build (windows-2022) (push) Has been cancelled

This commit is contained in:
Chubby Granny Chaser
2025-09-30 06:52:48 +01:00
parent 300cff2be6
commit a625541125
9 changed files with 36 additions and 34 deletions

View File

@@ -555,7 +555,7 @@
"playtime": "Tempo de jogo",
"played_recently": "Jogado recentemente",
"pinned": "Fixado",
"amount_minutes_short": "{{amount}}h",
"amount_minutes_short": "{{amount}}m",
"amount_hours_short": "{{amount}}h",
"game_added_to_pinned": "Jogo adicionado aos fixados",
"achievements_earned": "Conquistas recebidas"

View File

@@ -10,7 +10,7 @@ export const requestSteam250 = async (path: string) => {
const { window } = new JSDOM(response.data);
const { document } = window;
return Array.from(document.querySelectorAll(".appline .title a"))
return Array.from(document.querySelectorAll("a[data-title]"))
.map(($title) => {
const steamGameUrl = ($title as HTMLAnchorElement).href;
if (!steamGameUrl) return null;

View File

@@ -1,8 +1,7 @@
@use "../../../scss/globals.scss";
.description-header {
width: calc(100% - calc(globals.$spacing-unit * 2));
margin: calc(globals.$spacing-unit * 1) calc(globals.$spacing-unit * 1);
width: 100%;
padding: calc(globals.$spacing-unit * 1.5);
display: flex;
justify-content: space-between;
@@ -12,6 +11,7 @@
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.05);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
margin-bottom: calc(globals.$spacing-unit * 1);
&__info {
display: flex;

View File

@@ -191,14 +191,16 @@ export function GameDetailsContent() {
{renderGameLogo()}
<div className="game-details__hero-buttons game-details__hero-buttons--right">
<button
type="button"
className="game-details__edit-custom-game-button"
onClick={handleEditGameClick}
title={t("edit_game_modal_button")}
>
<PencilIcon size={16} />
</button>
{game && (
<button
type="button"
className="game-details__edit-custom-game-button"
onClick={handleEditGameClick}
title={t("edit_game_modal_button")}
>
<PencilIcon size={16} />
</button>
)}
{game?.shop !== "custom" && (
<button
@@ -240,13 +242,15 @@ export function GameDetailsContent() {
</div>
</section>
<EditGameModal
visible={showEditGameModal}
onClose={() => setShowEditGameModal(false)}
game={game}
shopDetails={shopDetails}
onGameUpdated={handleGameUpdated}
/>
{game && (
<EditGameModal
visible={showEditGameModal}
onClose={() => setShowEditGameModal(false)}
game={game}
shopDetails={shopDetails}
onGameUpdated={handleGameUpdated}
/>
)}
</div>
);
}

View File

@@ -182,6 +182,8 @@ $hero-height: 300px;
globals.$background-color 50%,
globals.$dark-background-color 100%
);
padding: calc(globals.$spacing-unit * 1.5);
gap: calc(globals.$spacing-unit * 1.5);
}
&__description-content {
@@ -196,22 +198,12 @@ $hero-height: 300px;
user-select: text;
line-height: 22px;
font-size: globals.$body-font-size;
padding: calc(globals.$spacing-unit * 2) calc(globals.$spacing-unit * 1.5);
width: 100%;
margin-left: auto;
margin-right: auto;
overflow-x: auto;
min-height: auto;
@media (min-width: 768px) {
padding: calc(globals.$spacing-unit * 2.5) calc(globals.$spacing-unit * 2);
}
@media (min-width: 1024px) {
padding: calc(globals.$spacing-unit * 3) calc(globals.$spacing-unit * 2);
width: 80%;
}
@media (min-width: 1280px) {
width: 60%;
}

View File

@@ -1,7 +1,7 @@
@use "../../../scss/globals.scss";
.sidebar-section {
background-color: globals.$dark-background-color;
background-color: globals.$background-color;
border-radius: 12px;
border: 1px solid rgba(255, 255, 255, 0.05);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
@@ -21,7 +21,7 @@
font-weight: bold;
&:hover {
background-color: rgba(255, 255, 255, 0.05);
background-color: rgba(255, 255, 255, 0.1);
}
&:active {
@@ -40,6 +40,7 @@
&__content {
overflow: hidden;
transition: max-height 0.4s cubic-bezier(0, 1, 0, 1);
background-color: globals.$dark-background-color;
position: relative;
}
}

View File

@@ -1,11 +1,12 @@
@use "../../../scss/globals.scss";
.content-sidebar {
border-left: solid 1px globals.$border-color;
background-color: globals.$dark-background-color;
height: 100%;
flex-shrink: 0;
width: 280px;
display: flex;
flex-direction: column;
gap: calc(globals.$spacing-unit * 1.5);
@media (min-width: 1024px) {
width: 320px;

View File

@@ -177,6 +177,7 @@ export function ProfileContent() {
statIndex={statsIndex}
onMouseEnter={handleOnMouseEnterGameCard}
onMouseLeave={handleOnMouseLeaveGameCard}
sortBy={sortBy}
/>
</li>
))}
@@ -208,6 +209,7 @@ export function ProfileContent() {
statIndex={statsIndex}
onMouseEnter={handleOnMouseEnterGameCard}
onMouseLeave={handleOnMouseLeaveGameCard}
sortBy={sortBy}
/>
</li>
))}

View File

@@ -26,6 +26,7 @@ interface UserLibraryGameCardProps {
statIndex: number;
onMouseEnter: () => void;
onMouseLeave: () => void;
sortBy?: string;
}
export function UserLibraryGameCard({
@@ -33,6 +34,7 @@ export function UserLibraryGameCard({
statIndex,
onMouseEnter,
onMouseLeave,
sortBy,
}: UserLibraryGameCardProps) {
const { userProfile, isMe, getUserLibraryGames } =
useContext(userProfileContext);
@@ -108,7 +110,7 @@ export function UserLibraryGameCard({
!game.isPinned
);
await getUserLibraryGames();
await getUserLibraryGames(sortBy);
if (game.isPinned) {
showSuccessToast(t("game_removed_from_pinned"));