diff --git a/src/components/common/Typography.tsx b/src/components/common/Typography.tsx index 281bf7d..b3ad117 100644 --- a/src/components/common/Typography.tsx +++ b/src/components/common/Typography.tsx @@ -13,3 +13,9 @@ export const H2 = styled.h1` font-size: 1.25rem; padding: 0.5rem 0; `; + +export const H3 = styled.h1` + font-size: 1.1rem; + padding: 0.5rem 0; + font-weight: bold; +`; diff --git a/src/components/layout/MainLayout.tsx b/src/components/layout/MainLayout.tsx index 26f0ab6..09d0a8d 100644 --- a/src/components/layout/MainLayout.tsx +++ b/src/components/layout/MainLayout.tsx @@ -1,13 +1,22 @@ import { faGithub } from '@fortawesome/free-brands-svg-icons'; -import { faInfoCircle } from '@fortawesome/free-solid-svg-icons'; +import { faInfoCircle, faNewspaper } from '@fortawesome/free-solid-svg-icons'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { ReactNode, useMemo, useState } from 'react'; import { StatusBarMessageProvider } from '../../context/StatusBarMessageContext'; -import { Link, Span } from '../common/Typography'; +import { Popup } from '../Popup'; +import { Button } from '../common/Button'; +import { H2, H3, Link, Span } from '../common/Typography'; const devMode = process.env.NODE_ENV === 'development'; export function MainLayout({ children }: { children: ReactNode }) { + const [showWhatsNew, setShowWhatsNew] = useState(() => { + const dismissed = localStorage.getItem('whats_new.version_dismissed'); + const sha = process.env.REACT_APP_GIT_SHA; + const shouldShow = dismissed !== (sha ?? 'dev'); + return shouldShow; + }); + const newIssueLink = useMemo(() => { const newIssueLink = new URL( `https://github.com/OldStarchy/pandemic_tracker/issues/new`, @@ -47,6 +56,12 @@ export function MainLayout({ children }: { children: ReactNode }) { >

Pandemic Tracker

+ {children} + + +
+

Whats New

+
+

New backend

+

+ The backend now uses immutable state with + react's useReducer. This also means the undo + stack has been fully reimplemented and is no + longer janky! +

+
+
+

Card Management

+

+ You can now create and destroy cards without + manually editing the exported save file! Use + the forms at the bottom of the page. +

+
+
+

Autosave

+

Everything gets saved automatically now!

+

+ Opening this app in multiple tabs will have + unpredictable results! (I don't recommend + doing it!) +

+
+
+

What's New Section

+

Its now a button in the header!

+
+
+

UI impovements

+

Everything looks slightly better now!

+
+
+

Hints in the Footer!

+

+ Sometimes there will be hints in the footer! +

+
+
+ + +
+
+