diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e1ea279..165493a 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -125,20 +125,31 @@ jobs:
# here. If the generated icon looks soft, regenerate the whole icon set
# from a >=1024px source via `pnpm tauri icon` (this also needs updating
# tauri.conf.json's bundle.icon list) rather than hand-adding an .icns.
+ # Notarization key: tauri reads the .p8 from a file, so write it outside
+ # the checkout and point APPLE_API_KEY_PATH at it for the build step.
+ - name: Write the App Store Connect API key (macOS)
+ if: startsWith(matrix.platform, 'macos')
+ env:
+ APPLE_API_KEY_P8_B64: ${{ secrets.APPLE_API_KEY_P8_B64 }}
+ run: |
+ umask 077
+ printf '%s' "$APPLE_API_KEY_P8_B64" | base64 --decode > "$RUNNER_TEMP/asc_api_key.p8"
+ echo "APPLE_API_KEY_PATH=$RUNNER_TEMP/asc_api_key.p8" >> "$GITHUB_ENV"
+
- name: Build and release
uses: tauri-apps/tauri-action@1deb371b0cd8bd54025b384f1cd735e725c4060f # v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HEROUI_AUTH_TOKEN: ${{ secrets.HEROUI_AUTH_TOKEN }}
- # --- Code signing: not configured yet, no certs exist. ---
- # macOS notarization/signing - add these secrets and uncomment when
- # an Apple Developer cert is available:
- # APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
- # APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
- # APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
- # APPLE_ID: ${{ secrets.APPLE_ID }}
- # APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
- # APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
+ # --- macOS: Developer ID signing + notarization (since 2.13.0). ---
+ # The certificate is a Developer ID Application .p12 (base64);
+ # notarization uses the App Store Connect API key written to
+ # APPLE_API_KEY_PATH by the step above. Ignored on Linux and Windows.
+ APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
+ APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
+ APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
+ APPLE_API_KEY: ${{ secrets.APPLE_API_KEY }}
+ APPLE_API_ISSUER: ${{ secrets.APPLE_API_ISSUER }}
# Windows code signing - add when a cert is available:
# WINDOWS_CERTIFICATE: ${{ secrets.WINDOWS_CERTIFICATE }}
# WINDOWS_CERTIFICATE_PASSWORD: ${{ secrets.WINDOWS_CERTIFICATE_PASSWORD }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 927f9a1..bffb4e8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,98 @@ All notable changes to MineUI are documented here. Format follows
## [Unreleased]
+## [2.13.0] - 2026-11-10
+
+### Added
+
+- **Simple and Advanced view.** A switch in the header, Simple by default,
+ remembered between runs. Simple hides the Status, Console and Config
+ pages; Scheduled tasks, Network and ports and the Advanced section in
+ Server Settings; and the Dashboard's MOTD, ping, trend chip and
+ sparklines. The server log sits behind "Show the server log". Opening a
+ hidden page shows a notice with a "Show Advanced" button. It is a view
+ setting only and never changes a server.
+- **Start here.** With no server set up, the Dashboard asks "What do you
+ want to play?" (Normal Minecraft or Minecraft with mods) and "Who will
+ play?" (Just me, People at home, Friends in other places too), says what
+ it will set up, then creates and starts the server and shows How players
+ join. "I know what I want" opens the full create forms. It appears only
+ when the one server you have is not set up yet. "Just me" on a server On
+ this computer only changes the wording; container servers are limited to
+ this computer.
+- **MineUI gets Java.** A server On this computer with no suitable Java
+ offers "Get Java for me". MineUI downloads the Eclipse Temurin JRE of the
+ major the Minecraft version needs from Adoptium (api.adoptium.net and
+ GitHub release assets, https only), checks its sha256, refuses more than
+ 300 MB, and keeps it in MineUI's own data folder, shared by all servers.
+ Java already on the computer is still used when present. Tested on a real
+ download on Linux; the Windows and macOS archive layouts are covered by
+ tests on synthetic archives only.
+- **What's this?** Short explanations for 26 terms, among them RCON, port,
+ whitelist, op, EULA, container, Java, the mod loaders, TPS and MSPT.
+- **Getting started checklist** on the Dashboard, per server: server made,
+ started, you joined, a friend joined, first backup. Steps tick from real
+ data, each open step has a Show me link, the card can be hidden, shows a
+ progress ring, and ends with an "All done!" moment at 5 of 5.
+- **Alive touches.** Player count, ping and TPS digits roll when they
+ change. A ring breathes around the status dot while the server runs (and
+ faster while it starts or stops). In-progress labels shimmer. Start, Stop,
+ Restart and the create buttons ripple when pressed. Toasts mark the first
+ server made and the first friend joining. The join address is shown as a
+ tilting "server pass" card with Copy. All of it stops under the system's
+ reduce-motion setting, and sounds follow the existing sound setting.
+- **Find mods.** The add dialog on Mods & plugins searches Modrinth for a
+ server In a container that runs Fabric, Quilt, Forge, NeoForge, Paper or
+ Purpur, and lists only what works with its type and Minecraft version,
+ the most downloaded first. Install also adds the other mods it needs,
+ checks every file against the sha512 Modrinth published before keeping
+ it, and says when every player has to install the mod too. Servers On
+ this computer, Vanilla servers and modpack servers get an explanation
+ instead of a search. Tried on a real Fabric server under rootless Podman;
+ the other server types are covered by tests only.
+- **Switch a mod off and on.** Each mod and plugin jar has a switch. Off
+ renames the file to `.jar.disabled` so the server skips it; it applies
+ after a restart. A switched-off mod can be deleted as it is.
+- IPC: `install_java` and `required_java_major`, `JavaCheck.managed`, and
+ `DownloadKind` gains `"java"`; `get_mod_support`, `search_mods`,
+ `install_mod` and `set_mod_enabled`, and `delete_mod` accepts a
+ `.jar.disabled` name (see `docs/v2-contract.md`).
+
+### Changed
+
+- **The two server kinds are called On this computer and In a container**
+ on screen (they were called Simple and Advanced, which now names the view
+ above).
+- **The create forms show less up front.** Server type, version, pack and
+ the Mojang agreement come first; the rest is under More options, with the
+ same defaults as before.
+- **"Latest release" in the container create form is the newest release at
+ the time you create the server.** The picker shows which version that is
+ next to "Latest release", and the container is created with that version,
+ so it stays on it instead of moving to each new Minecraft release on a
+ restart. Only when the server type's version list cannot be fetched does
+ the server follow the latest release, as before.
+- **Adding a mod from a link is in the Advanced view only**, with a warning
+ that MineUI cannot check a file from a link the way it checks files from
+ Find.
+- **macOS builds are signed with a Developer ID and notarized** by the
+ release workflow from this release on. Windows builds are still unsigned.
+- @heroui-pro/react 1.0.0-beta.11. The Java installer reads archive names
+ the way zip 9 returns them.
+
+### Fixed
+
+- **Creating a server in a container only offers Minecraft versions the
+ server type can run.** Picking Purpur with Minecraft 26.1.1 failed inside
+ the container with "Version 26.1.1 does not exist", because the version
+ list showed every Minecraft release whatever the type. Now the list
+ follows the server type you choose (from Paper, Purpur, Fabric, Quilt,
+ Forge and NeoForge's own version lists), "Latest release" appears only
+ when the type has a build for it, and otherwise the newest version the
+ type supports is picked, with a line under the picker saying why. Start
+ here's "Minecraft with mods" does the same for Fabric. When a type's list
+ cannot be fetched, the full list is shown as before.
+
## [2.12.1] - 2026-11-10
### Security
diff --git a/CLAUDE.md b/CLAUDE.md
index 4ef0ca0..10ec739 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -11,7 +11,7 @@ contribution process; this file is conventions and constraints only.
- `pnpm lint` - ESLint
- `pnpm tauri dev` - full app (Next.js dev server + Tauri window)
- `pnpm tauri build` - production desktop bundle
-- `cargo test -p mineui-core` - Rust unit tests (254 tests, must stay green)
+- `cargo test -p mineui-core` - Rust unit tests (328 tests, must stay green)
- `cargo fmt` / `cargo clippy` - run before committing any Rust change
pnpm only. Do not use npm/yarn/bun.
diff --git a/Cargo.lock b/Cargo.lock
index 13c5c52..f2f198b 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1821,7 +1821,7 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
[[package]]
name = "mineui-core"
-version = "2.12.1"
+version = "2.13.0"
dependencies = [
"async-trait",
"chrono",
@@ -1833,6 +1833,7 @@ dependencies = [
"serde",
"serde_json",
"sha1",
+ "sha2 0.11.1",
"sysinfo",
"tar",
"tempfile",
@@ -1844,7 +1845,7 @@ dependencies = [
[[package]]
name = "mineui-tauri"
-version = "2.12.1"
+version = "2.13.0"
dependencies = [
"mineui-core",
"serde",
@@ -3133,6 +3134,17 @@ dependencies = [
"digest 0.10.7",
]
+[[package]]
+name = "sha2"
+version = "0.11.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47d7069beb7d6ac7b9acd1039986e73443f24234f41074da099d6f994ac9ad19"
+dependencies = [
+ "cfg-if",
+ "cpufeatures 0.3.0",
+ "digest 0.11.3",
+]
+
[[package]]
name = "shlex"
version = "2.0.1"
@@ -3521,7 +3533,7 @@ dependencies = [
"semver",
"serde",
"serde_json",
- "sha2",
+ "sha2 0.10.9",
"syn 2.0.119",
"tauri-utils",
"thiserror 2.0.21",
@@ -4783,7 +4795,7 @@ dependencies = [
"once_cell",
"percent-encoding",
"raw-window-handle",
- "sha2",
+ "sha2 0.10.9",
"soup3",
"tao-macros",
"thiserror 2.0.21",
diff --git a/README.md b/README.md
index 417f8b7..56e4b3c 100644
--- a/README.md
+++ b/README.md
@@ -42,13 +42,13 @@ it) just to manage the one you actually care about.
MineUI is a native desktop app, not a web panel: **Tauri v2** (Rust backend)
driving a **Next.js** static-export frontend over Tauri IPC - no Electron, no
bundled Chromium, no local HTTP server to expose or secure. It manages any
-number of servers at once, and each one runs in one of two modes:
+number of servers at once, and each one runs in one of two ways:
-- **Simple mode (default)** - MineUI creates and runs a vanilla server for
+- **On this computer** - MineUI creates and runs a vanilla server for
you: pick a Minecraft version, set memory, accept the EULA, and MineUI
downloads the official server jar (SHA-1 verified), configures RCON, and
supervises the Java process. No containers required.
-- **Advanced mode** - a Minecraft server container managed by **Docker or
+- **In a container** - a Minecraft server container managed by **Docker or
Podman** (auto-detected, Podman preferred): control, logs, players, RCON,
mods/plugins, config editing, backups, and container metrics. MineUI can
**create** the container for you from the `itzg/minecraft-server` image -
@@ -63,14 +63,16 @@ Grab the build for your platform from the
| Platform | Package |
| --- | --- |
-| Linux x86_64 | `MineUI_2.12.1_amd64.AppImage` - `chmod +x` and run |
-| Debian/Ubuntu | `MineUI_2.12.1_amd64.deb` - `sudo apt install ./MineUI_2.12.1_amd64.deb` |
-| Windows x64 | `MineUI_2.12.1_x64-setup.exe` |
-| macOS (Apple Silicon) | `MineUI_2.12.1_aarch64.dmg` |
-| macOS (Intel) | `MineUI_2.12.1_x64.dmg` |
+| Linux x86_64 | `MineUI_2.13.0_amd64.AppImage` - `chmod +x` and run |
+| Debian/Ubuntu | `MineUI_2.13.0_amd64.deb` - `sudo apt install ./MineUI_2.13.0_amd64.deb` |
+| Windows x64 | `MineUI_2.13.0_x64-setup.exe` |
+| macOS (Apple Silicon) | `MineUI_2.13.0_aarch64.dmg` |
+| macOS (Intel) | `MineUI_2.13.0_x64.dmg` |
-Simple mode needs Java installed (MineUI version-checks it against the
-Minecraft release you pick). Advanced mode needs Docker or Podman.
+A server On this computer needs Java. If the computer has none that fits
+the Minecraft version you pick, MineUI offers *Get Java for me* and downloads
+it (see [MineUI gets Java](#mineui-gets-java)); Java already installed is
+used as before. A server In a container needs Docker or Podman.
### Installing a container runtime
@@ -98,6 +100,51 @@ Website & docs: [mineui.i4c.studio](https://mineui.i4c.studio)
## Features
+### Start here, for a first server
+
+With no server set up, the Dashboard asks two questions - *What do you want
+to play?* (Normal Minecraft or Minecraft with mods) and *Who will play?*
+(Just me, People at home, Friends in other places too) - says what it will
+set up, then creates and starts the server and ends on how players join.
+*I know what I want* opens the full create forms instead. It shows only when
+the one server you have is not set up yet. For a server On this computer,
+*Just me* only changes the wording; container servers are limited to this
+computer. The create forms keep server type, version, pack and the Mojang
+agreement up front and put the rest under *More options*, with the same
+defaults. 26 terms (RCON, port, whitelist, op, EULA, container, Java,
+the mod loaders, TPS, MSPT and more) have a *What's this?* explanation.
+
+### Simple and Advanced view
+
+A switch in the header, Simple by default and remembered. Simple hides the
+Status, Console and Config pages; Scheduled tasks, Network and ports and the
+Advanced section in Server Settings; and the Dashboard's MOTD, ping, trend
+chip and sparklines. The server log sits behind *Show the server log*. A
+hidden page opened directly shows a notice with a *Show Advanced* button.
+It is a view setting only and never changes a server.
+
+### MineUI gets Java
+
+A server On this computer with no suitable Java offers *Get Java for me*.
+MineUI downloads the Eclipse Temurin JRE of the major the Minecraft version
+needs from Adoptium (`api.adoptium.net` and GitHub release assets, https
+only), verifies its sha256, caps the download at 300 MB, and keeps it in
+MineUI's own data folder, shared by all servers. Tested for real on Linux;
+the Windows and macOS archive layouts are covered by tests on synthetic
+archives only.
+
+### Getting started and a few signs of life
+
+Each server's Dashboard shows a checklist: server made, started, you
+joined, a friend joined, first backup. Steps tick from real data, each open
+one has a *Show me* link, the card can be hidden, and it ends with an *All
+done!* moment at 5 of 5. Player count, ping and TPS digits roll when they
+change, a ring breathes around the status dot while the server runs, Start,
+Stop, Restart and the create buttons ripple on press, and the join address
+is a tilting "server pass" card with *Copy*. All of it stops under the
+system's reduce-motion setting, and sounds follow the sound setting in App
+Settings.
+
### Several servers at once
Add as many servers as you run - a Forge pack, a Fabric pack, a managed
@@ -115,13 +162,13 @@ MineUI forget it: its container, world and backups are never touched.
### Create a modded server without touching the command line
Adding a server offers three routes: a **Modded or modpack server** (a new
-container), a **Plain Minecraft server** (vanilla, run on this computer, no
+container), a **Normal Minecraft, on this computer** server (vanilla, no
containers), or **A container I already run**. For a new container MineUI
creates an [`itzg/minecraft-server`](https://github.com/itzg/docker-minecraft-server)
container for you - pick Vanilla, Paper, Purpur, Fabric, Quilt, Forge or
-NeoForge, the Minecraft version, memory and ports - picks the image with the
-right Java for that version, generates the RCON password, and connects itself
-to the result. The world lives in a named volume.
+NeoForge, the Minecraft version (only the ones that type has a build for),
+memory and ports - picks the image with the right Java for that version,
+generates the RCON password, and connects itself to the result. The world lives in a named volume.
**Deleting is always your call.** MineUI removes a container only when you
ask it to - *Delete container* in Server Settings, or the tick box when you
@@ -151,9 +198,10 @@ appearance (dark / light mode, style, accent), sounds (volume and four sound
sets) and an About card (version, where files live, a manual update check),
which apply to MineUI as a whole. **Settings** in the navigation is always the open server's own: its
name, performance, scheduled tasks, backups, and - under *Advanced* -
-connection details, console command rules and how the server is run (Simple
-or Advanced; there is no header toggle for that any more, it is changed there,
-never while the server runs, and asks first).
+connection details, console command rules and how the server is run (On this
+computer or In a container; it is changed there, never while the server runs,
+and asks first). The header's Simple / Advanced switch is separate: it only
+hides or shows parts of the app.
### Ports and how players join
@@ -184,9 +232,20 @@ confirmation before `stop`.
### Mods & plugins
-Browse what's installed, upload a jar from disk, or download one from a URL.
-The add dialog preselects mod or plugin from what the server runs and warns
-when the choice cannot load there. Have a whole set of mods as a `.zip` - a
+**Find mods.** For a server In a container that runs Fabric, Quilt, Forge,
+NeoForge, Paper or Purpur, the add dialog searches
+[Modrinth](https://modrinth.com) and lists only what works with that server's
+type and Minecraft version. *Install* also adds the other mods it needs,
+checks every file against the sha512 Modrinth published before keeping it,
+and says when every player has to install the mod too. Servers On this
+computer, Vanilla servers and modpack servers get a plain explanation instead
+of a search.
+
+Browse what's installed, switch a mod off and on again without deleting it
+(it applies after a restart), or upload a jar from disk. Downloading from a
+link is still there in the Advanced view, with a warning that MineUI cannot
+check such a file. The add dialog preselects mod or plugin from what the
+server runs and warns when the choice cannot load there. Have a whole set of mods as a `.zip` - a
zipped folder, or a server pack? MineUI unpacks the jars inside and installs
them together, which is the way to put a pack's mods onto a server that
already exists.
@@ -226,7 +285,7 @@ system** and a style in App Settings → Appearance, and optionally override
the accent color. The token system behind them is in
[`docs/theme-contract.md`](docs/theme-contract.md).
-### Enriched metrics via a companion mod (Advanced mode, optional)
+### Enriched metrics via a companion mod (servers In a container, optional)
Point a server's Settings → **Server utils URL** at an instance of
[mineui_server_utils](https://github.com/I4cTime/mineui_server_utils) - a
@@ -237,8 +296,8 @@ plus container/process metrics; everything else still works.
### Every backend call is typed and contract-bound
-`crates/mineui-core` is pure Rust (no Tauri dependency, 254 unit tests);
-`src-tauri` is a thin `#[tauri::command]` shell (55 IPC commands) that
+`crates/mineui-core` is pure Rust (no Tauri dependency, 328 unit tests);
+`src-tauri` is a thin `#[tauri::command]` shell (61 IPC commands) that
delegates to it. The full command/error/event surface is specified in
[`docs/v2-contract.md`](docs/v2-contract.md) - binding, not a suggestion; see
[CONTRIBUTING.md](CONTRIBUTING.md).
@@ -266,7 +325,7 @@ Other commands:
- `pnpm build` - static export to `out/` (what Tauri bundles)
- `pnpm lint` - ESLint
- `pnpm tauri build` - production desktop bundle
-- `cargo test -p mineui-core` - Rust unit tests (254 tests; must stay green)
+- `cargo test -p mineui-core` - Rust unit tests (328 tests; must stay green)
CI (`.github/workflows/ci.yml`) runs lint/typecheck/build on the frontend and
`cargo fmt`/`clippy`/`test` plus a `cargo check` of the Tauri shell, on every
diff --git a/SECURITY.md b/SECURITY.md
index a1d41df..0494618 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -30,7 +30,7 @@ When reporting, please provide:
- **Description** of the vulnerability and its potential impact.
- **Steps to reproduce** or a proof of concept.
- **Affected version(s)** of MineUI.
-- **Environment** details (OS, mode - Simple/Advanced, container runtime and version if applicable).
+- **Environment** details (OS, server kind - on this computer or in a container, container runtime and version if applicable).
- **Suggested fix**, if you have one.
## Response Timeline
@@ -47,16 +47,22 @@ When reporting, please provide:
The following areas are in scope for security reports:
- **Subprocess execution** - command injection via Docker/Podman CLI calls,
- the managed Java process (Simple mode), or any other shell-out. All
+ the managed Java process (servers On this computer), or any other shell-out. All
subprocess calls must build an argv array; shell-string interpolation is
a reportable bug (see `CONTRIBUTING.md` § Scope boundaries).
- **Server jar download and verification** - bypass or weakening of the
SHA-1 verification MineUI performs before running an official Minecraft
- server jar in Simple mode.
+ server jar on a server On this computer.
+- **Java download** - the Eclipse Temurin JRE MineUI fetches for servers On
+ this computer: a bypass of the fixed hosts (https only), the sha256 check
+ or the 300 MB cap, or an archive entry that unpacks outside MineUI's Java
+ folder.
- **RCON console** - command injection or allowlist bypass in the RCON
command panel.
- **Mods & Plugins** - path traversal or unsafe file handling in upload,
- URL download, or delete flows.
+ URL download, enable/disable, or delete flows; for Find mods, a bypass of
+ the fixed Modrinth hosts (https only) or of the sha512 check MineUI makes
+ on every file before it keeps it.
- **Configuration editor** - path traversal outside the intended
`server.properties` / `config/` scope.
- **World backups** - path traversal or archive extraction issues
@@ -65,14 +71,14 @@ The following areas are in scope for security reports:
bypasses intended capability/permission scoping in
`src-tauri/capabilities/`, or a mismatch between `docs/v2-contract.md`
and the actual IPC implementation that grants excess access.
-- **Container attachment (Advanced mode)** - unauthorized access to a
+- **Container attachment (servers In a container)** - unauthorized access to a
container's filesystem or Docker/Podman socket beyond the attached
server.
-- **Container creation (Advanced mode)** - argument or environment
+- **Container creation (servers In a container)** - argument or environment
injection into the runtime `run` call, the generated RCON password
reaching an argv or a log, or the create flow touching a container or
volume it did not just create.
-- **Container deletion (Advanced mode)** - a container or data volume
+- **Container deletion (servers In a container)** - a container or data volume
removed without the explicit confirmed request, a volume removed although
only the container was to go, a host folder deleted, or deletion reaching
a container other than the one the server points at.
diff --git a/app/components/AddModDialog.tsx b/app/components/AddModDialog.tsx
index 28be79f..1bf5568 100644
--- a/app/components/AddModDialog.tsx
+++ b/app/components/AddModDialog.tsx
@@ -17,6 +17,7 @@ import {
FolderOpen,
Link2,
Plug,
+ Search,
type LucideIcon,
} from "lucide-react";
import {
@@ -31,22 +32,26 @@ import {
TextField,
} from "@heroui/react";
import { useUISound } from "@/app/hooks/useUISound";
+import FindMods from "@/app/components/FindMods";
import ChoiceCards from "@/app/components/ChoiceCards";
import { identityLine, useServers } from "@/app/components/ServerProvider";
+import { useViewLevel } from "@/app/components/ViewLevelProvider";
import { onFileDrag, pickModFile } from "@/app/lib/dialog";
import { DropZone } from "@heroui-pro/react";
import { formatBytes } from "@/app/lib/format";
import {
downloadMod,
+ getModSupport,
onDownloadProgress,
unpackModArchive,
uploadMod,
IpcError,
type DownloadProgressEvent,
+ type ModSupport,
type ModTarget,
} from "@/app/lib/ipc";
-type Source = "link" | "file";
+type Source = "find" | "link" | "file";
/** What a .zip is: several mods to unpack, or one mod shipped as a zip. */
type ZipAs = "bundle" | "single";
@@ -159,7 +164,7 @@ export default function AddModDialog({ isOpen, onClose, onInstalled }: AddModDia
variant="blur"
>
-
+
@@ -185,7 +190,38 @@ function AddModForm({
const loads = loader !== null && loader in LOADS ? LOADS[loader] : undefined;
const [target, setTarget] = useState(loads ?? "mods");
- const [source, setSource] = useState("file");
+ const { level } = useViewLevel();
+ const [picked, setPicked] = useState("find");
+ // The link tab only exists in Advanced view; Find is the front door.
+ const source: Source = picked === "link" && level !== "advanced" ? "find" : picked;
+ const setSource = setPicked;
+ const [support, setSupport] = useState(null);
+ useEffect(() => {
+ let live = true;
+ getModSupport()
+ .then((s) => live && setSupport(s))
+ .catch(
+ () =>
+ live &&
+ setSupport({
+ supported: false,
+ target: null,
+ serverType: null,
+ mcVersion: null,
+ loaders: [],
+ reason: "MineUI could not tell what this server can load.",
+ }),
+ );
+ return () => {
+ live = false;
+ };
+ }, []);
+ const matching = [
+ support?.serverType ? (LOADER_NAMES[support.serverType] ?? support.serverType) : null,
+ support?.mcVersion,
+ ]
+ .filter(Boolean)
+ .join(" ") || "this server";
const [link, setLink] = useState("");
const [saveAs, setSaveAs] = useState("");
const [progress, setProgress] = useState(null);
@@ -396,7 +432,8 @@ function AddModForm({
- {/* 1 - what it is */}
+ {/* 1 - what it is (Find knows from the server) */}
+ {source !== "find" && (
1 · What are you adding?
@@ -416,11 +453,12 @@ function AddModForm({
)}
+ )}
{/* 2 - where it comes from */}
- 2 · Where is the file?
+ {source === "find" ? "Where from?" : "2 · Where is the file?"}
-
+
-
- This computer
+
+ Find
-
+
- A link
+
+ This computer
+ {level === "advanced" && (
+
+
+ A link
+
+
+
+ )}
+
+
+
+
+
+
+
+ MineUI cannot check a file from a link the way it checks files from Find. Only use links you trust.
+
+
)}
- {added.length > 0 && (
+ {source !== "find" && added.length > 0 && (
play("hover")}
>
- {added.length > 0 ? "Done" : "Cancel"}
+ {added.length > 0 || (source === "find" && support?.supported) ? "Done" : "Cancel"}
- {source === "link" ? (
+ {source === "find" ? null : source === "link" ? (
{children}>;
+
+ return (
+
+
+
+
+
+ {name} is in Advanced view
+
+ {what}
+
+
+
+ You do not need it to run a server with friends. Switching only
+ changes what MineUI shows. Your servers stay exactly as they are.
+
+ {
+ play("toggle_on");
+ setLevel("advanced");
+ }}
+ >
+ Show Advanced
+
+
+
+
+ );
+}
diff --git a/app/components/AppearanceCard.tsx b/app/components/AppearanceCard.tsx
index 56f65db..f1b431d 100644
--- a/app/components/AppearanceCard.tsx
+++ b/app/components/AppearanceCard.tsx
@@ -18,6 +18,7 @@ import {
Label,
} from "@heroui/react";
import { Segment } from "@heroui-pro/react";
+import ViewLevelSwitch from "@/app/components/ViewLevelSwitch";
import ChoiceCards from "@/app/components/ChoiceCards";
import { firstKey } from "@/app/lib/keys";
import { useUISound } from "@/app/hooks/useUISound";
@@ -76,6 +77,12 @@ export default function AppearanceCard() {
+ How much MineUI shows
+
+
+ Simple shows what you need to run a server with friends. Advanced
+ shows everything. It does not change any server.
+
Mode
= {
@@ -23,6 +24,8 @@ type ChoiceCardsProps = {
isDisabled?: boolean;
/** Play the toggle sound on change. Off when onChange plays its own. */
sound?: boolean;
+ /** Ripple on press (the main choices of a flow). */
+ ripple?: boolean;
/** Grid classes for the cards, e.g. "sm:grid-cols-2". */
className?: string;
"aria-label"?: string;
@@ -35,6 +38,7 @@ export default function ChoiceCards({
onChange,
isDisabled,
sound = true,
+ ripple = false,
className,
...aria
}: ChoiceCardsProps) {
@@ -61,6 +65,7 @@ export default function ChoiceCards({
isDisabled={option.isDisabled}
onMouseEnter={() => play("hover")}
>
+ {ripple && }
{Icon && (
diff --git a/app/components/CreateContainerFlow.tsx b/app/components/CreateContainerFlow.tsx
index 27665d2..1816eab 100644
--- a/app/components/CreateContainerFlow.tsx
+++ b/app/components/CreateContainerFlow.tsx
@@ -5,6 +5,9 @@
// pick a server type or a modpack, MineUI does the `run` and wires the
// server up. Without Podman or Docker it explains how to get one instead.
// The simple-mode counterpart is CreateServerFlow.
+import { announceServerMade } from "@/app/lib/milestones";
+import { TextShimmer } from "@heroui-pro/react";
+import PressRipple from "@/app/components/PressRipple";
import { useCallback, useEffect, useState } from "react";
import { useRouter } from "next/navigation";
import { motion } from "motion/react";
@@ -38,7 +41,9 @@ import PortsEditor, { portsProblems } from "@/app/components/PortsEditor";
import { exposeConsequence } from "@/app/components/NetworkPortsCard";
import RuntimeInstallHelp from "@/app/components/RuntimeInstallHelp";
import OutLink from "@/app/components/OutLink";
+import Term from "@/app/components/Term";
import { useUISound } from "@/app/hooks/useUISound";
+import type { GlossaryTerm } from "@/app/lib/glossary";
import ChoiceCards from "@/app/components/ChoiceCards";
import { fadeUp } from "@/app/lib/motion";
import {
@@ -53,14 +58,14 @@ import {
type Settings,
} from "@/app/lib/ipc";
-const LATEST = "LATEST";
-const DEFAULT_CONTAINER_NAME = "minecraft-server";
+export const LATEST = "LATEST";
+export const DEFAULT_CONTAINER_NAME = "minecraft-server";
const MEMORY_MIN = 1024;
const MEMORY_MAX = 16384;
const MEMORY_STEP = 512;
-const MEMORY_DEFAULT = 4096;
+export const MEMORY_DEFAULT = 4096;
/** Modpacks are heavier than a bare loader. */
-const MEMORY_DEFAULT_MODPACK = 6144;
+export const MEMORY_DEFAULT_MODPACK = 6144;
/** What the new container runs. */
type Kind = "type" | "modpack";
@@ -80,18 +85,40 @@ const KINDS: { id: Kind; title: string; description: string; icon: LucideIcon }[
},
];
-const LOADERS: { id: ContainerLoader; label: string; hint: string }[] = [
- { id: "vanilla", label: "Vanilla", hint: "Mojang's own server. No mods or plugins." },
- { id: "paper", label: "Paper", hint: "Plugins (Bukkit/Spigot), tuned for performance." },
- { id: "purpur", label: "Purpur", hint: "Paper with extra gameplay switches." },
- { id: "fabric", label: "Fabric", hint: "Lightweight mod loader for Fabric mods." },
- { id: "quilt", label: "Quilt", hint: "Fabric-compatible mod loader." },
- { id: "forge", label: "Forge", hint: "The classic mod loader; most large modpacks." },
- { id: "neoforge", label: "NeoForge", hint: "Forge's successor, for 1.20.2 and newer." },
+const LOADERS: { id: ContainerLoader; label: string; term: GlossaryTerm; hint: string }[] = [
+ { id: "vanilla", label: "Vanilla", term: "Vanilla", hint: "Mojang's own server. No mods or plugins." },
+ { id: "paper", label: "Paper", term: "Paper", hint: "Plugins (Bukkit/Spigot), tuned for performance." },
+ { id: "purpur", label: "Purpur", term: "Purpur", hint: "Paper with extra gameplay switches." },
+ { id: "fabric", label: "Fabric", term: "Fabric", hint: "Lightweight mod loader for Fabric mods." },
+ { id: "quilt", label: "Quilt", term: "Quilt", hint: "Fabric-compatible mod loader." },
+ { id: "forge", label: "Forge", term: "Forge", hint: "The classic mod loader; most large modpacks." },
+ { id: "neoforge", label: "NeoForge", term: "NeoForge", hint: "Forge's successor, for 1.20.2 and newer." },
];
+/** Whether a server type's version list has Mojang's newest release in it.
+ * An empty list means "not known", which keeps "Latest release". */
+const hasNewestRelease = (list: McVersion[]) =>
+ list.length === 0 || list.some((item) => item.latest && item.type === "release");
+
+/** The newest concrete version in a server type's list: Mojang's newest
+ * release when the type has a build for it, else the newest it has; null
+ * for an empty list. */
+const newestIn = (list: McVersion[]): string | null =>
+ list.find((item) => item.latest && item.type === "release")?.id ?? list[0]?.id ?? null;
+
+/** What to create a server type with when nobody picks: the newest concrete
+ * version the type can run (contract 3.13), so the server keeps it on every
+ * restart and Find mods can tell it. LATEST only when the list cannot be had. */
+export const newestVersionFor = async (loader: ContainerLoader): Promise => {
+ try {
+ return newestIn(await listMcVersions(undefined, loader)) ?? LATEST;
+ } catch {
+ return LATEST;
+ }
+};
+
/** "Fabric survival" → "mc-fabric-survival" (container-name grammar). */
-const containerNameFor = (serverName: string) => {
+export const containerNameFor = (serverName: string) => {
const slug = serverName
.toLowerCase()
.replace(/[^a-z0-9]+/g, "-")
@@ -123,6 +150,12 @@ export default function CreateContainerFlow({
const [runtimeChecking, setRuntimeChecking] = useState(false);
const [loader, setLoader] = useState("vanilla");
const [versions, setVersions] = useState([]);
+ // The versions the chosen server type has builds for, tagged with that type
+ // so a list that arrives late for another type is never used.
+ const [typeVersions, setTypeVersions] = useState<{
+ loader: ContainerLoader;
+ list: McVersion[];
+ } | null>(null);
const [version, setVersion] = useState(LATEST);
const [containerName, setContainerName] = useState(
settings.advanced.containerName !== DEFAULT_CONTAINER_NAME
@@ -137,6 +170,7 @@ export default function CreateContainerFlow({
const [exposeToNetwork, setExposeToNetwork] = useState(true);
const [extraPorts, setExtraPorts] = useState([]);
const [portsOpen, setPortsOpen] = useState(false);
+ const [moreOpen, setMoreOpen] = useState(false);
const [eulaAccepted, setEulaAccepted] = useState(false);
const [creating, setCreating] = useState(false);
@@ -147,6 +181,31 @@ export default function CreateContainerFlow({
.catch(() => setVersions([]));
}, []);
+ useEffect(() => {
+ if (kind !== "type") return;
+ let current = true;
+ listMcVersions(undefined, loader)
+ .then((list) => {
+ if (!current) return;
+ setTypeVersions({ loader, list });
+ // Keep the pick to a version this type can run.
+ const latestOk = hasNewestRelease(list);
+ setVersion((picked) => {
+ if (list.length === 0) return picked;
+ if (picked === LATEST) return latestOk ? LATEST : list[0].id;
+ if (list.some((item) => item.id === picked)) return picked;
+ return latestOk ? LATEST : list[0].id;
+ });
+ })
+ .catch(() => {
+ // Not known: the full list and "Latest release", as before.
+ if (current) setTypeVersions(null);
+ });
+ return () => {
+ current = false;
+ };
+ }, [kind, loader]);
+
const checkRuntime = useCallback(() => {
setRuntimeChecking(true);
detectRuntimes()
@@ -192,10 +251,24 @@ export default function CreateContainerFlow({
modpack?.source === "modrinth" || modpack?.source === "curseforge-zip"
? modpack.gameVersions
: null;
- const versionIds = packVersions ?? versions.map((item) => item.id);
+ const typeList =
+ kind === "type" && typeVersions?.loader === loader && typeVersions.list.length > 0
+ ? typeVersions.list
+ : null;
+ const latestOffered = typeList === null || hasNewestRelease(typeList);
+ const versionIds = packVersions ?? (typeList ?? versions).map((item) => item.id);
+ const loaderMeta = LOADERS.find((item) => item.id === loader);
+ const newestRelease = versions.find((item) => item.latest && item.type === "release")?.id;
+ // What "Latest release" stands for with this type's list (null: not known).
+ const latestId = typeList ? newestIn(typeList) : null;
+ const latestLabel = latestId ? `Latest release (${latestId})` : "Latest release";
const versionHint =
kind === "type"
- ? "Mod loaders can trail the newest release - for a modded server, pick the version your mods are built for."
+ ? !latestOffered && loaderMeta
+ ? `${loaderMeta.label} has no build for ${
+ newestRelease ? `Minecraft ${newestRelease}` : "the newest Minecraft release"
+ } yet, so the newest it can run is picked.`
+ : "Mod loaders can trail the newest release - for a modded server, pick the version your mods are built for."
: modpack === null
? "Choose the modpack first."
: modpack.source === "modrinth"
@@ -204,10 +277,19 @@ export default function CreateContainerFlow({
? "From the pack's manifest."
: "The Minecraft version the pack is made for - it decides which Java the server gets, and a pack on the wrong Java does not start.";
- const loaderMeta = LOADERS.find((item) => item.id === loader);
const workloadReady =
kind === "type" || (modpack !== null && version !== "" && version !== LATEST);
const portProblems = portsProblems(extraPorts, gamePort, rconPort);
+ // Problems with fields that live under "More options": named next to the
+ // Create button too, so a collapsed section never hides why it is disabled.
+ const moreProblem: string | null =
+ containerName.trim() === ""
+ ? "Give the container a name."
+ : gamePort <= 0 || rconPort <= 0
+ ? "Check the ports."
+ : portProblems.length > 0
+ ? `Extra ports: ${portProblems[0]}`
+ : null;
const canCreate =
eulaAccepted &&
portProblems.length === 0 &&
@@ -223,9 +305,15 @@ export default function CreateContainerFlow({
play("click_confirm");
setCreating(true);
try {
+ // "Latest release" is a label: send the concrete version it stands for
+ // (contract 3.13), LATEST only when the type's list cannot be had.
+ const mcVersion =
+ kind === "type" && version === LATEST
+ ? (latestId ?? (await newestVersionFor(loader)))
+ : version;
await createContainer({
loader,
- mcVersion: version,
+ mcVersion,
containerName: containerName.trim(),
memoryMb,
gamePort,
@@ -239,7 +327,7 @@ export default function CreateContainerFlow({
: null,
});
play("success");
- toast.success(`${containerName.trim()} created - the server is installing`);
+ announceServerMade(`${containerName.trim()} is installing. This can take a few minutes.`);
onCreated();
} catch (error) {
play("error");
@@ -266,10 +354,10 @@ export default function CreateContainerFlow({
{serverName} is not set up yet. Pick what it should run and MineUI
- creates the server in a container (the widely used{" "}
- itzg/minecraft-server image) and
- connects to it. Only want plain Minecraft with nothing to install? Add
- a Plain Minecraft server in App Settings → Servers instead.
+ creates the server in a container (the
+ widely used itzg/minecraft-server{" "}
+ image) and connects to it. Only want normal Minecraft with no mods? Add a
+ server On this computer in App Settings → Servers instead.
@@ -324,7 +412,14 @@ export default function CreateContainerFlow({
- {loaderMeta?.hint}
+
+ {loaderMeta && (
+ <>
+ {loaderMeta.label} :{" "}
+ {loaderMeta.hint}
+ >
+ )}
+
)}
@@ -350,9 +445,9 @@ export default function CreateContainerFlow({
- {kind === "type" && (
-
- Latest release
+ {kind === "type" && latestOffered && (
+
+ {latestLabel}
)}
@@ -368,124 +463,7 @@ export default function CreateContainerFlow({
{versionHint}
-
- Container name
-
-
-
-
-
- Game port
- setGamePort(numberFrom(event))}
- />
-
-
- RCON port
- setRconPort(numberFrom(event))}
- />
-
-
-
-
-
-
- Memory
-
- {
- setMemoryTouched(true);
- setMemoryMb(value as number);
- }}
- >
- Server memory in megabytes
-
-
-
-
-
-
-
- JVM heap. 2048 MB suits a small vanilla server; modded servers
- usually want 4096 MB or more, large modpacks 6144–8192 MB.
-
-
-
-
-
{
- play(selected ? "toggle_on" : "toggle_off");
- setExposeToNetwork(selected);
- }}
- >
-
-
-
-
- Let other devices join
-
-
-
- {exposeConsequence(exposeToNetwork, gamePort)}{" "}
- RCON - the channel MineUI itself uses to send commands - always stays
- on this computer, with a password MineUI generates.
-
-
-
{
- play(open ? "toggle_on" : "toggle_off");
- setPortsOpen(open);
- }}
- >
-
-
- Extra ports for mods
- {extraPorts.length > 0 && ` (${extraPorts.length})`}
-
-
-
-
-
-
-
-
-
-
-
-
+
.{" "}
- Mojang's rules for running a server - every Minecraft server has to
- agree to them.
+ Mojang's rules for running a server (what's the EULA? ).
+ Every Minecraft server has to agree to them.
+
+
{
+ play(open ? "toggle_on" : "toggle_off");
+ setMoreOpen(open);
+ }}
+ >
+
+
+ More options
+ {moreProblem !== null && (
+ (needs a look)
+ )}
+
+
+
+
+
+
+
+
+
+ Container name
+
+
+
+
+
+ Game port
+ setGamePort(numberFrom(event))}
+ />
+
+
+ RCON port
+ setRconPort(numberFrom(event))}
+ />
+
+
+
+ The game port is the one players connect to.
+ The RCON port is only for MineUI.
+
+
+
+
+ Memory
+
+ {
+ setMemoryTouched(true);
+ setMemoryMb(value as number);
+ }}
+ >
+ Server memory in megabytes
+
+
+
+
+
+
+
+ JVM heap. 2048 MB suits a small vanilla server; modded servers
+ usually want 4096 MB or more, large modpacks 6144–8192 MB.
+
+
+
+
+
{
+ play(selected ? "toggle_on" : "toggle_off");
+ setExposeToNetwork(selected);
+ }}
+ >
+
+
+
+
+ Let other devices join
+
+
+
+ {exposeConsequence(exposeToNetwork, gamePort)}{" "}
+ RCON (the channel MineUI itself uses to send
+ commands) always stays on this computer, with a password MineUI
+ generates.
+
+
+
{
+ play(open ? "toggle_on" : "toggle_off");
+ setPortsOpen(open);
+ }}
+ >
+
+
+ Extra ports for mods
+ {extraPorts.length > 0 && ` (${extraPorts.length})`}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{creating && (
- Creating the container… The first time, the server image
- (about 1 GB) is downloaded, which can take a few minutes.
+ Creating the container… The first time, the
+ server image (about 1 GB) is downloaded, which can take a few minutes.
0
- ? `Extra ports: ${portProblems[0]}`
- : "Check the ports."}
+ : "Check the options."}
)}
play("hover")}
>
+
{creating ? (
<>
- Creating...
+ Creating...
>
) : (
<>
diff --git a/app/components/CreateServerFlow.tsx b/app/components/CreateServerFlow.tsx
index 8475c84..5536dbd 100644
--- a/app/components/CreateServerFlow.tsx
+++ b/app/components/CreateServerFlow.tsx
@@ -1,5 +1,8 @@
"use client";
+import { announceServerMade } from "@/app/lib/milestones";
+import { TextShimmer } from "@heroui-pro/react";
+import PressRipple from "@/app/components/PressRipple";
import { useCallback, useEffect, useState } from "react";
import { AnimatePresence, motion } from "motion/react";
import {
@@ -7,6 +10,7 @@ import {
Button,
Card,
Chip,
+ Disclosure,
Label,
ListBox,
ProgressBar,
@@ -18,6 +22,7 @@ import {
ArrowLeft,
ArrowRight,
CheckCircle2,
+ ChevronDown,
Coffee,
Download,
HardDrive,
@@ -32,13 +37,16 @@ import {
javaCheck,
listMcVersions,
onDownloadProgress,
+ requiredJavaMajor,
IpcError,
type DownloadProgressEvent,
type JavaCheck,
type McVersion,
} from "@/app/lib/ipc";
import DiscardServerButton from "@/app/components/DiscardServerButton";
+import GetJavaForMe from "@/app/components/GetJavaForMe";
import OutLink from "@/app/components/OutLink";
+import Term from "@/app/components/Term";
import { useUISound } from "@/app/hooks/useUISound";
const MEMORY_MIN = 512;
@@ -50,7 +58,7 @@ type CreateServerFlowProps = {
onCreated: () => void;
};
-const STEPS = ["Version", "Memory", "Requirements", "Create"] as const;
+const STEPS = ["Version", "Requirements", "Create"] as const;
export default function CreateServerFlow({
defaultMemoryMb,
@@ -68,6 +76,10 @@ export default function CreateServerFlow({
const [java, setJava] = useState(null);
const [javaChecking, setJavaChecking] = useState(false);
const [creating, setCreating] = useState(false);
+ const [moreOpen, setMoreOpen] = useState(false);
+ // The Java major the chosen version needs; null = not known (offline).
+ const [javaMajor, setJavaMajor] = useState(null);
+ const [majorChecked, setMajorChecked] = useState(false);
const [progress, setProgress] = useState(null);
const [created, setCreated] = useState(false);
const { play } = useUISound();
@@ -106,6 +118,26 @@ export default function CreateServerFlow({
recheckJava();
}, [loadVersions, recheckJava]);
+ useEffect(() => {
+ if (!selectedVersion) return;
+ let cancelled = false;
+ // eslint-disable-next-line react-hooks/set-state-in-effect -- reset while the new answer loads
+ setMajorChecked(false);
+ requiredJavaMajor(selectedVersion)
+ .then((major) => {
+ if (!cancelled) setJavaMajor(major);
+ })
+ .catch(() => {
+ if (!cancelled) setJavaMajor(null);
+ })
+ .finally(() => {
+ if (!cancelled) setMajorChecked(true);
+ });
+ return () => {
+ cancelled = true;
+ };
+ }, [selectedVersion]);
+
const handleCreate = async () => {
if (!selectedVersion || !eulaAccepted || creating) return;
play("click_confirm");
@@ -121,7 +153,7 @@ export default function CreateServerFlow({
memoryMb,
});
play("success");
- toast.success(`Server ${selectedVersion} created`);
+ announceServerMade(`Server ${selectedVersion} is ready. Press Start when you are.`);
setCreated(true);
onCreated();
} catch (error) {
@@ -141,14 +173,18 @@ export default function CreateServerFlow({
: null;
const javaMissing = java !== null && !java.found;
- const javaIncompatible = java?.compatible === false;
+ const javaTooOld =
+ java?.found === true &&
+ javaMajor !== null &&
+ java.majorVersion !== null &&
+ java.majorVersion < javaMajor;
+ const javaIncompatible = java?.compatible === false || javaTooOld;
+ const needsJava = javaMissing || javaIncompatible;
const canLeaveVersion = Boolean(selectedVersion);
const canLeaveRequirements = eulaAccepted && !javaMissing;
const canGoNext =
- (step === 0 && canLeaveVersion) ||
- step === 1 ||
- (step === 2 && canLeaveRequirements);
+ (step === 0 && canLeaveVersion) || (step === 1 && canLeaveRequirements);
const goNext = () => {
if (!canGoNext || step >= STEPS.length - 1) return;
@@ -178,10 +214,12 @@ export default function CreateServerFlow({
- MineUI downloads the official (plain, “vanilla”) server for the version
- you pick and runs it on this computer. Nothing else to install. Want
- mods, plugins or a modpack instead? Add a Modded or modpack
- server in App Settings → Servers.
+ MineUI downloads the official (plain,{" "}
+ vanilla ) server for the version you pick
+ and runs it on this computer. If your computer has no{" "}
+ Java , MineUI can get it for you. Want mods,
+ plugins or a modpack instead? Add a{" "}
+ Modded or modpack server in App Settings → Servers.
@@ -201,95 +239,117 @@ export default function CreateServerFlow({
{step === 0 && (
-
-
-
- Minecraft version
-
-
- {
- setIncludeSnapshots(event.target.checked);
- loadVersions(event.target.checked);
- }}
- />
- Include snapshots
-
+
+
+
+
+ Minecraft version
+
+
+ {
+ setIncludeSnapshots(event.target.checked);
+ loadVersions(event.target.checked);
+ }}
+ />
+ Include snapshots
+
+
+
{
+ if (value === null) return;
+ play("click_confirm");
+ setSelectedVersion(String(value));
+ }}
+ isDisabled={versionsLoading || creating}
+ >
+ Minecraft version
+ play("hover")}>
+
+
+
+
+
+ {versions.map((version) => (
+
+ {version.id}
+ {version.latest ? " (latest)" : ""}
+ {version.type !== "release" ? ` - ${version.type}` : ""}
+
+
+ ))}
+
+
+
-
{
- if (value === null) return;
- play("click_confirm");
- setSelectedVersion(String(value));
+ {
+ play(open ? "toggle_on" : "toggle_off");
+ setMoreOpen(open);
}}
- isDisabled={versionsLoading || creating}
>
- Minecraft version
- play("hover")}>
-
-
-
-
-
- {versions.map((version) => (
-
+
+ More options
+
+
+
+
+
+
+
+
+
+
+ Memory
+
+ setMemoryMb(value as number)}
>
- {version.id}
- {version.latest ? " (latest)" : ""}
- {version.type !== "release" ? ` - ${version.type}` : ""}
-
-
- ))}
-
-
-
+ Server memory in megabytes
+
+
+
+
+
+
+
+ How much of this computer's RAM the server may use. 2048 MB is a
+ good default for a small server.
+
+
+
+
+
)}
{step === 1 && (
-
-
-
- Memory
-
- setMemoryMb(value as number)}
- >
- Server memory in megabytes
-
-
-
-
-
-
-
- How much of this computer's RAM the server may use. 2048 MB is a
- good default for a small server.
-
-
- )}
-
- {step === 2 && (
- Java
+ Java
{java === null ? (
Checking Java...
- ) : java.found ? (
-
-
- Java {java.version ?? "?"} found
-
- {java.path && (
-
- {java.path}
-
- )}
-
) : (
-
-
- No Java found
-
-
- Recent Minecraft servers need Java 21 or newer. On Windows and
- macOS install it from adoptium.net; on Linux use your package
- manager (e.g.{" "}
-
- sudo apt install openjdk-21-jre-headless
-
- ). Then hit Re-check. If Java is installed but not found, set
- its location in this server's Settings → Advanced.
-
+
+
+ {java.found ? (
+ <>
+
+ {java.managed
+ ? `Using Java MineUI downloaded (${java.majorVersion ?? java.version ?? "?"})`
+ : `Java ${java.version ?? "?"} found`}
+
+ {java.path && (
+
+ {java.path}
+
+ )}
+ >
+ ) : (
+
+ No Java found
+
+ )}
+
+ {needsJava && (
+
+
+ {javaMissing
+ ? "This computer has no Java, and the server needs it to run."
+ : `This Java is too old. Minecraft ${selectedVersion ?? ""} needs Java ${javaMajor ?? "a newer version"}.`}
+
+ {javaMajor !== null ? (
+
setJava(check)}
+ />
+ ) : majorChecked ? (
+
+ MineUI cannot check which Java this version needs
+ right now. Check your internet and press Re-check.
+
+ ) : (
+ Looking up which Java to get...
+ )}
+
+
+ Or install it yourself
+
+
+ On Windows and macOS, download it from{" "}
+
+ adoptium.net
+
+ ; on Linux use your package manager (for example{" "}
+
+ sudo apt install openjdk-21-jre-headless
+
+ ). Then press Re-check. If Java is installed but not found,
+ set its location in this server's Settings → Advanced.
+
+
+
+ )}
)}
@@ -359,15 +458,16 @@ export default function CreateServerFlow({
.{" "}
- Mojang's rules for running a server - every Minecraft server has to
- agree to them.
+ Mojang's rules for running a server (
+ what's the EULA? ). Every Minecraft
+ server has to agree to them.
)}
- {step === 3 && (
+ {step === 2 && (
@@ -381,7 +481,11 @@ export default function CreateServerFlow({
Java
- {java?.found ? `${java.version ?? "?"} found` : "not found"}
+ {java?.found
+ ? java.managed
+ ? `MineUI's own Java ${java.majorVersion ?? java.version ?? "?"}`
+ : `${java.version ?? "?"} found`
+ : "not found"}
@@ -391,9 +495,11 @@ export default function CreateServerFlow({
- {progress
- ? `Downloading ${progress.filename}`
- : "Preparing download..."}
+
+ {progress
+ ? `Downloading ${progress.filename}`
+ : "Preparing download..."}
+
{/* Completion tick - HeroUI's own CSS already animates
the fill's width (progress-bar.css), so this is a
separate element rather than layering a second
@@ -470,10 +576,11 @@ export default function CreateServerFlow({
isPending={creating}
onMouseEnter={() => play("hover")}
>
+
{creating ? (
<>
- Creating...
+ Creating...
>
) : (
<>
diff --git a/app/components/FindMods.tsx b/app/components/FindMods.tsx
new file mode 100644
index 0000000..fb96c7b
--- /dev/null
+++ b/app/components/FindMods.tsx
@@ -0,0 +1,466 @@
+"use client";
+
+// Add a mod or plugin > Find. Searches Modrinth for what this server can
+// load and installs it with the other mods it needs. IPC: get_mod_support /
+// search_mods / install_mod (contract §3.5a). Nothing here picks a file or a
+// folder: the backend decides both and checks every file against Modrinth's
+// published hash.
+import { useCallback, useEffect, useRef, useState } from "react";
+import { AlertTriangle, Blocks, CheckCircle2, Download, SearchX, WifiOff } from "lucide-react";
+import { Avatar, Button, Input, Label, ProgressBar, Skeleton, TextField, toast } from "@heroui/react";
+import { EmptyState, TextShimmer } from "@heroui-pro/react";
+import OutLink from "@/app/components/OutLink";
+import PressRipple from "@/app/components/PressRipple";
+import Term from "@/app/components/Term";
+import { useUISound } from "@/app/hooks/useUISound";
+import { formatBytes } from "@/app/lib/format";
+import {
+ IpcError,
+ installMod,
+ onDownloadProgress,
+ searchMods,
+ type DownloadProgressEvent,
+ type ModInstall,
+ type ModSearchHit,
+ type ModSupport,
+} from "@/app/lib/ipc";
+
+const PAGE = 20;
+const DEBOUNCE_MS = 350;
+
+/** 10988768 -> "11M", with only the digits in the pixel numeral font. */
+function Downloads({ value }: { value: number }) {
+ const parts = new Intl.NumberFormat("en", { notation: "compact", maximumFractionDigits: 1 }).formatToParts(value);
+ return (
+
+ {parts.map((part, i) =>
+ part.type === "integer" || part.type === "fraction" || part.type === "decimal" ? (
+
+ {part.value}
+
+ ) : (
+ {part.value}
+ ),
+ )}{" "}
+ downloads
+
+ );
+}
+
+interface FindModsProps {
+ support: ModSupport | null;
+ /** "Fabric 1.21.1": what the results are matched to. */
+ matching: string;
+ /** The server is running, so a new file waits for a restart. */
+ running: boolean;
+ /** This server runs On this computer. */
+ onThisComputer: boolean;
+ /** One install at a time; also keeps the dialog from closing. */
+ busy: boolean;
+ setBusy: (busy: boolean) => void;
+ /** A file landed on the server. */
+ onInstalled: () => void;
+}
+
+export default function FindMods({
+ support,
+ matching,
+ running,
+ onThisComputer,
+ busy,
+ setBusy,
+ onInstalled,
+}: FindModsProps) {
+ const { play } = useUISound();
+ const noun = support?.target === "plugins" ? "plugin" : "mod";
+
+ const [query, setQuery] = useState("");
+ const [term, setTerm] = useState(""); // what the shown results are for
+ const [hits, setHits] = useState([]);
+ const [page, setPage] = useState<{ offset: number; limit: number; total: number; last: number } | null>(null);
+ const [loading, setLoading] = useState(true);
+ const [loadingMore, setLoadingMore] = useState(false);
+ const [searchError, setSearchError] = useState<{ message: string; retry: boolean } | null>(null);
+ const [installingId, setInstallingId] = useState(null);
+ const [progress, setProgress] = useState(null);
+ const [fileNo, setFileNo] = useState(0);
+ const [installError, setInstallError] = useState(null);
+ const [done, setDone] = useState<{ title: string; extras: string[] } | null>(null);
+ const [doneIds, setDoneIds] = useState>(new Set());
+ const seq = useRef(0);
+ const titleRefs = useRef(new Map());
+
+ const supported = support?.supported === true;
+
+ const run = useCallback(async (q: string) => {
+ const mine = ++seq.current;
+ setLoading(true);
+ setSearchError(null);
+ try {
+ const res = await searchMods(q, 0, PAGE);
+ if (mine !== seq.current) return;
+ setHits(res.hits);
+ setTerm(q);
+ setPage({ offset: res.offset, limit: res.limit, total: res.totalHits, last: res.hits.length });
+ } catch (err) {
+ if (mine !== seq.current) return;
+ const wrong = err instanceof IpcError && err.code === "WRONG_MODE";
+ setHits([]);
+ setPage(null);
+ setSearchError({
+ message:
+ err instanceof IpcError
+ ? err.message
+ : "MineUI could not reach Modrinth. Check your internet and try again.",
+ retry: !wrong,
+ });
+ } finally {
+ if (mine === seq.current) setLoading(false);
+ }
+ }, []);
+
+ // Most downloaded first; then a pause after the last keystroke.
+ const first = useRef(true);
+ useEffect(() => {
+ if (!supported) return;
+ if (first.current) {
+ first.current = false;
+ void run("");
+ return;
+ }
+ const id = setTimeout(() => void run(query.trim()), DEBOUNCE_MS);
+ return () => clearTimeout(id);
+ }, [query, supported, run]);
+
+ const showMore = async () => {
+ if (!page || loadingMore) return;
+ play("click_confirm");
+ const mine = seq.current;
+ setLoadingMore(true);
+ try {
+ const res = await searchMods(term, page.offset + page.limit, PAGE);
+ if (mine !== seq.current) return;
+ setHits((list) => [...list, ...res.hits.filter((h) => !list.some((l) => l.projectId === h.projectId))]);
+ setPage({ offset: res.offset, limit: res.limit, total: res.totalHits, last: res.hits.length });
+ } catch (err) {
+ play("error");
+ setInstallError(err instanceof IpcError ? err.message : "More results could not be loaded.");
+ } finally {
+ setLoadingMore(false);
+ }
+ };
+
+ const install = async (hit: ModSearchHit) => {
+ if (busy) return;
+ play("click_confirm");
+ setBusy(true);
+ setInstallingId(hit.projectId);
+ setInstallError(null);
+ setDone(null);
+ setProgress(null);
+ setFileNo(0);
+ const seen = new Set();
+ const unlisten = await onDownloadProgress((event) => {
+ if (event.kind !== "mod") return;
+ if (!seen.has(event.downloadId)) {
+ seen.add(event.downloadId);
+ setFileNo(seen.size);
+ }
+ setProgress(event);
+ });
+ try {
+ const result: ModInstall = await installMod(hit.projectId);
+ const extras = result.installed.filter((f) => f.dependency).map((f) => f.title);
+ play("success");
+ toast.success(`Installed ${hit.title}`, {
+ description: extras.length > 0 ? `Also added: ${extras.join(", ")}` : undefined,
+ });
+ setDone({ title: hit.title, extras });
+ setDoneIds((ids) => new Set(ids).add(hit.projectId));
+ onInstalled();
+ // The button is gone now: keep keyboard focus on this result.
+ requestAnimationFrame(() => titleRefs.current.get(hit.projectId)?.focus());
+ } catch (err) {
+ play("error");
+ setInstallError(
+ err instanceof IpcError && err.code === "CHECKSUM_MISMATCH"
+ ? `The file for ${hit.title} did not match what Modrinth published, so nothing was installed. Try again in a moment.`
+ : err instanceof IpcError
+ ? err.message
+ : `${hit.title} could not be installed.`,
+ );
+ } finally {
+ unlisten();
+ setProgress(null);
+ setInstallingId(null);
+ setBusy(false);
+ }
+ };
+
+ if (support === null) {
+ return ;
+ }
+
+ if (!supported) {
+ return (
+
+
+
+
+
+
+ This server cannot load {noun === "plugin" ? "plugins" : "mods"}
+ {support.reason ?? "Find is not available for this server."}
+
+
+ {onThisComputer && (
+
+ MineUI can run a server that loads mods In a container. Open App Settings,
+ then Servers, and add a server. You can still add a file you already have from the other tab.
+
+ )}
+
+
+
+ );
+ }
+
+ const pending = installingId !== null;
+ const hasMore = page !== null && page.offset + page.limit < page.total;
+ const word = support.target === "plugins" ? "plugins" : "mods";
+
+ return (
+
+
{
+ setQuery(value);
+ setInstallError(null);
+ }}
+ >
+ Search {word}
+ {
+ if (event.key === "Enter") void run(query.trim());
+ }}
+ />
+
+
+
+ Showing {word} for {matching}
+ {term === "" ? ", the most downloaded first." : "."}
+
+
+ {installError && (
+
+
+ {installError}
+
+ )}
+
+ {done && (
+
+
+
+ {done.title} is on the server.
+ {done.extras.length > 0 && <> Also added: {done.extras.join(", ")}.>}{" "}
+ {running
+ ? "It starts working after the server restarts. Close this and press Restart server on the Mods page."
+ : "It starts working the next time the server starts."}
+
+
+ )}
+
+ {loading ? (
+
+ ) : searchError ? (
+
+
+
+
+
+ Could not load {word}
+ {searchError.message}
+
+ {searchError.retry && (
+
+ {
+ play("click_confirm");
+ void run(query.trim());
+ }}
+ onMouseEnter={() => play("hover")}
+ >
+ Try again
+
+
+ )}
+
+ ) : hits.length === 0 ? (
+
+
+
+
+
+ {term ? `No ${word} found for "${term}"` : `No ${word} to show`}
+
+ Try another word, or a shorter one. Only {word} that work with {matching} are listed.
+
+
+
+ ) : (
+ <>
+
+
+ {hasMore && (
+
void showMore()}
+ onMouseEnter={() => play("hover")}
+ >
+ Show more
+
+ )}
+ >
+ )}
+
+
+ Results come from Modrinth (
+
+ modrinth.com
+
+ ). MineUI checks every file against what Modrinth published before it keeps it.
+
+
+ );
+}
+
+function ResultSkeletons() {
+ return (
+
+ {[0, 1, 2, 3].map((i) => (
+
+ ))}
+
+ );
+}
diff --git a/app/components/GetJavaForMe.tsx b/app/components/GetJavaForMe.tsx
new file mode 100644
index 0000000..b330716
--- /dev/null
+++ b/app/components/GetJavaForMe.tsx
@@ -0,0 +1,174 @@
+"use client";
+
+// "Get Java for me": MineUI downloads the Java a Minecraft version needs into
+// its own folder (install_java, contract 2.13.0) and shows the progress. Used
+// by Start here, the Create server flow and a failed Start on the Dashboard.
+// It says "ready" only when the JavaCheck handed back says the server can use
+// a Java of that major; the caller gets the check either way.
+import { TextShimmer } from "@heroui-pro/react";
+import { useState } from "react";
+import { CheckCircle2, Download, Loader2, RefreshCw, TriangleAlert } from "lucide-react";
+import { Button, ProgressBar } from "@heroui/react";
+import { useUISound } from "@/app/hooks/useUISound";
+import { formatBytes } from "@/app/lib/format";
+import {
+ installJava,
+ IpcError,
+ onDownloadProgress,
+ type DownloadProgressEvent,
+ type JavaCheck,
+} from "@/app/lib/ipc";
+
+/** Whether the server can run on the Java a check found, for a version that
+ * needs `major`. */
+export const javaUsable = (check: JavaCheck, major: number) =>
+ check.found && check.compatible !== false && (check.majorVersion ?? 0) >= major;
+
+interface GetJavaForMeProps {
+ /** The Java major the Minecraft version needs. */
+ major: number;
+ /** Called with the Java check after a successful download, also when the
+ * server still cannot use it (see javaUsable). */
+ onInstalled: (check: JavaCheck) => void;
+ isDisabled?: boolean;
+ /** Button text; defaults to "Get Java for me". */
+ label?: string;
+}
+
+export default function GetJavaForMe({
+ major,
+ onInstalled,
+ isDisabled = false,
+ label = "Get Java for me",
+}: GetJavaForMeProps) {
+ const { play } = useUISound();
+ const [busy, setBusy] = useState(false);
+ const [progress, setProgress] = useState(null);
+ const [error, setError] = useState(null);
+ const [done, setDone] = useState(false);
+ // Downloaded, but the server still does not use it: why, in a sentence.
+ const [unused, setUnused] = useState(null);
+
+ const run = async () => {
+ play("click_confirm");
+ setBusy(true);
+ setError(null);
+ setUnused(null);
+ setProgress(null);
+ const unlisten = await onDownloadProgress((event) => {
+ if (event.kind === "java") setProgress(event);
+ });
+ try {
+ const check = await installJava(major);
+ if (javaUsable(check, major)) {
+ play("success");
+ setDone(true);
+ } else {
+ play("error");
+ // The check prefers MineUI's own Java over anything else on the
+ // computer, except the Java location set in Server Settings (contract
+ // 3.1 java_check). Not using the download means that setting won.
+ setUnused(
+ check.managed
+ ? `MineUI downloaded Java ${major}, but the server still cannot use it.`
+ : `MineUI downloaded Java ${major}, but this server is set to use a different Java: the Java location under Server Settings → Advanced (in Advanced view). Clear that setting to use the downloaded one.`,
+ );
+ }
+ onInstalled(check);
+ } catch (e) {
+ play("error");
+ setError(
+ e instanceof IpcError
+ ? e.message
+ : "MineUI could not download Java. Check your internet and try again.",
+ );
+ } finally {
+ unlisten();
+ setBusy(false);
+ }
+ };
+
+ const percent =
+ progress && progress.totalBytes
+ ? Math.min(100, (progress.receivedBytes / progress.totalBytes) * 100)
+ : null;
+
+ return (
+
+ {done ? (
+
+
+ Java {major} is ready.
+
+ ) : (
+
+ play("hover")}
+ >
+ {busy ? (
+
+ ) : error || unused ? (
+
+ ) : (
+
+ )}
+ {busy ? (
+ Getting Java...
+ ) : error ? (
+ "Try again"
+ ) : unused ? (
+ "Check again"
+ ) : (
+ label
+ )}
+
+ {!busy && !error && !unused && (
+
+ Free download (about 50 MB). MineUI keeps it in its own folder.
+
+ )}
+
+ )}
+
+ {busy && (
+
+
+ {progress ? `Downloading ${progress.filename}` : "Starting the download..."}
+
+ {progress
+ ? progress.totalBytes
+ ? `${formatBytes(progress.receivedBytes)} / ${formatBytes(progress.totalBytes)}`
+ : formatBytes(progress.receivedBytes)
+ : ""}
+
+
+
+
+
+
+
+
+ )}
+
+ {error && (
+
+ {error}
+
+ )}
+
+ {unused && !busy && (
+
+
+ {unused}
+
+ )}
+
+ );
+}
diff --git a/app/components/GettingStartedCard.tsx b/app/components/GettingStartedCard.tsx
new file mode 100644
index 0000000..2ddecd8
--- /dev/null
+++ b/app/components/GettingStartedCard.tsx
@@ -0,0 +1,386 @@
+"use client";
+
+// Getting started: five steps with live ticks, per server. Everything comes
+// from calls that already exist (server state, audit log, player history,
+// backups list, instance status). Each open step has a Show me that scrolls
+// to the right control. Dismissible per server. Small celebrations: a step's
+// check springs in and chimes when it turns done, and the fifth step brings an
+// "All done" moment before the card goes away. Each one plays once per server
+// (lib/milestones.ts), never again on a reload. Reduce-motion: Motion drops
+// the transforms (MotionConfig) and the sparks are not rendered at all.
+import { useCallback, useEffect, useMemo, useRef, useState } from "react";
+import { motion, useReducedMotion } from "motion/react";
+import { Check, Circle, PartyPopper, X } from "lucide-react";
+import { Button, Card, ProgressCircle } from "@heroui/react";
+import {
+ announceFriendJoined,
+ markCelebrated,
+ readCelebrated,
+ type Milestone,
+} from "@/app/lib/milestones";
+import { scaleIn, transition } from "@/app/lib/motion";
+import { useServers } from "@/app/components/ServerProvider";
+import { useUISound } from "@/app/hooks/useUISound";
+import {
+ getAuditLog,
+ getPlayerHistory,
+ getServerState,
+ instanceStatus,
+ listBackups,
+ type Mode,
+ type ServerPhase,
+} from "@/app/lib/ipc";
+
+export const GETTING_STARTED_KEY = "mineui-getting-started-dismissed";
+const POLL_MS = 10000;
+
+/** Page element ids the Show me buttons point at. */
+export const TARGET_START = "start-server-button";
+export const TARGET_JOIN = "join-info";
+export const TARGET_BACKUP = "backup-button";
+
+type Facts = {
+ started: boolean;
+ players: number;
+ backups: number;
+};
+
+const dismissedKey = (serverId: string) => `${GETTING_STARTED_KEY}:${serverId}`;
+
+function readDismissed(serverId: string): boolean {
+ try {
+ return window.localStorage.getItem(dismissedKey(serverId)) === "1";
+ } catch {
+ return false;
+ }
+}
+
+/** Scroll to an element on the Dashboard and give it the keyboard focus. */
+function showMe(id: string) {
+ const el = document.getElementById(id);
+ if (!el) return;
+ el.scrollIntoView({ behavior: "smooth", block: "center" });
+ const focusable = el.matches("button, a, input, [tabindex]")
+ ? el
+ : el.querySelector("button, a, input, [tabindex]");
+ (focusable ?? el).focus({ preventScroll: true });
+}
+
+const ALL_DONE_MS = 8000;
+const SPARK_COLORS = ["bg-success", "bg-accent", "bg-warning"] as const;
+const SPARKS = Array.from({ length: 12 }, (_, i) => {
+ const angle = (i / 12) * Math.PI * 2;
+ return {
+ x: Math.round(Math.cos(angle) * (56 + (i % 3) * 14)),
+ y: Math.round(Math.sin(angle) * (36 + (i % 3) * 10)),
+ color: SPARK_COLORS[i % SPARK_COLORS.length],
+ };
+});
+
+/** Phosphor never scales or springs (theme contract), so it gets neither the
+ * check spring nor the sparks; the rest of the moment is a fade. */
+const isPhosphor = () =>
+ typeof document !== "undefined" && document.documentElement.dataset.theme === "phosphor";
+
+interface GettingStartedCardProps {
+ mode: Mode;
+ /** The open server's phase; a change re-reads the facts. */
+ phase: ServerPhase | undefined;
+}
+
+export default function GettingStartedCard({ mode, phase }: GettingStartedCardProps) {
+ const { play } = useUISound();
+ const { activeId } = useServers();
+ const [dismissed, setDismissed] = useState(null);
+ const [facts, setFacts] = useState(null);
+ const reduceMotion = useReducedMotion();
+ // Steps that turned done while the app was open: only those spring in.
+ const [popped, setPopped] = useState>(new Set());
+ const [allDone, setAllDone] = useState(false);
+ const prevDone = useRef | null>(null);
+
+ useEffect(() => {
+ // eslint-disable-next-line react-hooks/set-state-in-effect -- localStorage exists only in the browser, so it is read after mount
+ setDismissed(readDismissed(activeId));
+ }, [activeId]);
+
+ const load = useCallback(async () => {
+ const [state, audit, history, backups, instance] = await Promise.allSettled([
+ getServerState(),
+ getAuditLog(200),
+ getPlayerHistory(),
+ listBackups(),
+ mode === "simple" ? instanceStatus() : Promise.resolve(null),
+ ]);
+ setFacts((prev) => {
+ let started = prev?.started ?? false;
+ // "Started at least once": any sign the server has run - its phase, a
+ // start time on the container or process, an exit code, a start in the
+ // audit log, or a world folder on this computer.
+ if (state.status === "fulfilled") {
+ const s = state.value;
+ started =
+ started ||
+ (s.phase !== "not-created" && s.phase !== "stopped") ||
+ Boolean(s.container?.startedAt) ||
+ Boolean(s.process?.startedAt) ||
+ (s.process?.lastExitCode ?? null) !== null;
+ }
+ if (audit.status === "fulfilled") {
+ started =
+ started ||
+ audit.value.entries.some((e) => e.action === "server.start" && e.ok);
+ }
+ if (instance.status === "fulfilled" && instance.value?.worldExists) started = true;
+ const names =
+ history.status === "fulfilled"
+ ? new Set(history.value.users.map((u) => u.username.toLowerCase())).size
+ : (prev?.players ?? 0);
+ const backupCount =
+ backups.status === "fulfilled" ? backups.value.length : (prev?.backups ?? 0);
+ return { started, players: names, backups: backupCount };
+ });
+ }, [mode]);
+
+ useEffect(() => {
+ if (dismissed !== false) return;
+ // eslint-disable-next-line react-hooks/set-state-in-effect -- IPC fetch-on-mount: re-read on a phase change, then lightly poll
+ void load();
+ const interval = setInterval(() => void load(), POLL_MS);
+ return () => clearInterval(interval);
+ }, [dismissed, load, phase]);
+
+ const steps = useMemo(
+ () => [
+ {
+ id: "made",
+ title: "Your server is made",
+ hint: "Done the moment it appears here.",
+ done: true,
+ target: null as string | null,
+ },
+ {
+ id: "started",
+ title: "Start your server",
+ hint: "Press Start. The first start can take a minute or two.",
+ done: facts?.started ?? false,
+ target: TARGET_START,
+ },
+ {
+ id: "joined",
+ title: "Join it yourself",
+ hint: "Open Minecraft and use the address under How players join.",
+ done: (facts?.players ?? 0) >= 1,
+ target: TARGET_JOIN,
+ },
+ {
+ id: "friend",
+ title: "A friend joins",
+ hint: "Send a friend the address under How players join.",
+ done: (facts?.players ?? 0) >= 2,
+ target: TARGET_JOIN,
+ },
+ {
+ id: "backup",
+ title: "Make your first backup",
+ hint: "A backup is a saved copy of your world, in case something goes wrong.",
+ done: (facts?.backups ?? 0) >= 1,
+ target: TARGET_BACKUP,
+ },
+ ],
+ [facts],
+ );
+
+ // Celebrate a step the first time it is seen turning done (per server).
+ const doneKey = steps.map((s) => (s.done ? "1" : "0")).join("");
+ useEffect(() => {
+ if (dismissed !== false || facts === null) return;
+ const before = prevDone.current;
+ const now = new Map(steps.map((s) => [s.id, s.done]));
+ prevDone.current = now;
+ const seen = readCelebrated(activeId);
+ const fresh = steps.filter(
+ (s) => s.id !== "made" && s.done && !seen.has(s.id) && (before?.get(s.id) ?? true) === false,
+ );
+ for (const s of fresh) markCelebrated(activeId, s.id as Milestone);
+ if (fresh.length > 0) {
+ setPopped((prev) => new Set([...prev, ...fresh.map((s) => s.id)]));
+ play("success");
+ if (fresh.some((s) => s.id === "friend")) announceFriendJoined();
+ }
+ if (now.size > 0 && [...now.values()].every(Boolean) && !seen.has("all")) {
+ markCelebrated(activeId, "all");
+ setAllDone(true);
+ if (fresh.length === 0) play("success");
+ }
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- doneKey stands for the done flags
+ }, [doneKey, dismissed, facts, activeId, play]);
+
+ useEffect(() => {
+ if (!allDone) return;
+ const timer = setTimeout(() => setAllDone(false), ALL_DONE_MS);
+ return () => clearTimeout(timer);
+ }, [allDone]);
+
+ // A different server starts clean.
+ useEffect(() => {
+ prevDone.current = null;
+ // eslint-disable-next-line react-hooks/set-state-in-effect -- reset when the open server changes
+ setPopped(new Set());
+ setAllDone(false);
+ }, [activeId]);
+
+ if (dismissed !== false || facts === null) return null;
+ const doneCount = steps.filter((s) => s.done).length;
+ if (doneCount === steps.length) {
+ if (!allDone) return null;
+ return (
+
+
+ {!reduceMotion && !isPhosphor() && (
+
+ {SPARKS.map((spark, i) => (
+
+ ))}
+
+ )}
+
+
+
+
+
+
+ All done!
+
+ You made a server, joined it, had a friend over and saved a backup. That is
+ a real server admin move.
+
+
+
+ setAllDone(false)}
+ onMouseEnter={() => play("hover")}
+ >
+
+ Close
+
+
+
+
+ );
+ }
+
+ const dismiss = () => {
+ play("click_back");
+ try {
+ window.localStorage.setItem(dismissedKey(activeId), "1");
+ } catch {
+ // Not remembered across restarts, still hidden for this session.
+ }
+ setDismissed(true);
+ };
+
+ return (
+
+
+
+
+
+
+
+
+
+
+
+ {doneCount}
+
+
+
+ Getting started
+
+ {doneCount} of {steps.length} done. A few things to try with a new server.
+
+
+
+ play("hover")}
+ >
+
+ Hide
+
+
+
+
+ {steps.map((step) => (
+
+
+ {step.done ? : }
+
+ {step.done ? "Done: " : "Not done yet: "}
+
+
+ {step.title}
+
+ {!step.done && {step.hint} }
+
+ {!step.done && step.target !== null && (
+ {
+ play("click_confirm");
+ showMe(step.target as string);
+ }}
+ onMouseEnter={() => play("hover")}
+ >
+ Show me
+
+ )}
+
+ ))}
+
+
+
+ );
+}
diff --git a/app/components/JoinInfoCard.tsx b/app/components/JoinInfoCard.tsx
index bd25581..a8d20fe 100644
--- a/app/components/JoinInfoCard.tsx
+++ b/app/components/JoinInfoCard.tsx
@@ -6,10 +6,11 @@
// line was the server's address only for this computer; anyone else who
// typed it could not connect. The public address is looked up only when the
// user asks (contract §3.16).
-import { useCallback, useEffect, useState, useSyncExternalStore } from "react";
+import { useCallback, useEffect, useState, useSyncExternalStore, type CSSProperties } from "react";
import { useRouter } from "next/navigation";
import { ChevronDown, Check, Copy, Globe, Loader2, Users } from "lucide-react";
import { Alert, Button, Card, Chip, Disclosure, toast } from "@heroui/react";
+import { HoloCard } from "@heroui-pro/react";
import OutLink from "@/app/components/OutLink";
import { useServers } from "@/app/components/ServerProvider";
import { useUISound } from "@/app/hooks/useUISound";
@@ -100,6 +101,81 @@ function CopyButton({ text, label }: { text: string; label: string }) {
);
}
+// The pass is sized in CSS variables (docs: HoloCard). Colours are semantic
+// tokens only; the library's own dark gradient, white hairline and text shadow
+// are replaced so the pass reads in all four themes, dark and light. The
+// corner follows the theme's --radius.
+const PASS_STYLE = {
+ "--holo-card-width": "min(26rem, calc(100vw - 8rem))",
+ "--holo-card-height": "11rem",
+ "--holo-card-bleed": "0.75rem",
+ "--holo-card-radius": "max(0.25rem, calc(var(--radius) * 1.5))",
+ "--holo-card-inset-color": "var(--border)",
+ "--holo-card-content-text-shadow": "none",
+ "--holo-card-texture-opacity": "0.05",
+ "--holo-card-pattern-opacity": "0.5",
+} as CSSProperties;
+
+const PASS_GRADIENT =
+ "linear-gradient(140deg, color-mix(in oklab, var(--accent) 22%, var(--surface)) 0%, var(--surface) 55%, var(--surface-secondary) 100%)";
+
+/** The join address as a pass: server name, what to type, the version and a
+ * Copy button. It tilts and glints with the pointer, and stays flat under
+ * reduce-motion (HoloCard does that itself). Frame ignores the pointer and
+ * the Surface takes it back, so the Copy button works while it tilts. */
+function ServerPass({
+ name,
+ address,
+ where,
+ version,
+}: {
+ name: string;
+ address: string;
+ where: string;
+ version: string | null;
+}) {
+ return (
+
+
+ {/* The docs say Frame none, Surface auto. While the card tilts that is
+ not enough: the tilted Rotator itself wins the hit test over the
+ Copy button, so it is switched off as well. The tilt still follows
+ the pointer, because events from the Surface bubble to the root. */}
+
+
+
+
+
+
+ Server pass
+
+ {name}
+ {version && Minecraft {version} }
+
+
+ {where}
+
+
+ {address}
+
+
+
+
+
+
+
+
+
+
+ );
+}
+
/** One place a player can be: what to call it, what to type, what to know. */
function Row({
title,
@@ -237,11 +313,19 @@ function ForwardingSteps({
);
}
-export default function JoinInfoCard({ online }: { online: boolean }) {
+export default function JoinInfoCard({
+ online,
+ startOpenInternet = false,
+}: {
+ online: boolean;
+ /** Open "From the internet" at first (after Start here, friends elsewhere). */
+ startOpenInternet?: boolean;
+}) {
const router = useRouter();
const { play } = useUISound();
- const { activeId, overview } = useServers();
- const phase = overview.find((item) => item.id === activeId)?.phase ?? null;
+ const { active, activeId, overview } = useServers();
+ const entry = overview.find((item) => item.id === activeId);
+ const phase = entry?.phase ?? null;
const os = useSyncExternalStore(
() => () => {},
detectOs,
@@ -249,7 +333,7 @@ export default function JoinInfoCard({ online }: { online: boolean }) {
);
const [info, setInfo] = useState(null);
const [failure, setFailure] = useState(null);
- const [internetOpen, setInternetOpen] = useState(false);
+ const [internetOpen, setInternetOpen] = useState(startOpenInternet);
const [looking, setLooking] = useState(false);
const [publicIp, setPublicIp] = useState(null);
const [lookupError, setLookupError] = useState(null);
@@ -335,6 +419,18 @@ export default function JoinInfoCard({ online }: { online: boolean }) {
) : (
<>
+
{online
diff --git a/app/components/ModCard.tsx b/app/components/ModCard.tsx
index 9c10aae..e77a131 100644
--- a/app/components/ModCard.tsx
+++ b/app/components/ModCard.tsx
@@ -3,7 +3,7 @@
// One mod or plugin on the Mods page: name, a few facts, copy / delete.
import { motion, type Variants } from "motion/react";
import { Copy, Trash2 } from "lucide-react";
-import { Button, Card, Chip, Tooltip } from "@heroui/react";
+import { Button, Card, Chip, Switch, Tooltip } from "@heroui/react";
import { formatBytes, formatDateTime } from "@/app/lib/format";
import { useUISound } from "@/app/hooks/useUISound";
import type { ModEntry, ModTarget } from "@/app/lib/ipc";
@@ -33,10 +33,13 @@ interface ModCardProps {
serverLoader: string | null;
copied: boolean;
deleting: boolean;
+ /** A switch for this file is being applied. */
+ toggling: boolean;
index: number;
variants: Variants;
onCopy: (filename: string) => void;
onDelete: (item: ModEntry, kind: ModTarget) => void;
+ onToggle: (item: ModEntry, kind: ModTarget, enabled: boolean) => void;
}
export default function ModCard({
@@ -45,10 +48,12 @@ export default function ModCard({
serverLoader,
copied,
deleting,
+ toggling,
index,
variants,
onCopy,
onDelete,
+ onToggle,
}: ModCardProps) {
const { play } = useUISound();
const known = item.loader !== "unknown";
@@ -57,17 +62,42 @@ export default function ModCard({
const serverKnown = serverLoader !== null && serverLoader in LOADER_NAMES;
const mismatch = known && serverKnown && item.loader !== serverLoader;
const disabled = item.filename.toLowerCase().endsWith(".jar.disabled");
+ // Only a .jar can be switched: a .zip has no off state.
+ const switchable = disabled || item.filename.toLowerCase().endsWith(".jar");
return (
-
+
- {item.name}
+
+
+ {item.name}
+
+ {switchable && (
+ {
+ play(on ? "toggle_on" : "toggle_off");
+ onToggle(item, kind, on);
+ }}
+ className="shrink-0"
+ >
+
+
+
+
+
+
+ )}
+
Updated {formatDateTime(item.updatedAtEpochMs)}
-
+
Size: {formatBytes(item.sizeBytes)}
{known && Loader: {loaderName(item.loader)} }
{mismatch && (
@@ -84,8 +114,8 @@ export default function ModCard({
- A file ending in .disabled is ignored by the server. Rename it back to .jar
- to use it again.
+ The server skips this one. Turn the switch on to use it again. The change
+ applies after a restart.
diff --git a/app/components/Navbar.tsx b/app/components/Navbar.tsx
index de70fdd..5e0d26d 100644
--- a/app/components/Navbar.tsx
+++ b/app/components/Navbar.tsx
@@ -36,22 +36,24 @@ import { applyTheme, useTheme } from "@/app/hooks/useTheme";
import { applyColorMode, useColorMode } from "@/app/hooks/useColorMode";
import { leaveOr } from "@/app/lib/leaveGuard";
import { useMediaQuery } from "@/app/hooks/useMediaQuery";
+import ViewLevelSwitch from "./ViewLevelSwitch";
+import { useViewLevel } from "./ViewLevelProvider";
// Priority order is load-bearing (docs/theme-contract.md §9.2): the first
// four are the T3 standalone set and the T3 "More" overflow always holds
// exactly items[4:]. Do not re-rank.
// `description` is the tooltip body at icon-only tiers (§9.6): what the page
// is for, not a repeat of the label.
-const navItems = [
- { href: "/", label: "Dashboard", icon: Server, description: "Start, stop and watch the live log" },
- { href: "/status", label: "Status", icon: Gauge, description: "TPS, resources and the activity log" },
- { href: "/mods", label: "Mods", icon: Boxes, description: "Installed mods and plugins" },
- { href: "/players", label: "Players", icon: Users, description: "Who's on, history and notes" },
- { href: "/rcon", label: "Console", icon: Shield, description: "Send commands to the running server" },
- { href: "/config", label: "Config", icon: ScrollText, description: "Edit server.properties and configs" },
- { href: "/backups", label: "Backups", icon: Archive, description: "World backups and restore" },
- { href: "/settings", label: "Settings", icon: Settings, description: "This server: name, schedule, backups, advanced" },
-];
+const allNavItems = [
+ { href: "/", label: "Dashboard", icon: Server, description: "Start, stop and see who is online" },
+ { href: "/status", label: "Status", icon: Gauge, description: "How well the server runs, and what happened", advancedOnly: true },
+ { href: "/mods", label: "Mods", icon: Boxes, description: "Add and remove mods and plugins" },
+ { href: "/players", label: "Players", icon: Users, description: "Who is on, who has played and notes" },
+ { href: "/rcon", label: "Console", icon: Shield, description: "Send commands to the running server", advancedOnly: true },
+ { href: "/config", label: "Config", icon: ScrollText, description: "Edit the server's settings files", advancedOnly: true },
+ { href: "/backups", label: "Backups", icon: Archive, description: "Save copies of your world and go back to them" },
+ { href: "/settings", label: "Settings", icon: Settings, description: "This server: name, backups and more" },
+] as { href: string; label: string; icon: typeof Server; description: string; advancedOnly?: boolean }[];
/** Tooltip body for a nav item: label + what the page is for. */
function NavTooltip({ label, description }: { label: string; description: string }) {
@@ -199,6 +201,11 @@ export default function Navbar() {
return pathname.startsWith(href);
};
+ // Simple view leaves out the expert pages (Status, Console, Config).
+ const { level } = useViewLevel();
+ const navItems = allNavItems.filter(
+ (item) => level === "advanced" || !item.advancedOnly,
+ );
const priorityItems = navItems.slice(0, PRIORITY_COUNT);
const overflowItems = navItems.slice(PRIORITY_COUNT);
// T4 (640-699px) folds ALL eight items into "More"; T3 (700-899px) folds
@@ -396,7 +403,7 @@ export default function Navbar() {
-
+
{moreHasActive && (
@@ -414,9 +421,13 @@ export default function Navbar() {
{/* Controls zone - fixed, shrink-0 (§9.1). */}
- {/* This server: which one the pages show (§9.1). How it is run
- (Simple / Advanced) is changed in Server Settings only - a
- one-click header toggle made a server look deleted. */}
+ {/* View level: how much MineUI shows. A view setting only - it
+ never touches a server (the 2.9.0 header toggle did, and made
+ a server look deleted). How a server is run is changed in
+ Server Settings only. */}
+
+
+ {/* This server: which one the pages show (§9.1). */}
{/* The app: sound, app-wide settings, Ko-fi. */}
diff --git a/app/components/PressRipple.tsx b/app/components/PressRipple.tsx
new file mode 100644
index 0000000..189c4d5
--- /dev/null
+++ b/app/components/PressRipple.tsx
@@ -0,0 +1,13 @@
+"use client";
+
+// Ripple on press for a Button or card (Pro PressableFeedback.Ripple). The
+// ripple and its hover tint are not Motion, so MotionConfig does not cover
+// them: with reduce-motion on, nothing is rendered at all.
+import { useReducedMotion } from "motion/react";
+import { PressableFeedback } from "@heroui-pro/react";
+
+export default function PressRipple() {
+ const reduce = useReducedMotion();
+ if (reduce) return null;
+ return
;
+}
diff --git a/app/components/Rolling.tsx b/app/components/Rolling.tsx
new file mode 100644
index 0000000..ee801a3
--- /dev/null
+++ b/app/components/Rolling.tsx
@@ -0,0 +1,28 @@
+"use client";
+
+// A number whose digits roll when it changes (NumberFlow). NumberFlow reads
+// prefers-reduced-motion itself (respectMotionPreference defaults to true), so
+// with reduce-motion on the digits simply swap. Numerals only, so the pixel
+// numeral font stays on.
+import NumberFlow from "@number-flow/react";
+
+interface RollingProps {
+ value: number;
+ /** Text after the number, e.g. "ms" or "/20". */
+ suffix?: string;
+ /** Decimal places to always show. */
+ decimals?: number;
+ className?: string;
+}
+
+export default function Rolling({ value, suffix, decimals = 0, className = "" }: RollingProps) {
+ return (
+
+ );
+}
diff --git a/app/components/RuntimeInstallHelp.tsx b/app/components/RuntimeInstallHelp.tsx
index bff426c..f68e8ff 100644
--- a/app/components/RuntimeInstallHelp.tsx
+++ b/app/components/RuntimeInstallHelp.tsx
@@ -213,7 +213,8 @@ export default function RuntimeInstallHelp({ onRecheck, checking = false }: Runt
launcher can have a shorter PATH than your terminal. Put the full
path to
podman or{" "}
docker in this server's Settings →
- Advanced → Runtime binary override, save, then check again.
+ Advanced (in Advanced view) → Runtime binary override, save, then
+ check again.
-
+
+
+
{active.name}
{detail && {detail} }
diff --git a/app/components/ServerProvider.tsx b/app/components/ServerProvider.tsx
index 1f0030b..0524a1e 100644
--- a/app/components/ServerProvider.tsx
+++ b/app/components/ServerProvider.tsx
@@ -331,6 +331,6 @@ export function overviewSummary(entry: ServerOverview | undefined): string {
if (entry.status.online) {
parts.push(`${entry.status.players.online}/${entry.status.players.max} players`);
}
- parts.push(entry.mode === "simple" ? "Simple" : "Advanced");
+ parts.push(entry.mode === "simple" ? "On this computer" : "In a container");
return parts.join(" · ");
}
diff --git a/app/components/ServerSwitcher.tsx b/app/components/ServerSwitcher.tsx
index 480c6cd..d1f7a0e 100644
--- a/app/components/ServerSwitcher.tsx
+++ b/app/components/ServerSwitcher.tsx
@@ -14,11 +14,11 @@ import {
Separator,
Tooltip,
} from "@heroui/react";
+import StatusPulse from "@/app/components/StatusPulse";
import { useUISound } from "@/app/hooks/useUISound";
import {
identityLine,
overviewSummary,
- phaseDotClass,
phaseText,
useServers,
} from "@/app/components/ServerProvider";
@@ -56,10 +56,7 @@ export default function ServerSwitcher() {
aria-label={`Server: ${active.name} (${phaseText(activeState?.phase)}). Switch server`}
onMouseEnter={() => play("hover")}
>
-
+
{active.name}
@@ -79,10 +76,7 @@ export default function ServerSwitcher() {
const state = stateOf(server.id);
return (
-
+
{server.name}
{overviewSummary(state)}
diff --git a/app/components/ServersCard.tsx b/app/components/ServersCard.tsx
index 89b9ba8..58a0e93 100644
--- a/app/components/ServersCard.tsx
+++ b/app/components/ServersCard.tsx
@@ -81,9 +81,9 @@ const ADD_KINDS: {
},
{
id: "managed",
- title: "Plain Minecraft server",
+ title: "Normal Minecraft, on this computer",
description:
- "The simplest: MineUI downloads the official (vanilla) server and runs it on this computer. Nothing else to install; no mods.",
+ "The simplest: MineUI downloads the official (vanilla) server and runs it on this computer. No mods. If this computer has no Java, MineUI can get it for you.",
icon: Sparkles,
mode: "simple",
next: "/",
diff --git a/app/components/ServersOverview.tsx b/app/components/ServersOverview.tsx
index 27a5c40..5b1b370 100644
--- a/app/components/ServersOverview.tsx
+++ b/app/components/ServersOverview.tsx
@@ -9,12 +9,14 @@ import { useLayoutEffect, useRef, useState } from "react";
import { motion } from "motion/react";
import { Layers, Play, Square } from "lucide-react";
import { Button, Card, Chip, ScrollShadow, toast } from "@heroui/react";
+import StatusPulse from "@/app/components/StatusPulse";
+import Rolling from "@/app/components/Rolling";
+import PressRipple from "@/app/components/PressRipple";
import { useUISound } from "@/app/hooks/useUISound";
import { reportLifecycleError } from "@/app/components/PidsControllerHelp";
import { usePageMotion } from "@/app/lib/motion";
import {
identityLine,
- phaseDotClass,
phaseText,
useServers,
} from "@/app/components/ServerProvider";
@@ -115,14 +117,11 @@ export default function ServersOverview() {
>
-
+
{server.name}
- {isOpen ? "Open" : entry?.mode === "simple" ? "Simple" : "Advanced"}
+ {isOpen ? "Open" : entry?.mode === "simple" ? "On this computer" : "In a container"}
@@ -134,9 +133,14 @@ export default function ServersOverview() {
Players:{" "}
- {entry?.status.online
- ? `${entry.status.players.online}/${entry.status.players.max}`
- : "-"}
+ {entry?.status.online ? (
+
+ ) : (
+ "-"
+ )}
@@ -151,6 +155,7 @@ export default function ServersOverview() {
onPress={() => runLifecycle(server.id, server.name, stopServerById, "stopped")}
onMouseEnter={() => play("hover")}
>
+
Stop
@@ -162,6 +167,7 @@ export default function ServersOverview() {
onPress={() => runLifecycle(server.id, server.name, startServerById, "started")}
onMouseEnter={() => play("hover")}
>
+
Start
diff --git a/app/components/StartHere.tsx b/app/components/StartHere.tsx
new file mode 100644
index 0000000..44c6016
--- /dev/null
+++ b/app/components/StartHere.tsx
@@ -0,0 +1,668 @@
+"use client";
+
+// Start here: the front door for a computer with no server yet. Two plain
+// questions (what to play, who plays), one sentence about what MineUI will set
+// up and why, a check of what this computer needs (Java, or a container
+// program), then it creates and starts the server with the SAME calls and
+// defaults as the two create flows. It is not a third creation path.
+import { useCallback, useState } from "react";
+import { motion } from "motion/react";
+import {
+ CheckCircle2,
+ Loader2,
+ Package,
+ PackageOpen,
+ RefreshCw,
+ Rocket,
+ Sparkles,
+ Users,
+ Wifi,
+ Globe,
+ User,
+ Blocks,
+ Cuboid,
+ TriangleAlert,
+} from "lucide-react";
+import { Button, Card, Input, Label, ProgressBar, TextField } from "@heroui/react";
+import { TextShimmer } from "@heroui-pro/react";
+import PressRipple from "@/app/components/PressRipple";
+import { announceServerMade } from "@/app/lib/milestones";
+import ChoiceCards from "@/app/components/ChoiceCards";
+import {
+ containerNameFor,
+ DEFAULT_CONTAINER_NAME,
+ LATEST,
+ MEMORY_DEFAULT,
+ MEMORY_DEFAULT_MODPACK,
+ newestVersionFor,
+} from "@/app/components/CreateContainerFlow";
+import GetJavaForMe from "@/app/components/GetJavaForMe";
+import { useMode } from "@/app/components/ModeProvider";
+import ModpackPicker, { type ModpackChoice } from "@/app/components/ModpackPicker";
+import OutLink from "@/app/components/OutLink";
+import RuntimeInstallHelp from "@/app/components/RuntimeInstallHelp";
+import { useServers } from "@/app/components/ServerProvider";
+import Term from "@/app/components/Term";
+import { useUISound } from "@/app/hooks/useUISound";
+import { formatBytes } from "@/app/lib/format";
+import { fadeUp } from "@/app/lib/motion";
+import {
+ createContainer,
+ createInstance,
+ detectRuntimes,
+ getSettings,
+ javaCheck,
+ listMcVersions,
+ onDownloadProgress,
+ requiredJavaMajor,
+ setSettings,
+ startServer,
+ IpcError,
+ type DownloadProgressEvent,
+ type JavaCheck,
+ type Mode,
+ type RuntimeProbe,
+} from "@/app/lib/ipc";
+
+type Play = "normal" | "mods";
+type Who = "me" | "home" | "friends";
+type ModsPath = "pack" | "none";
+
+const MEMORY_MIN = 512;
+const MEMORY_MAX = 16384;
+const SERVER_NAME_DEFAULT = "My server";
+const MAX_NAME = 40;
+
+const PLAY_OPTIONS = [
+ {
+ id: "normal" as const,
+ title: "Normal Minecraft",
+ description: "The game as it comes. No mods.",
+ icon: Cuboid,
+ },
+ {
+ id: "mods" as const,
+ title: "Minecraft with mods",
+ description: "Your own mods, or a ready-made pack of them.",
+ icon: Blocks,
+ },
+];
+
+const WHO_OPTIONS = [
+ {
+ id: "me" as const,
+ title: "Just me",
+ description: "Only this computer.",
+ icon: User,
+ },
+ {
+ id: "home" as const,
+ title: "People at home",
+ description: "Same Wi-Fi.",
+ icon: Wifi,
+ },
+ {
+ id: "friends" as const,
+ title: "Friends in other places too",
+ description: "Over the internet.",
+ icon: Globe,
+ },
+];
+
+const MODS_OPTIONS = [
+ {
+ id: "pack" as const,
+ title: "Pick a modpack",
+ description: "A ready-made bundle of mods.",
+ icon: Package,
+ },
+ {
+ id: "none" as const,
+ title: "Start with no mods",
+ description: "Add them later. MineUI uses Fabric.",
+ icon: PackageOpen,
+ },
+];
+
+type JavaState =
+ | { kind: "idle" }
+ | { kind: "checking" }
+ | { kind: "ready"; major: number; check: JavaCheck }
+ | { kind: "need"; major: number; check: JavaCheck | null }
+ | { kind: "offline" };
+
+const javaIsEnough = (check: JavaCheck | null, major: number) =>
+ check !== null &&
+ check.found &&
+ check.compatible !== false &&
+ (check.majorVersion ?? 0) >= major;
+
+interface StartHereProps {
+ /** Called once Start here begins changing anything, so the page keeps it
+ * on screen while the server's kind and data load again behind it. */
+ onActive: () => void;
+ /** The server is made and started: land on the Dashboard. */
+ onDone: (options: { friends: boolean }) => void;
+ /** "I know what I want": show today's create flows instead. */
+ onSkip: () => void;
+}
+
+export default function StartHere({ onActive, onDone, onSkip }: StartHereProps) {
+ const { play } = useUISound();
+ const { active, rename } = useServers();
+ const { refresh: refreshMode } = useMode();
+
+ const [what, setWhat] = useState
("");
+ const [who, setWho] = useState("");
+ const [name, setName] = useState(SERVER_NAME_DEFAULT);
+ const [java, setJava] = useState({ kind: "idle" });
+ const [runtime, setRuntime] = useState(null);
+ const [runtimeChecking, setRuntimeChecking] = useState(false);
+ const [modsPath, setModsPath] = useState("");
+ const [modpack, setModpack] = useState(null);
+ const [eula, setEula] = useState(false);
+ const [busy, setBusy] = useState(false);
+ const [step, setStep] = useState<"idle" | "making" | "starting">("idle");
+ const [progress, setProgress] = useState(null);
+ const [error, setError] = useState(null);
+ // The server exists but did not start: Try again only starts it.
+ const [made, setMade] = useState(false);
+ // Once the server is made its answers are fixed: changing them could not
+ // change the server Try again starts.
+ const locked = busy || made;
+
+ const checkJava = useCallback(async () => {
+ setJava({ kind: "checking" });
+ try {
+ const major = await requiredJavaMajor(LATEST);
+ if (major === null) {
+ setJava({ kind: "offline" });
+ return;
+ }
+ const check = await javaCheck().catch(() => null);
+ setJava(
+ javaIsEnough(check, major)
+ ? { kind: "ready", major, check: check as JavaCheck }
+ : { kind: "need", major, check },
+ );
+ } catch {
+ setJava({ kind: "offline" });
+ }
+ }, []);
+
+ const checkRuntime = useCallback(() => {
+ setRuntimeChecking(true);
+ detectRuntimes()
+ .then(setRuntime)
+ .catch(() => setRuntime(null))
+ .finally(() => setRuntimeChecking(false));
+ }, []);
+
+ const chooseWhat = (next: Play) => {
+ setWhat(next);
+ setError(null);
+ if (next === "normal") void checkJava();
+ else checkRuntime();
+ };
+
+ const noRuntime = runtime !== null && runtime.resolved === null;
+ const runtimeReady = runtime !== null && runtime.resolved !== null;
+ const packVersion =
+ modpack && modpack.gameVersions.length > 0 ? modpack.gameVersions[0] : "";
+
+ // Everything the Create button needs, in the order it is asked for.
+ const missing: string | null = (() => {
+ if (what === "" || who === "") return "Answer both questions.";
+ if (what === "normal") {
+ if (java.kind === "checking" || java.kind === "idle") return "Checking this computer...";
+ if (java.kind === "offline") return "MineUI cannot check this computer right now.";
+ if (java.kind === "need") return "This computer needs Java first (see above).";
+ } else {
+ if (runtime === null) return "Checking this computer...";
+ if (noRuntime) return "This computer needs Podman or Docker first (see above).";
+ if (modsPath === "") return "Choose a modpack or start with no mods.";
+ if (modsPath === "pack" && modpack === null) return "Pick a modpack.";
+ if (modsPath === "pack" && packVersion === "") {
+ return "MineUI cannot tell which Minecraft version this pack uses. Use \"I know what I want\" below to pick it.";
+ }
+ }
+ if (!eula) return "Agree to the Minecraft rules to continue.";
+ return null;
+ })();
+
+ const reasonSentence = (
+ <>
+ {what === "normal" ? (
+ <>
+ MineUI will run a normal Minecraft server on this computer, because it is the
+ simplest way to play with no mods.
+ >
+ ) : (
+ <>
+ MineUI will run a server with mods in a container (a
+ sealed box that keeps the server tidy), because mods need their own setup and the
+ box keeps it apart from your other files.
+ >
+ )}
+ {what === "mods" && modsPath === "pack" && modpack && (
+ <> It will start from {modpack.title}.>
+ )}
+ {what === "mods" && modsPath === "none" && (
+ <>
+ {" "}
+ It will start with no mods, on Fabric , so you can add
+ mods later.
+ >
+ )}
+ {who === "me" && what === "mods" && <> Only this computer can join it.>}
+ {who === "home" && what === "mods" && <> Other devices on your Wi-Fi can join it.>}
+ {who === "friends" && what === "mods" && (
+ <> Other devices can join it, and MineUI will show the steps for friends elsewhere.>
+ )}
+ {who === "me" && what === "normal" && <> Only you will play, so there is nothing else to set up.>}
+ {who === "home" && what === "normal" && (
+ <> When it is ready, MineUI shows the address people at home type to join.>
+ )}
+ {who === "friends" && what === "normal" && (
+ <> When it is ready, MineUI shows the address and the steps for friends elsewhere.>
+ )}
+ >
+ );
+
+ const run = async () => {
+ if (missing !== null || busy || what === "" || who === "") return;
+ play("click_confirm");
+ setBusy(true);
+ setError(null);
+ setProgress(null);
+ onActive();
+ let unlisten: (() => void) | null = null;
+ try {
+ if (!made) {
+ setStep("making");
+ const wanted = name.trim().slice(0, MAX_NAME);
+ let serverName = active.name;
+ if (wanted !== "" && wanted !== active.name) {
+ try {
+ await rename(active.id, wanted);
+ serverName = wanted;
+ } catch {
+ // A name that does not stick must not stop the server.
+ }
+ }
+
+ // Normal Minecraft runs On this computer, mods run In a container.
+ const wantMode: Mode = what === "normal" ? "simple" : "advanced";
+ const current = await getSettings();
+ if (current.activeMode !== wantMode) {
+ await setSettings({ ...current, activeMode: wantMode });
+ await refreshMode();
+ }
+
+ if (what === "normal") {
+ unlisten = await onDownloadProgress((event) => {
+ if (event.kind === "server-jar") setProgress(event);
+ });
+ const versions = await listMcVersions();
+ const latest = versions.find((v) => v.latest && v.type === "release")?.id;
+ if (!latest) {
+ throw new IpcError("DOWNLOAD_FAILED", "MineUI could not find the newest Minecraft version.");
+ }
+ const memoryMb = Math.min(
+ Math.max(current.simple.memoryMb || 2048, MEMORY_MIN),
+ MEMORY_MAX,
+ );
+ await createInstance({ mcVersion: latest, acceptEula: true, memoryMb });
+ } else {
+ const containerName =
+ current.advanced.containerName !== DEFAULT_CONTAINER_NAME
+ ? current.advanced.containerName
+ : containerNameFor(serverName);
+ const withPack = modsPath === "pack" && modpack !== null;
+ // No pack: the newest concrete version Fabric has a build for
+ // (LATEST only when Fabric's list cannot be had, contract 3.13).
+ const mcVersion = withPack ? packVersion : await newestVersionFor("fabric");
+ await createContainer({
+ loader: "fabric",
+ mcVersion,
+ containerName,
+ memoryMb: withPack ? MEMORY_DEFAULT_MODPACK : MEMORY_DEFAULT,
+ gamePort: current.advanced.queryPort,
+ rconPort: current.advanced.rconPort,
+ exposeToNetwork: who !== "me",
+ extraPorts: [],
+ acceptEula: true,
+ modpack: withPack ? { source: modpack.source, project: modpack.project } : null,
+ });
+ }
+ setMade(true);
+ }
+
+ setStep("starting");
+ await startServer();
+ play("success");
+ announceServerMade("It is starting now. Give it a minute.");
+ onDone({ friends: who === "friends" });
+ } catch (e) {
+ play("error");
+ setError(
+ e instanceof IpcError
+ ? e.message
+ : "Something went wrong. Nothing was lost, you can try again.",
+ );
+ setStep("idle");
+ setBusy(false);
+ } finally {
+ unlisten?.();
+ }
+ };
+
+ const percent =
+ progress && progress.totalBytes
+ ? Math.min(100, (progress.receivedBytes / progress.totalBytes) * 100)
+ : null;
+
+ const needsPanel = what !== "";
+
+ return (
+
+
+
+
+
+ Start here
+
+ Welcome to MineUI
+
+ Let's make a Minecraft server for you and your friends. Answer two
+ questions and MineUI does the rest.
+
+
+
+
+
+ 1. What do you want to play?
+
+
+
+
+ 2. Who will play?
+ {
+ setWho(next);
+ setError(null);
+ }}
+ />
+
+
+ {what !== "" && who !== "" && (
+ <>
+
+
+
+ Name your server (you can change it later)
+
+
+ >
+ )}
+
+ {needsPanel && what === "normal" && (
+
+
+ What this computer needs
+
+ {(java.kind === "checking" || java.kind === "idle") && (
+
+
+ Checking for Java ...
+
+ )}
+ {java.kind === "ready" && (
+
+
+
+ {java.check.managed
+ ? `Using Java MineUI downloaded (${java.check.majorVersion ?? java.major})`
+ : `Java ${java.check.version ?? java.major} is on this computer. You are good to go.`}
+
+
+ )}
+ {java.kind === "need" && (
+
+
+ The newest Minecraft needs Java {java.major}.{" "}
+ {java.check?.found
+ ? "The Java on this computer is too old."
+ : "This computer does not have it yet."}{" "}
+ MineUI can get it for you.
+
+
+ setJava(
+ javaIsEnough(check, java.major)
+ ? { kind: "ready", major: java.major, check }
+ : { kind: "need", major: java.major, check },
+ )
+ }
+ />
+
+ )}
+ {java.kind === "offline" && (
+
+
+
+ MineUI cannot check what your computer needs right now. Check your
+ internet connection and try again.
+
+
+ void checkJava()}>
+
+ Try again
+
+
+
+ )}
+
+ )}
+
+ {needsPanel && what === "mods" && (
+
+
+ What this computer needs
+
+ {runtime === null && (
+
+
+ Looking for a program that runs containers ...
+
+ )}
+ {noRuntime && (
+
+
+ Servers with mods run in a container, and a container needs a free
+ program called Podman or{" "}
+ Docker . This computer does not have one yet.
+
+
+
+ )}
+ {runtimeReady && (
+ <>
+
+
+
+ {runtime.resolved === "podman" ? "Podman" : "Docker"} is ready. You are
+ good to go.
+
+
+
+
+ Which mods do you want?
+
+ {
+ setModsPath(next);
+ if (next === "none") setModpack(null);
+ }}
+ />
+
+ {modsPath === "pack" && (
+
+ )}
+ >
+ )}
+
+ )}
+
+ {what !== "" && who !== "" && (
+
+ {
+ play(event.target.checked ? "toggle_on" : "click_back");
+ setEula(event.target.checked);
+ }}
+ />
+
+ I agree to the{" "}
+
+ Minecraft End User License Agreement
+
+ .{" "}
+
+ These are Mojang's rules for running a server (
+ what's the EULA? ). Every Minecraft server has
+ to agree to them.
+
+
+
+ )}
+
+ {busy && (
+
+
+
+
+ {step === "starting"
+ ? "Starting your server..."
+ : what === "mods"
+ ? "Making your server. The first time, MineUI downloads the server files (about 1 GB), which can take a few minutes."
+ : progress
+ ? `Downloading ${progress.filename}`
+ : "Making your server..."}
+
+ {step !== "starting" && what === "normal" && progress?.totalBytes
+ ? ` ${formatBytes(progress.receivedBytes)} / ${formatBytes(progress.totalBytes)}`
+ : ""}
+
+
+
+
+
+
+
+ )}
+
+ {error && (
+
+
That did not work.
+
{error}
+ {made && (
+
+ Your server is already made, so the answers above are locked. Only
+ starting it failed, and Try again just starts it.
+
+ )}
+
+ )}
+
+
+
+ {
+ play("click_confirm");
+ onSkip();
+ }}
+ onMouseEnter={() => play("hover")}
+ >
+ I know what I want
+
+
+ {missing !== null && !busy && what !== "" && who !== "" && (
+
{missing}
+ )}
+ {what !== "" && who !== "" && (
+
play("hover")}
+ >
+
+ {busy ? (
+ <>
+
+ Working...
+ >
+ ) : (
+ <>
+
+ {error ? "Try again" : "Make my server"}
+ >
+ )}
+
+ )}
+
+
+
+
+ );
+}
diff --git a/app/components/StatusPulse.tsx b/app/components/StatusPulse.tsx
new file mode 100644
index 0000000..9d3d0e3
--- /dev/null
+++ b/app/components/StatusPulse.tsx
@@ -0,0 +1,27 @@
+"use client";
+
+// A server's state as a small dot. Running: a soft ring breathes out from a
+// success-coloured dot. Starting or stopping: the same ring, faster, in the
+// warning colour. Everything else: a plain still dot. The ring is a CSS
+// animation (globals.css, .status-ring) that is switched off for
+// reduce-motion, so a still dot is all that is left there.
+import type { ServerPhase } from "@/app/lib/ipc";
+import { phaseDotClass } from "@/app/components/ServerProvider";
+
+interface StatusPulseProps {
+ phase: ServerPhase | null | undefined;
+ /** Size utility for the dot. Defaults to size-2. */
+ className?: string;
+}
+
+export default function StatusPulse({ phase, className = "size-2" }: StatusPulseProps) {
+ const color = phaseDotClass(phase);
+ const rhythm =
+ phase === "running" ? "calm" : phase === "starting" || phase === "stopping" ? "busy" : null;
+ return (
+
+ {rhythm && }
+
+
+ );
+}
diff --git a/app/components/Term.tsx b/app/components/Term.tsx
new file mode 100644
index 0000000..9d0dfca
--- /dev/null
+++ b/app/components/Term.tsx
@@ -0,0 +1,52 @@
+"use client";
+
+// A word with a "What's this?" explanation. Click, tap, Enter or Space opens
+// a small popover; Escape closes it. Tokens only, so it follows every style
+// and light/dark.
+import { Popover } from "@heroui/react";
+import { Pressable } from "react-aria-components";
+import { GLOSSARY, type GlossaryTerm } from "@/app/lib/glossary";
+
+export default function Term({
+ term,
+ children,
+}: {
+ term: GlossaryTerm;
+ /** What to show in the text; defaults to the term itself. */
+ children?: React.ReactNode;
+}) {
+ const entry = GLOSSARY[term];
+ return (
+
+ {/* A , not Popover.Trigger: that renders a , which is not
+ allowed inside the
most Terms sit in. Pressable gives the span
+ the same press handling (click, tap, Enter, Space). */}
+
+
+ {children ?? term}
+
+ ?
+
+
+
+
+
+
+ {entry.title}
+
+ {entry.body}
+
+
+
+ );
+}
diff --git a/app/components/ViewLevelProvider.tsx b/app/components/ViewLevelProvider.tsx
new file mode 100644
index 0000000..d249948
--- /dev/null
+++ b/app/components/ViewLevelProvider.tsx
@@ -0,0 +1,98 @@
+"use client";
+
+// App-wide view level: "simple" shows what you need to run a server with
+// friends, "advanced" shows everything. This is a VIEW setting only - it is
+// kept in localStorage on this machine and never calls any IPC, never
+// changes a server or a setting. (The 2.9.0 header toggle switched a server
+// between "On this computer" and "In a container" and looked like deleting
+// it; the server's run kind still lives in Server Settings > Advanced.)
+import {
+ createContext,
+ useCallback,
+ useContext,
+ useMemo,
+ useSyncExternalStore,
+} from "react";
+
+export type ViewLevel = "simple" | "advanced";
+
+export const VIEW_LEVEL_KEY = "mineui-view-level";
+export const DEFAULT_VIEW_LEVEL: ViewLevel = "simple";
+
+export const VIEW_LEVELS: { id: ViewLevel; label: string }[] = [
+ { id: "simple", label: "Simple" },
+ { id: "advanced", label: "Advanced" },
+];
+
+export const VIEW_LEVEL_HINT =
+ "Simple shows what you need to run a server with friends. Advanced shows everything.";
+
+const isLevel = (value: unknown): value is ViewLevel =>
+ value === "simple" || value === "advanced";
+
+let cached: ViewLevel | undefined;
+const listeners = new Set<() => void>();
+
+function readStored(): ViewLevel {
+ if (cached !== undefined) return cached;
+ let level: ViewLevel = DEFAULT_VIEW_LEVEL;
+ try {
+ const stored = window.localStorage.getItem(VIEW_LEVEL_KEY);
+ if (isLevel(stored)) level = stored;
+ } catch {
+ // No storage (private window, blocked): the default holds.
+ }
+ cached = level;
+ return level;
+}
+
+function writeStored(level: ViewLevel) {
+ cached = level;
+ try {
+ window.localStorage.setItem(VIEW_LEVEL_KEY, level);
+ } catch {
+ // Not remembered, still applied for this session.
+ }
+ listeners.forEach((listener) => listener());
+}
+
+function subscribe(callback: () => void) {
+ listeners.add(callback);
+ return () => {
+ listeners.delete(callback);
+ };
+}
+
+interface ViewLevelContextValue {
+ level: ViewLevel;
+ setLevel: (level: ViewLevel) => void;
+}
+
+const ViewLevelContext = createContext(null);
+
+export default function ViewLevelProvider({
+ children,
+}: {
+ children: React.ReactNode;
+}) {
+ const level = useSyncExternalStore(
+ subscribe,
+ readStored,
+ () => DEFAULT_VIEW_LEVEL,
+ );
+ const setLevel = useCallback((next: ViewLevel) => writeStored(next), []);
+ const value = useMemo(() => ({ level, setLevel }), [level, setLevel]);
+ return (
+
+ {children}
+
+ );
+}
+
+export function useViewLevel(): ViewLevelContextValue {
+ const ctx = useContext(ViewLevelContext);
+ if (!ctx) {
+ throw new Error("useViewLevel() must be used within a ");
+ }
+ return ctx;
+}
diff --git a/app/components/ViewLevelSwitch.tsx b/app/components/ViewLevelSwitch.tsx
new file mode 100644
index 0000000..b9a5531
--- /dev/null
+++ b/app/components/ViewLevelSwitch.tsx
@@ -0,0 +1,57 @@
+"use client";
+
+// The Simple / Advanced view switch (header and App Settings). View level
+// only: it changes what MineUI shows, never a server or a setting.
+import { Segment } from "@heroui-pro/react";
+import { Tooltip } from "@heroui/react";
+import { firstKey } from "@/app/lib/keys";
+import { useUISound } from "@/app/hooks/useUISound";
+import {
+ VIEW_LEVELS,
+ VIEW_LEVEL_HINT,
+ useViewLevel,
+ type ViewLevel,
+} from "@/app/components/ViewLevelProvider";
+
+export default function ViewLevelSwitch({
+ withTooltip = false,
+}: {
+ withTooltip?: boolean;
+}) {
+ const { level, setLevel } = useViewLevel();
+ const { play } = useUISound();
+
+ const segment = (
+ {
+ const next = firstKey(key) as ViewLevel | null;
+ if (!next || next === level) return;
+ play(next === "advanced" ? "toggle_on" : "toggle_off");
+ setLevel(next);
+ }}
+ >
+ {VIEW_LEVELS.map((option) => (
+ play("hover")}
+ >
+ {option.label}
+
+ ))}
+
+ );
+
+ if (!withTooltip) return segment;
+ return (
+
+ {segment}
+
+ {VIEW_LEVEL_HINT}
+
+
+ );
+}
diff --git a/app/config/page.tsx b/app/config/page.tsx
index df3f37d..44ed37c 100644
--- a/app/config/page.tsx
+++ b/app/config/page.tsx
@@ -1,5 +1,9 @@
"use client";
+import Term from "@/app/components/Term";
+
+import AdvancedOnly from "@/app/components/AdvancedOnly";
+
import { useCallback, useEffect, useRef, useState } from "react";
import { motion } from "motion/react";
import { FileCode2 } from "lucide-react";
@@ -25,7 +29,7 @@ import {
// Contract §3.7: config paths are now relative, forward-slash
// ("server.properties", "config/foo.toml") - display them as-is.
-export default function ConfigPage() {
+function ConfigPageInner() {
const { containerMotion, cardMotion } = usePageMotion();
const [files, setFiles] = useState([]);
const [loading, setLoading] = useState(true);
@@ -167,6 +171,11 @@ export default function ConfigPage() {
variants={containerMotion}
>
+
+ Edit the server's settings files. Start with{" "}
+ server.properties : game mode,
+ difficulty and how many players fit.
+
);
}
+
+export default function ConfigPage() {
+ return (
+
+
+
+ );
+}
diff --git a/app/globals.css b/app/globals.css
index 8b13f17..faee59d 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -156,3 +156,49 @@ html {
transition-duration: var(--motion-slow);
}
}
+
+/* Status ring (app/components/StatusPulse.tsx): a soft ring breathes out
+ from the state dot. Running is calm, starting/stopping is quicker. Phosphor
+ never scales (theme contract), so there it only fades. Reduce-motion: no
+ ring at all, the plain dot stays. */
+@keyframes status-ring-grow {
+ 0% {
+ transform: scale(1);
+ opacity: 0.55;
+ }
+ 100% {
+ transform: scale(2.8);
+ opacity: 0;
+ }
+}
+
+@keyframes status-ring-fade {
+ 0%,
+ 100% {
+ opacity: 0.5;
+ }
+ 50% {
+ opacity: 0;
+ }
+}
+
+.status-ring {
+ position: absolute;
+ inset: 0;
+ animation: status-ring-grow 2.4s ease-out infinite;
+}
+
+.status-ring[data-rhythm="busy"] {
+ animation-duration: 1s;
+}
+
+[data-theme="phosphor"] .status-ring {
+ animation-name: status-ring-fade;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ .status-ring {
+ display: none;
+ animation: none;
+ }
+}
diff --git a/app/layout.tsx b/app/layout.tsx
index fd3dacb..44afcca 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -22,6 +22,7 @@ import "./globals.css";
import Navbar from "@/app/components/Navbar";
import ModeProvider, { PageBoundary } from "@/app/components/ModeProvider";
import ServerProvider from "@/app/components/ServerProvider";
+import ViewLevelProvider from "@/app/components/ViewLevelProvider";
import PidsControllerHelp from "@/app/components/PidsControllerHelp";
export const metadata: Metadata = {
@@ -50,16 +51,18 @@ export default function RootLayout({
every component needing its own useReducedMotion() branch. */}
{/* Server profile (which server is open) wraps mode (that
- server's Simple/Advanced). The header stays mounted across a
+ server's run kind). The header stays mounted across a
server switch; only the page is remounted (PageBoundary). */}
-
-
-
- {children}
-
-
-
-
+
+
+
+
+ {children}
+
+
+
+
+