Skip to content

Commit

Permalink
Merge pull request #65 from game-node-app/dev
Browse files Browse the repository at this point in the history
About, Privacy and broken link fixing
  • Loading branch information
Lamarcke authored Apr 6, 2024
2 parents 6a470bb + e40ddbe commit 7b34690
Show file tree
Hide file tree
Showing 12 changed files with 223 additions and 18 deletions.
Binary file added public/img/about_button_discord.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/about_button_patreon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/about_preview_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/img/about_preview_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/components/game/figure/GameGridFigure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import GameFigureImage, {
IGameFigureProps,
} from "@/components/game/figure/GameFigureImage";
import { Badge } from "@mantine/core";
import { getGameSpecialCategoryText } from "@/components/game/util/getGameSpecialCategoryText";
import { getGameCategoryText } from "@/components/game/util/getGameCategoryText";
import { TGameOrSearchGame } from "@/components/game/util/types";

interface IGameGridFigureProps {
Expand All @@ -13,7 +13,7 @@ interface IGameGridFigureProps {

const GameGridFigure = ({ game, figureProps }: IGameGridFigureProps) => {
const categoryText = useMemo(
() => getGameSpecialCategoryText(game?.category),
() => getGameCategoryText(game?.category),
[game],
);
return (
Expand Down
4 changes: 2 additions & 2 deletions src/components/game/figure/GameListFigure.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import { getLocalizedFirstReleaseDate } from "@/components/game/util/getLocalize
import { TGameOrSearchGame } from "@/components/game/util/types";
import { getGameGenres } from "@/components/game/util/getGameGenres";
import { getGamePlatformInfo } from "@/components/game/util/getGamePlatformInfo";
import { getGameSpecialCategoryText } from "@/components/game/util/getGameSpecialCategoryText";
import { getGameCategoryText } from "@/components/game/util/getGameCategoryText";
import GameInfoPlatforms from "@/components/game/info/GameInfoPlatforms";

interface IGameListFigureProps {
Expand All @@ -40,7 +40,7 @@ const GameListFigure = ({ game, figureProps }: IGameListFigureProps) => {
const genres = getGameGenres(game);
const genreNames = genres?.join(", ");
const categoryText = useMemo(
() => getGameSpecialCategoryText(game?.category),
() => getGameCategoryText(game?.category),
[game.category],
);

Expand Down
6 changes: 5 additions & 1 deletion src/components/game/info/GameInfoExternalStores.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ const GameInfoExternalStores = ({ gameId, iconsProps, ...others }: Props) => {
.map((externalStore) => {
if (externalStore.icon == undefined) return null;
return (
<a key={externalStore.id} href={externalStore.url}>
<a
key={externalStore.id}
href={externalStore.url}
target={"_blank"}
>
<Tooltip label={externalStore.storeName}>
<Image
w={42}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Game } from "@/wrapper/server";

export function getGameSpecialCategoryText(category?: number) {
export function getGameCategoryText(category?: number) {
const CATEGORY_TO_TEXT = {
[Game.category._1.valueOf()]: "DLC",
[Game.category._2.valueOf()]: "DLC",
Expand Down
14 changes: 14 additions & 0 deletions src/components/game/util/getGameStatusText.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Game } from "@/wrapper/server";
import status = Game.status;

export function getGameStatusText(statusNumber?: number) {
if (!statusNumber) return undefined;
const STATUS_TO_TEXT = {
[status._0.valueOf()]: "Released",
[status._2.valueOf()]: "Alpha",
[status._3.valueOf()]: "Beta",
[status._4.valueOf()]: "Early Access",
};

return STATUS_TO_TEXT[statusNumber];
}
48 changes: 36 additions & 12 deletions src/components/general/shell/GlobalShellFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,26 @@ import {
IconBrandTwitter,
} from "@tabler/icons-react";

type IFooterLink = { href: string; label: string };
type IFooterLink = { href: string; label: string; external?: boolean };

const links: IFooterLink[] = [
{ label: "About", href: "/about" },
{ label: "Contact", href: "/contact" },
{ label: "Privacy", href: "/privacy" },
{
label: "Donate",
href: "https://patreon.com/GameNodeApp",
external: true,
},
];

const GlobalShellFooter = () => {
const items = links.map((link) => {
return (
<Link key={link.label} href={link.href}>
<Link
key={link.label}
href={link.href}
target={link.external ? "_blank" : undefined}
>
<Text c="dimmed">{link.label}</Text>
</Link>
);
Expand All @@ -40,15 +49,30 @@ const GlobalShellFooter = () => {
{items}
</Group>
<Group gap="xs" justify="right" wrap={"nowrap"}>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandGithub size="1.05rem" stroke={1.5} />
</ActionIcon>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandDiscord size="1.05rem" stroke={1.5} />
</ActionIcon>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandTwitter size="1.05rem" stroke={1.5} />
</ActionIcon>
<Link
target={"_blank"}
href={"https://github.com/game-node-app"}
>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandGithub size="1.05rem" stroke={1.5} />
</ActionIcon>
</Link>
<Link
target={"_blank"}
href={"https://discord.gg/8cPtfHtk"}
>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandDiscord size="1.05rem" stroke={1.5} />
</ActionIcon>
</Link>
<Link
target={"_blank"}
href={"https://twitter.com/gamenodeapp"}
>
<ActionIcon size="lg" variant="default" radius="xl">
<IconBrandTwitter size="1.05rem" stroke={1.5} />
</ActionIcon>
</Link>
</Group>
</Container>
</footer>
Expand Down
83 changes: 83 additions & 0 deletions src/pages/about.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import React from "react";
import {
Container,
Flex,
Group,
Image,
SimpleGrid,
Stack,
Text,
} from "@mantine/core";

const About = () => {
return (
<Container fluid p={0}>
<SimpleGrid
w={"100%"}
cols={{
base: 1,
lg: 2,
}}
className={"p-2 mb-8"}
>
<Flex className={"w-full h-full items-center"}>
<Text className={"text-center lg:text-start"}>
Welcome to GameNode, where the community is the key to
review and recommend the best games in the market! You
can search games by platforms, genres and popularity,
and find detailed reviews made by our users.
</Text>
</Flex>
<Image
alt={"Preview of a GameNode design"}
src={"/img/about_preview_1.png"}
/>

<Image
alt={"Another of a GameNode design"}
src={"/img/about_preview_2.png"}
/>
<Flex className={"w-full h-full items-center"}>
<Text className={"text-center lg:text-start"}>
With our website, you will have access to a community of
avid gamers which are always ready to share their
opinion. You can also connect with your friends and get
the latest news and updates on games.
</Text>
</Flex>
<Stack className={" h-full justify-center w-fit"}>
<Text className={"text-center lg:text-start"}>
Join our community on Discord or contribute with our
code on Github.
</Text>
<Flex className={"w-full justify-center lg:justify-start"}>
<a href={"https://discord.gg/8cPtfHtk"}>
<Image
alt={"Discord button"}
src={"/img/about_button_discord.png"}
className={"w-40"}
/>
</a>
</Flex>
</Stack>
<Stack className={"h-full justify-center w-full"}>
<Text className={"text-center lg:text-end"}>
Help us keep GameNode alive and ad-free by donating in
our Patreon
</Text>
<Flex className={"w-full justify-center lg:justify-end"}>
<a href={"https://patreon.com/GameNodeApp"}>
<Image
alt={"Patreon button"}
src={"/img/about_button_patreon.png"}
className={"w-40"}
/>
</a>
</Flex>
</Stack>
</SimpleGrid>
</Container>
);
};

export default About;
80 changes: 80 additions & 0 deletions src/pages/privacy.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import React from "react";
import { Container, Flex, Paper, Stack, Text, Title } from "@mantine/core";

const Privacy = () => {
return (
<Container fluid p={0}>
<Flex justify={"center"}>
<Paper
w={{
base: "100%",
lg: "80%",
}}
className={"p-4"}
>
<Stack w={"100%"}>
<Title size={"h2"}>Your data stays with us.</Title>
<Text>
This is the most important aspect of how we handle
data at GameNode. We take extra care to make sure
your data never leaves our server.
</Text>
<Title size={"h4"}>
What does this mean in practice?
</Title>
<Text>
Everything you do in GameNode (and any other service
for that matter) is stored somewhere. That somewhere
is usually a database - a system that stores
information effectively - so it can be retrieved
later. This data may include anything from a user's
shopping tendencies, to what they've left in the
cart in the last visit, to (in our case) games you
have in a collection.
</Text>
<Text>
In the age of information, such information equals
money. And advertisement companies are willing to
spent thousands upon thousands of dollars to obtain
it and improve their marketing campaigns.
</Text>
<Title size={"h3"}>How do we handle analytics?</Title>
<Text>
If you are not aware, analytics is a term used to
describe services or methods for identifying user
behaviour, popular parts of a website/app, or track
any kind of marketing goal.
</Text>
<Text>
To keep this data locally, we choose a open-sourced,
privacy-first analytics solution called{" "}
<a href={"https://matomo.org"}>Matomo</a>.
</Text>
<Text>
Matomo helps us keep a good record of the pages our
visitors and users are most frequently using, while
also keep data as anonymized as possible. Since
Matomo doesn't make use of any cross-site tracking
method (usually referred to as third-party cookies)
you can be assured that neither we or Matomo will
ever know what you were doing before visiting our
website, or what you would be doing after.
</Text>
<Text>
All other, non-analytics data (for example, the
games a user have in their collections) is stored in
our database and only used our systems require such
information. For example, we retrieve the games a
user may have when a visitor visits their library.
</Text>
<Text>
This data is not used for any other purpose.
</Text>
</Stack>
</Paper>
</Flex>
</Container>
);
};

export default Privacy;

0 comments on commit 7b34690

Please sign in to comment.