diff --git a/Dockerfile b/Dockerfile index c281c56..1304c57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,9 @@ COPY package.json package-lock.json ./ RUN npm ci COPY . . ARG BASE_PATH=/ -RUN BASE_PATH="$BASE_PATH" npm run build +# .git isn't in the build context, so pass the version in: --build-arg APP_VERSION=v1.2.0 +ARG APP_VERSION=dev +RUN BASE_PATH="$BASE_PATH" APP_VERSION="$APP_VERSION" npm run build FROM nginxinc/nginx-unprivileged:1.29-alpine AS serve ARG BASE_PATH=/ diff --git a/src/App.tsx b/src/App.tsx index 33a622e..067d3b4 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -10,6 +10,7 @@ import { ConnectBar } from './components/ConnectBar.tsx'; import { LiveSession } from './components/LiveSession.tsx'; import { DiagnosticsPanel } from './components/DiagnosticsPanel.tsx'; import { ReportToast } from './components/ReportToast.tsx'; +import { AppFooter } from './components/AppFooter.tsx'; import { StatGrid } from './components/StatGrid.tsx'; import { TrendChart } from './components/TrendChart.tsx'; import { Insights } from './components/Insights.tsx'; @@ -92,9 +93,7 @@ export default function App() { )} - + {savedToast && ( diff --git a/src/components/AppFooter.tsx b/src/components/AppFooter.tsx new file mode 100644 index 0000000..5fb074f --- /dev/null +++ b/src/components/AppFooter.tsx @@ -0,0 +1,53 @@ +const REPO = 'https://github.com/libreble/brushlog'; +/** A clean tag build ("v1.2.0") links to its release; anything else is shown as plain text. */ +const RELEASE = /^v\d+\.\d+\.\d+$/.test(__APP_VERSION__) ? `${REPO}/releases/tag/${__APP_VERSION__}` : null; + +const LINK = 'inline-flex items-center gap-1 hover:text-fg'; + +export function AppFooter() { + return ( + + ); +} + +/** The libreble "open beacon": an LED inside two rings opening to the top right. */ +function LibrebleMark() { + return ( + + + + + + + + ); +} + +function GitHubMark() { + return ( + + + + ); +} diff --git a/src/components/ConnectBar.tsx b/src/components/ConnectBar.tsx index d544305..8aba542 100644 --- a/src/components/ConnectBar.tsx +++ b/src/components/ConnectBar.tsx @@ -78,6 +78,7 @@ export function ConnectBar(props: Props) {