diff --git a/README.md b/README.md index d55da479..78a0fbff 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,12 @@ -Lamentations of the Flame Princess helpers. +Lamentations of the Flame Princess Helpers: an online inventory and equipment tool for the LotFP TTRPG +system. + +The main task this tool aims to solve is to allow playing from a +phone or desktop, quickly create inventory, and easily calculate +encumbrance and movement rate (speed). ## Demo @@ -51,20 +56,25 @@ I value your feedback and don't want to spend time on unnecessary things. Please reach out to me with your questions or comments through my GitHub profile, or create an Issue/Feature request. +- [ ] PWA - [ ] Multiple Inventories - [ ] Mounts - [ ] Firearms list I would also be glad to add more languages. Please reach out to me if you're interested in volunteering. -## Getting Started - -Run `yarn` to install project dependencies. - -Run the development server: +## Development -```bash -yarn dev +```sh +nvm use # Use the required Node.js version +yarn # Install project dependencies +yarn dev # Start the development server ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. + +## Disclaimer + +This project is created just for fun and is not officially affiliated with or endorsed by the publishers of ["Lamentations of the Flame Princess" (LotFP)](https://www.lotfp.com/RPG/) or any other related entities. + +The content utilized in this project has been sourced from publicly available materials, including but not limited to the [LotFP Rules & Magic Free Version](https://preview.drivethrurpg.com/en/product/115059/LotFP-Rules--Magic-Free-Version) and resources from [Basic Fantasy RPG](https://www.basicfantasy.org/downloads.html). diff --git a/middleware.ts b/middleware.ts index cd3e8ff1..fdad8543 100644 --- a/middleware.ts +++ b/middleware.ts @@ -1,6 +1,8 @@ import type { NextRequest } from 'next/server' import { NextResponse } from 'next/server' +import { DEFAULT_LOCALE } from '@/translations/languages' + const PUBLIC_FILE = /\.(.*)$/ export async function middleware(req: NextRequest) { @@ -13,7 +15,7 @@ export async function middleware(req: NextRequest) { } if (req.nextUrl.locale === 'default') { - const locale = req.cookies.get('NEXT_LOCALE')?.value || 'en' + const locale = req.cookies.get('NEXT_LOCALE')?.value || DEFAULT_LOCALE return NextResponse.redirect( new URL( diff --git a/src/components/Wallet/Wallet.tsx b/src/components/Wallet/Wallet.tsx index b6c7c1bb..d9c2634b 100644 --- a/src/components/Wallet/Wallet.tsx +++ b/src/components/Wallet/Wallet.tsx @@ -61,7 +61,7 @@ const Wallet = () => { onChange={toggleCoinsWeightActive} title={t`Enable the weight of coins for encumbrance calculations.`} > - Coin weight + Coins weigh diff --git a/src/components/layout/Footer.tsx b/src/components/layout/Footer.tsx index 4d587ca9..0da217c3 100644 --- a/src/components/layout/Footer.tsx +++ b/src/components/layout/Footer.tsx @@ -1,23 +1,28 @@ +import { Trans } from '@lingui/macro' import Image from 'next/image' import Link from 'next/link' -import React, { useState } from 'react' +import React, { useContext, useState } from 'react' import NavigationLinks from '@/components/layout/NavigationLinks' +import UiContext from '@/shared/context/uiContext' import isDevEnv from '@/shared/helpers/isDevEnv' const Footer = () => { const [viewportDebugHidden, setViewportDebugHidden] = useState(false) + const { + uiState: { version }, + } = useContext(UiContext) return (