From 86f9a0953440c2ce39e5f5d78ba85f8a8b3c7d33 Mon Sep 17 00:00:00 2001 From: notV4l Date: Thu, 21 Sep 2023 12:37:38 +0200 Subject: [PATCH] header style --- web/src/components/Footer.tsx | 1 + web/src/components/Header.tsx | 19 ++++++------- web/src/components/HeaderButton.tsx | 12 ++++---- web/src/components/MediaPlayer.tsx | 2 +- web/src/components/MobileMenu.tsx | 2 +- .../components/icons/PixelatedBorderImage.tsx | 12 ++++++++ .../[drugSlug]/[tradeDirection].tsx | 18 ++++++++---- .../pages/[gameId]/[locationSlug]/index.tsx | 4 +-- web/src/pages/[gameId]/travel.tsx | 2 +- web/src/theme/styles.ts | 28 +++++++++++++++++++ 10 files changed, 72 insertions(+), 28 deletions(-) create mode 100644 web/src/components/icons/PixelatedBorderImage.tsx diff --git a/web/src/components/Footer.tsx b/web/src/components/Footer.tsx index 5ec0fbeb4..f4a67c099 100644 --- a/web/src/components/Footer.tsx +++ b/web/src/components/Footer.tsx @@ -17,6 +17,7 @@ export const Footer = ({ bottom="0" justify="center" align="flex-end" + flexGrow={1} background="linear-gradient(transparent, #172217, #172217)" {...props} > diff --git a/web/src/components/Header.tsx b/web/src/components/Header.tsx index 2e6ff588f..ad9a7b07a 100644 --- a/web/src/components/Header.tsx +++ b/web/src/components/Header.tsx @@ -12,6 +12,9 @@ import { useGameEntity } from "@/dojo/entities/useGameEntity"; import { formatCash } from "@/utils/ui"; import { useDojo } from "@/dojo"; import { formatAddress } from "@/utils/contract"; +import PixelatedBorderImage from "./icons/PixelatedBorderImage"; +import colors from "@/theme/colors"; +import { headerStyles, headerButtonStyles } from "@/theme/styles"; // TODO: constrain this on contract side const MAX_INVENTORY = 100; @@ -57,27 +60,22 @@ const Header = ({ back }: HeaderProps) => { - {back && ( - router.back()}> - - - )} {playerEntity && gameEntity && ( @@ -106,7 +104,7 @@ const Header = ({ back }: HeaderProps) => { )} - + {!isMobile && ( <> @@ -115,7 +113,8 @@ const Header = ({ back }: HeaderProps) => { {(!isMobile || (!account && isMobile)) && ( + + {tradeDirection == TradeDirection.Buy && canBuy && ( + )} {tradeDirection == TradeDirection.Sell && canSell && ( diff --git a/web/src/pages/[gameId]/[locationSlug]/index.tsx b/web/src/pages/[gameId]/[locationSlug]/index.tsx index cd1e0fe64..ac29ce610 100644 --- a/web/src/pages/[gameId]/[locationSlug]/index.tsx +++ b/web/src/pages/[gameId]/[locationSlug]/index.tsx @@ -101,7 +101,7 @@ export default function Location() { Market - + {sortDrugMarkets(locationEntity.drugMarkets).map((drug, index) => { const drugInfo = getDrugById(drug.id)!; const canBuy = @@ -168,7 +168,7 @@ export default function Location() { ); })} - +