diff --git a/Frontend/src/FrontendLogic/FriendLogicFrontend.ts b/Frontend/src/FrontendLogic/FriendLogicFrontend.ts index 1347f68..1827196 100644 --- a/Frontend/src/FrontendLogic/FriendLogicFrontend.ts +++ b/Frontend/src/FrontendLogic/FriendLogicFrontend.ts @@ -1,5 +1,5 @@ import { Gql } from './LogicConnection' -import type { Game } from '../../../Backend/Steam' +import type { Game } from '../types/Game' export interface Friend { id: number diff --git a/Frontend/src/FrontendLogic/GameLogicFrontend.ts b/Frontend/src/FrontendLogic/GameLogicFrontend.ts index a230ffc..64e557f 100644 --- a/Frontend/src/FrontendLogic/GameLogicFrontend.ts +++ b/Frontend/src/FrontendLogic/GameLogicFrontend.ts @@ -1,4 +1,4 @@ -import type { Game } from '../../../Backend/Steam' +import type { Game } from '../types/Game' import { BACKEND_URL, NETWORK_ERROR_MESSAGE } from './LogicConnection' import { OrNull, ReadStored, RemoveStored, WriteStored } from './Storage' diff --git a/Frontend/src/FrontendLogic/MainPageLogicFrontend.ts b/Frontend/src/FrontendLogic/MainPageLogicFrontend.ts index ed3c68e..92a84f9 100644 --- a/Frontend/src/FrontendLogic/MainPageLogicFrontend.ts +++ b/Frontend/src/FrontendLogic/MainPageLogicFrontend.ts @@ -1,5 +1,5 @@ import { Gql } from './LogicConnection' -import { type Game } from '../../../Backend/Steam' +import { type Game } from '../types/Game' import { IsBoolean, IsInteger, IsString, ReadStored, WriteStored } from '../FrontendLogic/Storage' export type MainPageGenreSection = 'top10' | 'discounts' diff --git a/Frontend/src/FrontendLogic/ProfileLogicFrontend.ts b/Frontend/src/FrontendLogic/ProfileLogicFrontend.ts index 1f4867f..1658ea2 100644 --- a/Frontend/src/FrontendLogic/ProfileLogicFrontend.ts +++ b/Frontend/src/FrontendLogic/ProfileLogicFrontend.ts @@ -1,5 +1,5 @@ import { Gql } from './LogicConnection' -import type { Profile } from '../../../Backend/logic/ProfileLogicBackend' +import type { Profile } from '../types/Profile' export interface GameOption { appid: number diff --git a/Frontend/src/FrontendLogic/UserLogicFrontend.ts b/Frontend/src/FrontendLogic/UserLogicFrontend.ts index 269def9..6a585a2 100644 --- a/Frontend/src/FrontendLogic/UserLogicFrontend.ts +++ b/Frontend/src/FrontendLogic/UserLogicFrontend.ts @@ -1,5 +1,5 @@ import { Gql } from './LogicConnection' -import type { User } from '../../../Backend/logic/UserLogicBackend' +import type { User } from '../types/User' import { IsUser, OrNull, ReadStored, RemoveStored, WriteStored } from './Storage' const USER_FIELDS = 'id email username token' diff --git a/Frontend/src/FrontendLogic/WishlistLogicFrontend.ts b/Frontend/src/FrontendLogic/WishlistLogicFrontend.ts index 094f856..e0709b9 100644 --- a/Frontend/src/FrontendLogic/WishlistLogicFrontend.ts +++ b/Frontend/src/FrontendLogic/WishlistLogicFrontend.ts @@ -1,4 +1,4 @@ -import { type Game } from '../../../Backend/Steam' +import { type Game } from '../types/Game' import { Gql } from './LogicConnection' import { IsString, ReadStored, WriteStored } from './Storage' diff --git a/Frontend/src/components/ActiveGameCard.tsx b/Frontend/src/components/ActiveGameCard.tsx index ce9d8b2..daffab6 100644 --- a/Frontend/src/components/ActiveGameCard.tsx +++ b/Frontend/src/components/ActiveGameCard.tsx @@ -198,7 +198,7 @@ export default function ActiveGameCard({ - + {game.genre.map((genre) => (
-

+

© 2026 -

+

) diff --git a/Frontend/src/components/Header.tsx b/Frontend/src/components/Header.tsx index ea05bef..de0bc1f 100644 --- a/Frontend/src/components/Header.tsx +++ b/Frontend/src/components/Header.tsx @@ -65,7 +65,11 @@ export default function Header() { - + {menuOpen &&
} diff --git a/Frontend/src/components/PassiveGameCard.tsx b/Frontend/src/components/PassiveGameCard.tsx index 96291d9..697fc64 100644 --- a/Frontend/src/components/PassiveGameCard.tsx +++ b/Frontend/src/components/PassiveGameCard.tsx @@ -44,7 +44,7 @@ export default function PassiveGameCard({ game, rank }: Props) { className={`passiveGameCard${rank === undefined ? '' : ' rankedPassiveGameCard'}`} > {rank !== undefined && ( - + #{rank} )} @@ -57,7 +57,7 @@ export default function PassiveGameCard({ game, rank }: Props) { className="passiveGameCardMedia" component="img" image={game.image} - alt={game.name} + alt="" />
- +

{profile.username}

diff --git a/Frontend/src/components/ReviewCard.tsx b/Frontend/src/components/ReviewCard.tsx index 966d7bf..c05d92c 100644 --- a/Frontend/src/components/ReviewCard.tsx +++ b/Frontend/src/components/ReviewCard.tsx @@ -118,6 +118,7 @@ export default function ReviewCard({ className="app-button" size="small" onClick={() => onEdit(review)} + aria-label={`Edit review for ${game?.name} `} > Edit @@ -125,6 +126,7 @@ export default function ReviewCard({ className="reviewCardDelete" size="small" onClick={() => onDelete(review)} + aria-label={`Delete review for ${game?.name} `} > Delete @@ -145,7 +147,9 @@ export default function ReviewCard({ {reviewText || (

No written review

)} - {canExpand && !isExpanded &&
} + {canExpand && !isExpanded && ( + ) : ( reviewText diff --git a/Frontend/src/components/Reviews.tsx b/Frontend/src/components/Reviews.tsx index 4ee8089..0bffd3d 100644 --- a/Frontend/src/components/Reviews.tsx +++ b/Frontend/src/components/Reviews.tsx @@ -131,7 +131,7 @@ export default function Reviews({

)} -
+
{reviews.length > 0 ? ( reviews.map((review) => ( - + onSearchChange(event.target.value)} + inputProps={{ 'aria-label': 'Search games' }} /> - +
{error && ( @@ -83,6 +84,7 @@ export default function SearchPageResults({ count={pageCount} page={page} onChange={HandleBottomPageChange} + aria-label="Search page result, bottom" /> ) diff --git a/Frontend/src/components/UserReviews.tsx b/Frontend/src/components/UserReviews.tsx index 895eb6b..471701c 100644 --- a/Frontend/src/components/UserReviews.tsx +++ b/Frontend/src/components/UserReviews.tsx @@ -131,7 +131,7 @@ export default function UserReviews({ userId }: UserReviewsProps) { ) } - function RenderPagination(scrollToTop: boolean) { + function RenderPagination(scrollToTop: boolean, aria: string) { if (pageCount <= 1) return null return ( ChangePage(value, scrollToTop)} + aria-label={aria} /> ) } @@ -163,15 +164,19 @@ export default function UserReviews({ userId }: UserReviewsProps) {

You have not reviewed any games yet.

) : ( <> - {RenderPagination(false)} -
+ {RenderPagination(false, 'User reviews, top')} +
{columns.map((column, columnIndex) => (
{column.map(RenderReview)}
))}
- {RenderPagination(true)} + {RenderPagination(true, 'User reviews, bottom')} )} diff --git a/Frontend/src/components/WishlistGameCard.tsx b/Frontend/src/components/WishlistGameCard.tsx index 5c54408..ce323b9 100644 --- a/Frontend/src/components/WishlistGameCard.tsx +++ b/Frontend/src/components/WishlistGameCard.tsx @@ -70,7 +70,10 @@ export default function WishlistGameCard({
{error && ( -

+

{error}

)} @@ -82,6 +85,7 @@ export default function WishlistGameCard({ size="small" disabled={isRemoving} onClick={HandleRemove} + aria-label={`Remove ${game.name} from wishlist`} > Remove diff --git a/Frontend/src/css/SearchPage.css b/Frontend/src/css/SearchPage.css index b6a0cbe..844eceb 100644 --- a/Frontend/src/css/SearchPage.css +++ b/Frontend/src/css/SearchPage.css @@ -17,6 +17,12 @@ margin-left: 0.5rem; } +.searchPageMain { + display: flex; + flex: 1; + flex-direction: column; +} + .searchConfirm.MuiIconButton-root, .filterbutton.MuiIconButton-root { color: var(--primary-text-color); diff --git a/Frontend/src/pages/FriendsPage.tsx b/Frontend/src/pages/FriendsPage.tsx index 0d1337f..14a97d9 100644 --- a/Frontend/src/pages/FriendsPage.tsx +++ b/Frontend/src/pages/FriendsPage.tsx @@ -256,6 +256,7 @@ export default function FriendPage() { onSubmit={HandleAddFriend} > } /> - {user && ownCode && ( -
-

- Your FriendID:{ownCode} -

-
- )} - - - HandleSelectFriend(value)} - getOptionLabel={(option) => option.username} - isOptionEqualToValue={(option, value) => option.id === value.id} - openOnFocus - noOptionsText="No friends found" - renderInput={(params) => ( - - )} - /> - +
+ {user && ownCode && ( +
+

+ Your FriendID:{ownCode} +

+
+ )} - {showOnlyStatus ? ( -
- {statusPanel} -
- ) : ( -
-
- {friendProfile && ( - + + HandleSelectFriend(value)} + getOptionLabel={(option) => option.username} + isOptionEqualToValue={(option, value) => option.id === value.id} + openOnFocus + noOptionsText="No friends found" + renderInput={(params) => ( + )} + /> + + + {showOnlyStatus ? ( +
+ {statusPanel}
-
- - {panelState ? ( - statusPanel - ) : ( -
- {visibleGames.map((game) => { - const price = Number(game.price) - const salePercent = Number(game.discount) - return ( - - ) - })} -
- )} - {pageCount > 1 && ( - setPage(value)} + ) : ( +
+
+ {friendProfile && ( + )} - +
+
+ + {panelState ? ( + statusPanel + ) : ( +
+ {visibleGames.map((game) => { + const price = Number(game.price) + const salePercent = Number(game.discount) + return ( + + ) + })} +
+ )} + {pageCount > 1 && ( + setPage(value)} + /> + )} +
+
-
- )} - + )} +
) diff --git a/Frontend/src/pages/GamePage.tsx b/Frontend/src/pages/GamePage.tsx index 2cbffe4..bb836d9 100644 --- a/Frontend/src/pages/GamePage.tsx +++ b/Frontend/src/pages/GamePage.tsx @@ -67,36 +67,42 @@ export default function GamePage() { : (game?.name ?? 'Game not found') } /> -
- {isLoading ? ( -

Loading game...

- ) : error ? ( -

- Something went wrong while loading this game: {error} -

- ) : game ? ( - - ) : ( -

- We couldn't find that game. It may have been removed, or the link is wrong. -

- )} -
+
+
+ {isLoading ? ( +

Loading game...

+ ) : error ? ( +

+ Something went wrong while loading this game: {error} +

+ ) : game ? ( + + ) : ( +

+ We couldn't find that game. It may have been removed, or the link is + wrong. +

+ )} +
+
) diff --git a/Frontend/src/pages/SearchPage.tsx b/Frontend/src/pages/SearchPage.tsx index 5a87fc6..a0d180f 100644 --- a/Frontend/src/pages/SearchPage.tsx +++ b/Frontend/src/pages/SearchPage.tsx @@ -114,34 +114,36 @@ export function SearchPage() {
- { - setSearchValue(value) - setPage(1) - }} - onSearchSubmit={HandleSearchSubmit} - onClearSearch={HandleRemoveSearch} - isFilterActive={isFilterActive} - onToggleFilters={ToggleActive} - genres={genres} - genresError={genresError} - activeFilters={activeFilters} - onFilterChange={HandleFilterChange} - activeSorting={activeSorting} - onSortChange={HandleSortChange} - onRemoveFilters={HandleRemoveFilters} - onReset={HandleReset} - /> - +
+ { + setSearchValue(value) + setPage(1) + }} + onSearchSubmit={HandleSearchSubmit} + onClearSearch={HandleRemoveSearch} + isFilterActive={isFilterActive} + onToggleFilters={ToggleActive} + genres={genres} + genresError={genresError} + activeFilters={activeFilters} + onFilterChange={HandleFilterChange} + activeSorting={activeSorting} + onSortChange={HandleSortChange} + onRemoveFilters={HandleRemoveFilters} + onReset={HandleReset} + /> + +
) diff --git a/Frontend/src/pages/SignIn.tsx b/Frontend/src/pages/SignIn.tsx index b099149..89440bf 100644 --- a/Frontend/src/pages/SignIn.tsx +++ b/Frontend/src/pages/SignIn.tsx @@ -83,60 +83,68 @@ export default function SignInPage() {
- - - - {FormError && {FormError}} - Email - - - Password +
+ + + + {FormError && {FormError}} + Email - - } - label="Remember me" - /> - - - or - - - Don't have an account? Sign up - - - - + + Password + + + } + label="Remember me" + /> + + + or + + + Don't have an account?{' '} + Sign up + + + + +
) diff --git a/Frontend/src/pages/SignUp.tsx b/Frontend/src/pages/SignUp.tsx index 37368e1..eacf822 100644 --- a/Frontend/src/pages/SignUp.tsx +++ b/Frontend/src/pages/SignUp.tsx @@ -109,89 +109,97 @@ export default function SignUpPage() {
- - - - - {FormError && {FormError}} - - Email - - - - Username - + + + + {FormError && {FormError}} + + Email + + + + Username + + + + Password + + + + Re-enter Password + + + + } + label="Remember me" /> - - - Password - - - - Re-enter Password - - - } - label="Remember me" - /> - - - - + variant="contained" + disabled={Submitting} + > + {Submitting ? 'Signing up…' : 'Sign up'} + + + + +
) diff --git a/Frontend/src/pages/WishlistPage.tsx b/Frontend/src/pages/WishlistPage.tsx index 8778213..795dbcb 100644 --- a/Frontend/src/pages/WishlistPage.tsx +++ b/Frontend/src/pages/WishlistPage.tsx @@ -127,6 +127,7 @@ export default function WishlistPage() { Sort by