diff --git a/src/App.tsx b/src/App.tsx
index d6e71d2..668e18e 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState, useCallback, ReactNode } from "react";
+import { getVersion } from "@tauri-apps/api/app";
import { listen } from "@tauri-apps/api/event";
import { open } from "@tauri-apps/plugin-dialog";
import {
@@ -168,10 +169,12 @@ function LibrarySummary({
ready,
libStats,
status,
+ title = "Your library",
}: {
ready: boolean;
libStats: LibraryStats | null;
status: Status | null;
+ title?: string;
}) {
if (!ready) {
return (
@@ -185,7 +188,7 @@ function LibrarySummary({
- Your library
+ {title}
{!libStats ? (
Loading…
@@ -242,6 +245,12 @@ export default function App() {
const [status, setStatus] = useState(null);
const [libStats, setLibStats] = useState(null);
const [tab, setTab] = usePersistedState("active-tab", "add");
+ // The installed build's version, for the Info page. Release builds stamp
+ // it at build time, so it comes from Tauri rather than package.json.
+ const [appVersion, setAppVersion] = useState(null);
+ useEffect(() => {
+ getVersion().then(setAppVersion).catch(() => setAppVersion(null));
+ }, []);
// A deck a chip elsewhere asked to open; DeckView picks it up and clears it.
const [openDeckId, setOpenDeckId] = useState(null);
// Deck chips only carry the deck's name, which is unique per library.
@@ -798,41 +807,64 @@ export default function App() {
// rail it normally sits in is replaced by the bottom nav);
// on desktop those also appear in the topbar and rail, but sync
// lives only here.
-
-
Card database
-
-
-
+ // Two columns on wide screens — card data, library stats and the
+ // libraries on the left; sync and the version on the right. On
+ // narrow ones the columns dissolve into one list in the order
+ // set by `.info-*` (see styles.css).
+
+
+
+
Card database
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {sync === null ? (
+ <>
+
Sync
+
Checking…
+ >
+ ) : (
+
+ )}
+
+
+
About
+
+ mtgc version
+
+ {appVersion ?? "unknown"}
+ {import.meta.env.DEV && · development build}
+
+