diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 97eb4f0..83a0c5e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -70,41 +70,35 @@ jobs: ### What's new in ${{ github.ref_name }} - **Server Creation Wizard — major overhaul** - The Guided Custom section has been reworked from a single slider page into four dedicated steps: **Core Rates**, **Breeding**, **Combat**, and **Server QoL**. Each step covers the relevant settings with sliders, toggles, and contextual help. The Breeding page includes a live warning when food consumption is set higher than mature speed — a common misconfiguration that causes baby dinos to starve before they fully mature. + **Wild dino wipe scheduling** + A new `wipe_dinos` schedule type fires `destroywilddinos` via RCON at a configured interval. A pre-wipe chat warning is automatically sent to players before the wipe executes. - **Preset config fixes** - The Official, Casual, and Boosted presets now correctly apply all `GameUserSettings.ini` and `Game.ini` values per game mode, matching the documented target settings for each style. + **Pre-backup RCON broadcast** + A configurable message can be sent to players in-game before any scheduled backup runs, so they know a backup (and brief lag spike) is coming. - **Full Customize INI — tooltip descriptions** - Every field in the Full Customize INI section now has a `?` icon that shows a description tooltip on hover, making it easier to understand what each setting does without leaving the wizard. + **Memory limit restart** + Each server can be given a RAM ceiling (in GB). When the stats poller detects the process exceeding that limit, LokiASAM performs a graceful restart — `saveworld`, `doexit`, then relaunch — with a cooldown to prevent restart loops. - **INI field defaults** - Fields that are not explicitly set by the selected preset now show their documented game default value instead of `0`. + **Start All / Stop All / Restart All** + Global action buttons in the server list header let you start every stopped server, stop every running server, or restart all running servers with a single click. - **Map list correction** - Genesis Part 1 has been removed from the available map list — it is not yet released for ARK: Survival Ascended. + **Backup path reconciliation** + Scheduled and manual backups now use the server's `save_folder_name` as the effective save directory when configured, falling back to the map default. Fixes cases where saves were backed up from the wrong path. - **Slider improvements** - The default value marker on all sliders has been relabelled from `def` to `default` and its alignment has been corrected to match the actual thumb position at all values. + **Setup wizard — automation step rewrite** + The automation step now matches the full TimeShift tier system from the server overview: hourly / daily / weekly / monthly tiers for server saves, player data, full backups, and login backups — instead of the old single cron picker. - **Password visibility toggles** - All password inputs now have an eye icon to reveal or hide the entered text — admin password, server password, their confirm fields, and the SMTP password in the setup wizard. + **Crossplay toggle fix** + The Network step in the setup wizard was writing the old `AllPlatforms` flag (ASE). It now correctly writes the `crossplay` flag to stay in sync with the CLI args step. - **Live chat log** - The chat panel now updates in real time via Tauri events. No manual refresh is needed. + **Launch at login** + A new OS-level autostart option (via `tauri-plugin-autostart`) lets LokiASAM start with your system. The toggle is available in the setup wizard tray step and in Settings → System Tray. Pairs well with the existing minimize-to-tray option. - **Cleaner server restart** - Server restarts now use RCON `saveworld` followed by `doexit` for a clean, save-first shutdown instead of a raw process signal. + **Additional launch parameters** + New performance tuning, anti-cheat, and gameplay flags added. Save folder override (`-SaveDirectoryOverride`) and active in-game event flags are now applied when starting servers. - **Notification system improvements** - Notification matrix state management has been reworked and event wiring fixed. Auto-update notification options have been reworked. - - **Setup wizard additions** - Directory wipe functionality added. Build version is now tracked and displayed in the wizard footer. - - **Backup & scheduling fixes** - Backup scheduling accuracy improved. Schedule filtering logic corrected. + **Fix: Club ARK map path** + Corrected the save path for Club ARK (`BobsMissions`) in both the backup manager and game data definitions. ### Installation diff --git a/package.json b/package.json index b66b462..8d457e3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "lokiasam", - "version": "0.14.0", + "version": "0.14.1", "private": true, "scripts": { "dev": "next dev", @@ -16,6 +16,7 @@ "@hookform/resolvers": "^5.4.0", "@tanstack/react-query": "^5.100.14", "@tauri-apps/api": "^2.11.0", + "@tauri-apps/plugin-autostart": "^2.5.1", "@tauri-apps/plugin-clipboard-manager": "^2.3.2", "@tauri-apps/plugin-dialog": "^2.7.1", "@tauri-apps/plugin-fs": "^2.5.1", diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD index 3bc6015..9a089d9 100644 --- a/packaging/arch/PKGBUILD +++ b/packaging/arch/PKGBUILD @@ -1,6 +1,6 @@ # Maintainer: Arron Ohnemus pkgname=lokiasam -pkgver=0.14.0 +pkgver=0.14.1 pkgrel=1 pkgdesc="Loki ARK Survival Ascended Server Manager — a desktop app for managing dedicated ASA servers" arch=("x86_64") diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8a4684a..7332b73 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -26,6 +26,9 @@ importers: '@tauri-apps/api': specifier: ^2.11.0 version: 2.11.0 + '@tauri-apps/plugin-autostart': + specifier: ^2.5.1 + version: 2.5.1 '@tauri-apps/plugin-clipboard-manager': specifier: ^2.3.2 version: 2.3.2 @@ -1608,6 +1611,9 @@ packages: engines: {node: '>= 10'} hasBin: true + '@tauri-apps/plugin-autostart@2.5.1': + resolution: {integrity: sha512-zS/xx7yzveCcotkA+8TqkI2lysmG2wvQXv2HGAVExITmnFfHAdj1arGsbbfs3o6EktRHf6l34pJxc3YGG2mg7w==} + '@tauri-apps/plugin-clipboard-manager@2.3.2': resolution: {integrity: sha512-CUlb5Hqi2oZbcZf4VUyUH53XWPPdtpw43EUpCza5HWZJwxEoDowFzNUDt1tRUXA8Uq+XPn17Ysfptip33sG4eQ==} @@ -5644,6 +5650,10 @@ snapshots: '@tauri-apps/cli-win32-ia32-msvc': 2.11.2 '@tauri-apps/cli-win32-x64-msvc': 2.11.2 + '@tauri-apps/plugin-autostart@2.5.1': + dependencies: + '@tauri-apps/api': 2.11.0 + '@tauri-apps/plugin-clipboard-manager@2.3.2': dependencies: '@tauri-apps/api': 2.11.0 diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 582b9b7..406aa31 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -318,6 +318,17 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "auto-launch" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f012b8cc0c850f34117ec8252a44418f2e34a2cf501de89e29b241ae5f79471" +dependencies = [ + "dirs 4.0.0", + "thiserror 1.0.69", + "winreg 0.10.1", +] + [[package]] name = "autocfg" version = "1.5.1" @@ -1068,13 +1079,33 @@ dependencies = [ "subtle", ] +[[package]] +name = "dirs" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3aa72a6f96ea37bbc5aa912f6788242832f75369bdfdadcb0e38423f100059" +dependencies = [ + "dirs-sys 0.3.7", +] + [[package]] name = "dirs" version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" dependencies = [ - "dirs-sys", + "dirs-sys 0.5.0", +] + +[[package]] +name = "dirs-sys" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b1d1d91c932ef41c0f2663aa8b0ca0342d444d842c06914aa0a7e352d0bada6" +dependencies = [ + "libc", + "redox_users 0.4.6", + "winapi", ] [[package]] @@ -1085,7 +1116,7 @@ checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" dependencies = [ "libc", "option-ext", - "redox_users", + "redox_users 0.5.2", "windows-sys 0.61.2", ] @@ -1249,7 +1280,7 @@ dependencies = [ "rustc_version", "toml 1.1.2+spec-1.1.0", "vswhom", - "winreg", + "winreg 0.55.0", ] [[package]] @@ -2558,6 +2589,16 @@ dependencies = [ "serde_json", ] +[[package]] +name = "junction" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "160f2eade097f30263b548aae5deb12ad349c909baa710fa24b92c9090b2e006" +dependencies = [ + "scopeguard", + "windows-sys 0.61.2", +] + [[package]] name = "keyboard-types" version = "0.7.0" @@ -2727,10 +2768,11 @@ dependencies = [ [[package]] name = "lokiasam" -version = "0.14.0" +version = "0.14.1" dependencies = [ "configparser", "flate2", + "junction", "lettre", "log", "procfs", @@ -2744,6 +2786,7 @@ dependencies = [ "tar", "tauri", "tauri-build", + "tauri-plugin-autostart", "tauri-plugin-clipboard-manager", "tauri-plugin-dialog", "tauri-plugin-fs", @@ -3961,6 +4004,17 @@ dependencies = [ "bitflags 2.11.1", ] +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.17", + "libredox", + "thiserror 1.0.69", +] + [[package]] name = "redox_users" version = "0.5.2" @@ -5304,7 +5358,7 @@ dependencies = [ "anyhow", "bytes", "cookie", - "dirs", + "dirs 6.0.0", "dunce", "embed_plist", "getrandom 0.3.4", @@ -5355,7 +5409,7 @@ checksum = "4aa1f9055fc23919a54e4e125052bed16ed04aef0487086e758fe01a67b451c7" dependencies = [ "anyhow", "cargo_toml", - "dirs", + "dirs 6.0.0", "glob", "heck 0.5.0", "json-patch", @@ -5425,6 +5479,20 @@ dependencies = [ "walkdir", ] +[[package]] +name = "tauri-plugin-autostart" +version = "2.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "459383cebc193cdd03d1ba4acc40f2c408a7abce419d64bdcd2d745bc2886f70" +dependencies = [ + "auto-launch", + "serde", + "serde_json", + "tauri", + "tauri-plugin", + "thiserror 2.0.18", +] + [[package]] name = "tauri-plugin-clipboard-manager" version = "2.3.2" @@ -5587,7 +5655,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "806d9dac662c2e4594ff03c647a552f2c9bd544e7d0f683ec58f872f952ce4af" dependencies = [ "base64 0.22.1", - "dirs", + "dirs 6.0.0", "flate2", "futures-util", "http", @@ -6126,7 +6194,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15edbb0d80583e85ee8df283410038e17314df5cba30da2087a54a85216c0773" dependencies = [ "crossbeam-channel", - "dirs", + "dirs 6.0.0", "libappindicator", "muda", "objc2", @@ -7321,6 +7389,15 @@ dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" +dependencies = [ + "winapi", +] + [[package]] name = "winreg" version = "0.55.0" @@ -7459,7 +7536,7 @@ dependencies = [ "block2", "cookie", "crossbeam-channel", - "dirs", + "dirs 6.0.0", "dom_query", "dpi", "dunce", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index d7a496e..50db92a 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lokiasam" -version = "0.14.0" +version = "0.14.1" description = "Loki Ark Survival Ascended Server Manager" authors = ["Loki"] license = "GPL-3.0-or-later" @@ -28,6 +28,7 @@ tauri-plugin-notification = { version = "2" } tauri-plugin-single-instance = { version = "2" } tauri-plugin-clipboard-manager = { version = "2" } tauri-plugin-updater = { version = "2" } +tauri-plugin-autostart = { version = "2" } # Serialization serde = { version = "1", features = ["derive"] } @@ -76,5 +77,7 @@ procfs = { version = "0.17", default-features = false } # Windows elevation: spawn a child process with "runas" verb (UAC prompt). # Used for netsh firewall rule management which requires admin rights. +# Junction point creation for save directory symlink equivalents on Windows. [target.'cfg(target_os = "windows")'.dependencies] -runas = { version = "0.2" } +runas = { version = "0.2" } +junction = { version = "2.0.0" } diff --git a/src-tauri/capabilities/default.json b/src-tauri/capabilities/default.json index 1644868..61fde65 100644 --- a/src-tauri/capabilities/default.json +++ b/src-tauri/capabilities/default.json @@ -33,6 +33,10 @@ "updater:default", "updater:allow-check", "updater:allow-download-and-install", - "core:window:allow-destroy" + "core:window:allow-destroy", + "autostart:default", + "autostart:allow-enable", + "autostart:allow-disable", + "autostart:allow-is-enabled" ] } diff --git a/src-tauri/src/commands/backup.rs b/src-tauri/src/commands/backup.rs index c6ab372..a66f97b 100644 --- a/src-tauri/src/commands/backup.rs +++ b/src-tauri/src/commands/backup.rs @@ -217,6 +217,22 @@ pub async fn rcon_save_world(pool: &RconPool, server_id: &str) -> Result<(), Str } } +/// Send an RCON ServerChat broadcast (fire-and-forget — never blocks the caller). +pub async fn rcon_broadcast(pool: &RconPool, server_id: &str, message: &str) { + let tx = { + let guard = pool.cmd_channels.lock().await; + guard.get(server_id).filter(|(tx, _)| !tx.is_closed()).map(|(tx, _)| tx.clone()) + }; + let Some(tx) = tx else { return; }; + let (resp_tx, _resp_rx) = oneshot::channel(); + let _ = tx.send(RconCmd::Execute { + command: format!("ServerChat {message}"), + suppress_cmd: false, + suppress_resp: true, + response_tx: resp_tx, + }).await; +} + /// Write `files` into a 7z archive at `dest_path`. /// `root` is stripped from each file path to produce the archive entry name. /// Emits progress events keyed on `server_id`. @@ -365,9 +381,14 @@ pub async fn create_server_backup( backup_dir: String, triggered_by: String, tier: String, + save_folder_name: Option, pool: State<'_, RconPool>, ) -> Result { - let result = create_server_backup_inner(&app, &server_id, &server_name, &install_path, &map_path, &map_id, &backup_dir, &triggered_by, &tier, &pool, false).await; + // Use save_folder_name as the save dir when set (new symlink-based layout) + let effective_map_path = save_folder_name + .filter(|s| !s.is_empty()) + .unwrap_or_else(|| map_path.clone()); + let result = create_server_backup_inner(&app, &server_id, &server_name, &install_path, &effective_map_path, &map_id, &backup_dir, &triggered_by, &tier, &pool, false).await; if let Ok(ref rec) = result { let size = fmt_size(rec.file_size_bytes); crate::commands::notifications::dispatch_notification( @@ -563,8 +584,12 @@ pub async fn backup_all_players( map_id: String, backup_dir: String, triggered_by: String, + save_folder_name: Option, ) -> Result, String> { - let result = backup_all_players_inner(&app, &server_id, &server_name, &install_path, &map_path, &map_id, &backup_dir, &triggered_by).await; + let effective_map_path = save_folder_name + .filter(|s| !s.is_empty()) + .unwrap_or_else(|| map_path.clone()); + let result = backup_all_players_inner(&app, &server_id, &server_name, &install_path, &effective_map_path, &map_id, &backup_dir, &triggered_by).await; if let Ok(ref recs) = result { let count = recs.len(); if count > 0 { @@ -705,10 +730,14 @@ pub async fn create_ini_backup( server_id: String, install_path: String, backup_dir: String, - platform: String, ) -> Result { + #[cfg(target_os = "windows")] + let platform = "WindowsServer"; + #[cfg(not(target_os = "windows"))] + let platform = "LinuxServer"; + let config_dir = PathBuf::from(&install_path) - .join("ShooterGame").join("Saved").join("Config").join(&platform); + .join("ShooterGame").join("Saved").join("Config").join(platform); let ini_files = ["GameUserSettings.ini", "Game.ini"]; let sources: Vec = ini_files.iter() @@ -747,6 +776,144 @@ pub async fn create_ini_backup( }) } +/// Create the save directory link used with -SaveDirectoryOverride. +/// +/// Creates: +/// `{base_dir}/Saves/{save_folder_name}/` ← the real save location +/// `{install_path}/ShooterGame/Saved/SavedArks/{save_folder_name}` ← the link target +/// +/// On Linux: a symlink pointing to the base_dir/Saves/ subdirectory. +/// On Windows: an NTFS junction point (no admin rights required for junctions on local filesystems). +/// +/// If the link already exists and already points to the correct target, returns success without changes. +#[tauri::command] +pub async fn create_save_link( + install_path: String, + save_folder_name: String, + base_dir: String, +) -> Result<(), String> { + if save_folder_name.is_empty() { + return Err("save_folder_name must not be empty".to_string()); + } + + // The real save storage directory + let save_target = PathBuf::from(&base_dir).join("Saves").join(&save_folder_name); + fs::create_dir_all(&save_target).map_err(|e| format!("Failed to create save target dir: {e}"))?; + + // The path where the server expects saves (must be the link) + let saved_arks = PathBuf::from(&install_path) + .join("ShooterGame").join("Saved").join("SavedArks"); + fs::create_dir_all(&saved_arks).map_err(|e| format!("Failed to create SavedArks dir: {e}"))?; + + let link_path = saved_arks.join(&save_folder_name); + + // If already correctly linked, do nothing + if link_path.exists() || link_path.is_symlink() { + #[cfg(target_os = "linux")] + { + if let Ok(existing) = std::fs::read_link(&link_path) { + if existing == save_target { + return Ok(()); + } + } + // Wrong target or broken link — remove and recreate + let _ = fs::remove_file(&link_path); + } + #[cfg(target_os = "windows")] + { + // Junction already exists — leave it; user can manage via OS if needed + return Ok(()); + } + } + + #[cfg(target_os = "linux")] + { + std::os::unix::fs::symlink(&save_target, &link_path) + .map_err(|e| format!("Failed to create symlink: {e}"))?; + } + + #[cfg(target_os = "windows")] + { + junction::create(&save_target, &link_path) + .map_err(|e| format!("Failed to create junction point: {e}"))?; + } + + Ok(()) +} + +/// Wipe server save files at one of three tiers: +/// +/// - `"map"` — delete world `.ark` files only (clears map state, preserves characters). +/// - `"players"` — delete `.arkprofile` and `.arktribe` files only (resets characters/tribes). +/// - `"full"` — delete all save files (world + characters + tribe + mod saves). +/// +/// The save directory is `{install_path}/ShooterGame/Saved/SavedArks/{save_folder_name}/` +/// when save_folder_name is non-empty, otherwise `{install_path}/ShooterGame/Saved/SavedArks/`. +/// +/// The server MUST NOT be running when this is called (enforced on the frontend). +#[tauri::command] +pub async fn wipe_server_saves( + install_path: String, + save_folder_name: String, + tier: String, +) -> Result<(), String> { + let saves_root = if save_folder_name.is_empty() { + PathBuf::from(&install_path).join("ShooterGame").join("Saved").join("SavedArks") + } else { + PathBuf::from(&install_path) + .join("ShooterGame").join("Saved").join("SavedArks") + .join(&save_folder_name) + }; + + if !saves_root.exists() { + return Ok(()); + } + + match tier.as_str() { + "map" => { + // Remove world state files: *.ark (but NOT *.arkprofile or *.arktribe) + for entry in fs::read_dir(&saves_root).map_err(|e| e.to_string())? { + let entry = entry.map_err(|e| e.to_string())?; + let path = entry.path(); + if path.is_file() { + let ext = path.extension().and_then(|e| e.to_str()).unwrap_or(""); + if ext == "ark" { + fs::remove_file(&path).map_err(|e| format!("Failed to remove {:?}: {e}", path))?; + } + } + } + } + "players" => { + // Remove character / tribe files: *.arkprofile, *.arktribe + for entry in fs::read_dir(&saves_root).map_err(|e| e.to_string())? { + let entry = entry.map_err(|e| e.to_string())?; + let path = entry.path(); + if path.is_file() { + let ext = path.extension().and_then(|e| e.to_str()).unwrap_or(""); + if ext == "arkprofile" || ext == "arktribe" { + fs::remove_file(&path).map_err(|e| format!("Failed to remove {:?}: {e}", path))?; + } + } + } + } + "full" => { + // Remove everything in the saves directory (but not the directory itself) + for entry in fs::read_dir(&saves_root).map_err(|e| e.to_string())? { + let entry = entry.map_err(|e| e.to_string())?; + let path = entry.path(); + if path.is_file() || path.is_symlink() { + fs::remove_file(&path).map_err(|e| format!("Failed to remove file {:?}: {e}", path))?; + } else if path.is_dir() { + fs::remove_dir_all(&path).map_err(|e| format!("Failed to remove dir {:?}: {e}", path))?; + } + } + } + _ => return Err(format!("Unknown wipe tier: {tier}")), + } + + Ok(()) +} + /// List timestamped INI snapshot folders for a server (newest first). #[tauri::command] pub async fn list_ini_backups( diff --git a/src-tauri/src/commands/backup_manager.rs b/src-tauri/src/commands/backup_manager.rs index 64824d5..1e7e401 100644 --- a/src-tauri/src/commands/backup_manager.rs +++ b/src-tauri/src/commands/backup_manager.rs @@ -22,7 +22,7 @@ use crate::state::rcon_pool::RconPool; use super::backup::{ create_server_backup_inner, backup_all_players_inner, create_player_backup_inner, - rcon_save_world, BackupRecord, + rcon_save_world, rcon_broadcast, BackupRecord, }; fn fmt_size(bytes: u64) -> String { @@ -57,7 +57,7 @@ fn map_id_to_path(map_id: &str) -> &'static str { "crystalisles"=> "CrystalIsles_WP", "amissa" => "Amissa_WP", "svartalfheim"=> "Svartalfheim_WP", - "clubark" => "ClubARK_WP", + "clubark" => "BobsMissions_WP", _ => "TheIsland_WP", } } @@ -488,7 +488,10 @@ pub async fn execute_tick(app: &AppHandle) { } let schedules = db::get_server_schedules(&conn, &server.id); - let map_path = map_id_to_path(&server.map_id); + let base_map_path = map_id_to_path(&server.map_id); + let map_path = server.save_folder_name.as_deref() + .filter(|s| !s.is_empty()) + .unwrap_or(base_map_path); // Parse both schedule configs up front so we can decide whether a // world save is needed before starting either backup. @@ -506,6 +509,12 @@ pub async fn execute_tick(app: &AppHandle) { // Issue SaveWorld once if any backup type is going to run, so both // server and player backups read from the same flushed on-disk state. if server_active || player_active { + // Send pre-backup broadcast if configured + if let Some(ref msg) = server.backup_broadcast_message { + if !msg.is_empty() { + rcon_broadcast(&pool, &server.id, msg).await; + } + } let _ = rcon_save_world(&pool, &server.id).await; // ASA confirms SaveWorld via RCON before all file I/O is done; // wait for atomic writes (delete → rename) to settle. diff --git a/src-tauri/src/commands/scheduler.rs b/src-tauri/src/commands/scheduler.rs index 691bc96..47cd841 100644 --- a/src-tauri/src/commands/scheduler.rs +++ b/src-tauri/src/commands/scheduler.rs @@ -116,6 +116,13 @@ async fn fire_broadcast(app: &AppHandle, entry: &crate::state::scheduler::Schedu Ok(()) } +async fn fire_wipe_dinos(app: &AppHandle, entry: &crate::state::scheduler::ScheduleEntry) -> Result<(), String> { + let _ = app; + transient_rcon_send(entry.rcon_port, &entry.rcon_password, "ServerChat Wild dinos are being wiped — expect brief lag.").await; + transient_rcon_send(entry.rcon_port, &entry.rcon_password, "destroywilddinos").await; + Ok(()) +} + async fn fire_restart(app: &AppHandle, entry: &crate::state::scheduler::ScheduleEntry) -> Result<(), String> { if !is_server_running(app, &entry.server_id) { return Ok(()); @@ -398,6 +405,10 @@ pub fn tick_scheduler(app: &AppHandle) { Ok(_) => (true, None, vec![]), Err(e) => (false, Some(e), vec![]), }, + "wipe_dinos" => match fire_wipe_dinos(&app, &entry).await { + Ok(_) => (true, None, vec![]), + Err(e) => (false, Some(e), vec![]), + }, _ => (false, Some(format!("Unknown schedule type: {schedule_type}")), vec![]), }; diff --git a/src-tauri/src/commands/server.rs b/src-tauri/src/commands/server.rs index 7ab8a70..8119f9b 100644 --- a/src-tauri/src/commands/server.rs +++ b/src-tauri/src/commands/server.rs @@ -362,6 +362,7 @@ async fn inner_start_server_with_state( started_at: Instant::now(), install_path: params.install_path.clone(), confirmed_running: false, + start_params: params.clone(), }, ); } @@ -929,6 +930,23 @@ pub async fn scan_running_servers( let install_path_watcher = entry.install_path.clone(); { let mut registry = state.running_servers.lock().unwrap(); + // Build a minimal params stub — port/rcon fields are unknown for + // servers detected on startup. The memory-limit checker emits an + // event instead of doing an in-process restart when rcon_port == 0. + let stub_params = StartServerParams { + server_id: entry.server_id.clone(), + server_name: String::new(), + install_path: entry.install_path.clone(), + map_path: String::new(), + port: 0, + query_port: 0, + rcon_port: 0, + rcon_password: String::new(), + extra_args: vec![], + mod_ids: vec![], + proton_path: None, + prefix_path: None, + }; registry.insert( entry.server_id.clone(), crate::state::RunningServer { @@ -936,6 +954,7 @@ pub async fn scan_running_servers( started_at: Instant::now(), install_path: entry.install_path, confirmed_running: true, + start_params: stub_params, }, ); } diff --git a/src-tauri/src/db.rs b/src-tauri/src/db.rs index 5326458..2cdfe1a 100644 --- a/src-tauri/src/db.rs +++ b/src-tauri/src/db.rs @@ -78,18 +78,24 @@ pub struct ServerRow { pub name: String, pub map_id: String, pub install_path: String, + pub save_folder_name: Option, + pub backup_broadcast_message: Option, + pub memory_limit_gb: Option, } pub fn get_server(conn: &Connection, server_id: &str) -> Option { conn.query_row( - "SELECT id, name, map_id, install_path FROM servers WHERE id = ?1", + "SELECT id, name, map_id, install_path, save_folder_name, backup_broadcast_message, memory_limit_gb FROM servers WHERE id = ?1", [server_id], |row| { Ok(ServerRow { - id: row.get(0)?, - name: row.get(1)?, - map_id: row.get(2)?, - install_path: row.get(3)?, + id: row.get(0)?, + name: row.get(1)?, + map_id: row.get(2)?, + install_path: row.get(3)?, + save_folder_name: row.get(4)?, + backup_broadcast_message: row.get(5)?, + memory_limit_gb: row.get(6)?, }) }, ) @@ -98,7 +104,7 @@ pub fn get_server(conn: &Connection, server_id: &str) -> Option { pub fn get_servers(conn: &Connection) -> Vec { let mut stmt = match conn.prepare( - "SELECT id, name, map_id, install_path FROM servers", + "SELECT id, name, map_id, install_path, save_folder_name, backup_broadcast_message, memory_limit_gb FROM servers", ) { Ok(s) => s, Err(e) => { @@ -108,10 +114,13 @@ pub fn get_servers(conn: &Connection) -> Vec { }; stmt.query_map([], |row| { Ok(ServerRow { - id: row.get(0)?, - name: row.get(1)?, - map_id: row.get(2)?, - install_path: row.get(3)?, + id: row.get(0)?, + name: row.get(1)?, + map_id: row.get(2)?, + install_path: row.get(3)?, + save_folder_name: row.get(4)?, + backup_broadcast_message: row.get(5)?, + memory_limit_gb: row.get(6)?, }) }) .map(|rows| rows.filter_map(|r| r.ok()).collect()) diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 969804d..80fe524 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -282,6 +282,10 @@ pub fn run() { let mut open_sessions: HashMap = HashMap::new(); let mut rollup_done = false; let mut last_rollup = tokio::time::Instant::now(); + // Servers currently being memory-limit-restarted — skip them in the + // memory check until the restart completes. + let mem_restarting: std::sync::Arc>> = + std::sync::Arc::new(std::sync::Mutex::new(HashSet::new())); let mut interval = tokio::time::interval(std::time::Duration::from_secs(5)); @@ -405,6 +409,50 @@ pub fn run() { players, ); } + + // ── Memory-limit restart ─────────────────────────────── + // Check memory_limit_gb from the DB and restart the server + // gracefully if RAM usage exceeds the configured threshold. + if mem_restarting.lock().unwrap().contains(&server_id) { + continue; + } + if let Some(mem_mb) = mem { + let app_state = stats_handle.state::(); + let db_path = app_state.get_db_path(); + let start_params = app_state + .running_servers.lock().unwrap() + .get(&server_id).map(|rs| rs.start_params.clone()); + + if let (Some(db_path), Some(params)) = (db_path, start_params) { + let limit_mb: Option = crate::db::open(&db_path).ok() + .and_then(|conn| crate::db::get_server(&conn, &server_id)) + .and_then(|s| s.memory_limit_gb) + .map(|gb| gb * 1024.0); + + if let Some(limit_mb) = limit_mb { + if (mem_mb as f64) > limit_mb { + eprintln!( + "[mem-limit] {} using {mem_mb} MB > {limit_mb:.0} MB limit — restarting", + server_id + ); + mem_restarting.lock().unwrap().insert(server_id.clone()); + let handle = stats_handle.clone(); + let sid = server_id.clone(); + let restarting = mem_restarting.clone(); + tauri::async_runtime::spawn(async move { + let _ = crate::commands::server::inner_restart_server( + handle.clone(), params, true, + ).await; + restarting.lock().unwrap().remove(&sid); + }); + let _ = stats_handle.emit( + "server://memory-restart", + serde_json::json!({ "serverId": server_id }), + ); + } + } + } + } } } }); @@ -421,6 +469,10 @@ pub fn run() { .plugin(tauri_plugin_dialog::init()) .plugin(tauri_plugin_shell::init()) .plugin(tauri_plugin_notification::init()) + .plugin(tauri_plugin_autostart::init( + tauri_plugin_autostart::MacosLauncher::LaunchAgent, + None, + )) .invoke_handler(tauri::generate_handler![ // Server lifecycle commands::server::start_server, @@ -494,6 +546,8 @@ pub fn run() { commands::backup::create_player_backup, commands::backup::backup_all_players, commands::backup::create_ini_backup, + commands::backup::create_save_link, + commands::backup::wipe_server_saves, commands::backup::create_full_backup, commands::backup::list_ini_backups, commands::backup::restore_server_backup, diff --git a/src-tauri/src/state/mod.rs b/src-tauri/src/state/mod.rs index 73f8fcc..97ee592 100644 --- a/src-tauri/src/state/mod.rs +++ b/src-tauri/src/state/mod.rs @@ -28,6 +28,9 @@ pub struct RunningServer { /// The crash monitor uses this to distinguish a startup failure (false → "start-failed") /// from a genuine runtime crash (true → "crashed"). pub confirmed_running: bool, + /// Full start parameters — stored so the memory-limit restart can re-launch + /// without needing to re-derive params from the DB. + pub start_params: crate::commands::server::StartServerParams, } /// Global application state shared across all Tauri commands via `tauri::State`. diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index a8e6689..ca194c5 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "LokiASAM", - "version": "0.14.0", + "version": "0.14.1", "identifier": "xyz.lokisoft.lokiasam", "build": { "frontendDist": "../out", diff --git a/src/app/page.tsx b/src/app/page.tsx index 4d3bb49..fb86b08 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -4,6 +4,7 @@ import { useEffect, useState, useCallback, useRef } from "react"; import { Plus, Server, Activity, RefreshCw, Upload, ArrowUp, Loader2, CheckCircle2, AlertTriangle, LayoutDashboard, + Play, Square, RotateCcw, } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Skeleton } from "@/components/ui/skeleton"; @@ -427,6 +428,57 @@ export default function DashboardPage() { })); const anyUpdatesStarting = serversWithUpdates.some((s) => s.status === "starting"); + const [globalActionPending, setGlobalActionPending] = useState(false); + + // ── Global start/stop/restart handlers ─────────────────────────────────── + + const handleStartAll = useCallback(async () => { + const stopped = servers.filter((s) => + s.status === "stopped" || s.status === "start-failed" || s.status === "crashed" + ); + if (stopped.length === 0) return; + setGlobalActionPending(true); + try { + for (const s of stopped) { + await updateServerStatus(s.id, "starting", null); + const params = await buildStartParams(s); + tauriCmd.startServer(params) + .then((pid) => updateServerStatus(s.id, "starting", pid)) + .catch(async (e) => { + await updateServerStatus(s.id, "start-failed", null); + toast.error(`Failed to start ${s.name}: ${e}`); + }); + } + queryClient.invalidateQueries({ queryKey: ["servers"] }); + toast.info(`Starting ${stopped.length} server${stopped.length === 1 ? "" : "s"}…`); + } finally { setGlobalActionPending(false); } + }, [servers, queryClient]); + + const handleStopAll = useCallback(async () => { + const running = servers.filter((s) => s.status === "running" || s.status === "starting"); + if (running.length === 0) return; + setGlobalActionPending(true); + try { + await Promise.all(running.map((s) => tauriCmd.stopServer(s.id, false).catch(() => null))); + queryClient.invalidateQueries({ queryKey: ["servers"] }); + toast.info(`Stopping ${running.length} server${running.length === 1 ? "" : "s"}…`); + } finally { setGlobalActionPending(false); } + }, [servers, queryClient]); + + const handleRestartAll = useCallback(async () => { + const running = servers.filter((s) => s.status === "running"); + if (running.length === 0) return; + setGlobalActionPending(true); + try { + for (const s of running) { + const params = await buildStartParams(s); + tauriCmd.restartServer(params, true).catch((e) => + toast.error(`Failed to restart ${s.name}: ${e}`) + ); + } + toast.info(`Restarting ${running.length} server${running.length === 1 ? "" : "s"}…`); + } finally { setGlobalActionPending(false); } + }, [servers]); // ── Update All handler ──────────────────────────────────────────────────── @@ -511,14 +563,40 @@ export default function DashboardPage() {
{servers.length > 0 && ( - setShowUpdateAllDialog(true)} - onUpdatesFound={(updates) => { - setPendingUpdates(updates); - setShowUpdatesFoundDialog(true); - }} - /> + <> + setShowUpdateAllDialog(true)} + onUpdatesFound={(updates) => { + setPendingUpdates(updates); + setShowUpdatesFoundDialog(true); + }} + /> + + + + )}
+ +
+
+

Launch at Login

+

+ Start LokiASAM automatically when your OS boots. Pairs well with “Minimize to tray on close” so the app runs quietly in the background. +

+
+ +
); } diff --git a/src/components/server/tabs/AutomationTab.tsx b/src/components/server/tabs/AutomationTab.tsx index 1274e7a..dc1735f 100644 --- a/src/components/server/tabs/AutomationTab.tsx +++ b/src/components/server/tabs/AutomationTab.tsx @@ -5,7 +5,7 @@ import { CalendarClock, HardDrive, RefreshCw, RotateCcw, Megaphone, Info, CheckCircle2, Loader2, Plus, Trash2, ToggleLeft, ToggleRight, AlertTriangle, ChevronDown, ChevronUp, - ArrowUp, Clock, Zap, + ArrowUp, Clock, Zap, Skull, MessageSquare, } from "lucide-react"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; @@ -15,7 +15,7 @@ import { getNextCronDate } from "@/components/shared/CronBuilder"; import { getServerSchedules, createSchedule, deleteScheduleRecord, updateScheduleEnabled, updateScheduleConfig, - setServerUpdateAutomation, + setServerUpdateAutomation, updateBackupBroadcastMessage, type ScheduleRow, type CreateScheduleInput, type UpdateAutomation, } from "@/lib/db"; @@ -27,7 +27,7 @@ import type { ServerRow } from "@/lib/db"; // Types // --------------------------------------------------------------------------- -type ScheduleType = "restart" | "broadcast"; +type ScheduleType = "restart" | "broadcast" | "wipe_dinos"; type AddMode = "minutes" | "hours" | "daily"; interface RestartConfig { @@ -1117,13 +1117,61 @@ function UpdateAutomationCard({ server }: { server: ServerRow }) { ); } +// --------------------------------------------------------------------------- +// BackupBroadcastCard +// --------------------------------------------------------------------------- + +function BackupBroadcastCard({ server }: { server: ServerRow }) { + const [message, setMessage] = useState(server.backup_broadcast_message ?? "Server backup in progress — lag may occur."); + const [saving, setSaving] = useState(false); + const dirty = message !== (server.backup_broadcast_message ?? "Server backup in progress — lag may occur."); + + const handleSave = async () => { + setSaving(true); + try { + await updateBackupBroadcastMessage(server.id, message); + toast.success("Backup message saved"); + } catch (e) { + toast.error(`Failed to save: ${e}`); + } finally { + setSaving(false); + } + }; + + return ( +
+
+ +

Pre-Backup In-Game Message

+
+

+ Broadcast this message via RCON before each scheduled backup or world save begins. +

+
+ setMessage(e.target.value)} + placeholder="Backup message…" + className="flex-1 text-xs" + style={{ background: "rgba(10,10,30,0.8)", borderColor: "rgba(var(--neon-purple-rgb),0.3)", color: "var(--text-primary)" }} + /> + +
+
+ ); +} + // --------------------------------------------------------------------------- // CARD_DEFS // --------------------------------------------------------------------------- const CARD_DEFS: { type: ScheduleType; icon: React.ElementType; title: string; description: string }[] = [ - { type: "restart", icon: RotateCcw, title: "Auto-Restart", description: "Gracefully restart the server on a schedule with optional in-game warnings." }, - { type: "broadcast", icon: Megaphone, title: "Scheduled Chat Message", description: "Send a recurring global chat message to all online players via RCON." }, + { type: "restart", icon: RotateCcw, title: "Auto-Restart", description: "Gracefully restart the server on a schedule with optional in-game warnings." }, + { type: "wipe_dinos", icon: Skull, title: "Wild Dino Wipe", description: "Send a chat warning then destroy all wild dinos via RCON on a schedule." }, + { type: "broadcast", icon: Megaphone, title: "Scheduled Chat Message", description: "Send a recurring global chat message to all online players via RCON." }, ]; // --------------------------------------------------------------------------- @@ -1183,6 +1231,7 @@ export function AutomationTab({ server }: Props) {
+ {CARD_DEFS.map((def) => ( (server.active_event ?? null); + const [saving, setSaving] = useState(false); + const [saved, setSaved] = useState(false); + + const currentEvent = ARK_EVENTS.find((e) => e.id === activeEventId) ?? null; + + const handleSelect = async (eventId: string | null) => { + setActiveEventId(eventId); + setSaving(true); + try { + await setServerActiveEvent(server.id, eventId); + setSaved(true); + setTimeout(() => setSaved(false), 2000); + } catch (e) { + toast.error(`Failed to save event: ${e}`); + } finally { + setSaving(false); + } + }; + + return ( +
+
+
+ 🎃 +

Active Event

+
+ {saved && Saved} + {saving && !saved && Saving…} +
+ +

+ Activating an event auto-loads its mod on server start and passes -ActiveEvent= to the launcher. + The mod will be locked in the mod list while the event is active. +

+ +
+ + {ARK_EVENTS.map((evt) => ( + + ))} +
+ + {currentEvent && ( +
+ {currentEvent.description} + Mod: {currentEvent.modId} +
+ )} +
+ ); +} + function ShutdownSettingsCard({ server }: { server: ServerRow }) { const [warnPlayers, setWarnPlayers] = useState(server.shutdown_warn_players !== 0); const [warnMinutes, setWarnMinutes] = useState(server.shutdown_warn_minutes ?? 5); @@ -1188,20 +1268,193 @@ function UpdateSettingsCard({ server }: { server: ServerRow }) { ); } +// --------------------------------------------------------------------------- +// AdvancedConfigTab +// --------------------------------------------------------------------------- + +const THREAD_OPTIONS = [ + { value: "", label: "Default (let ARK decide)" }, + { value: "OneThread", label: "OneThread — single CPU thread" }, + { value: "ForceUsePerfThreads", label: "ForceUsePerfThreads — maximize perf threads" }, + { value: "NoPerfThreads", label: "NoPerfThreads — disable perf threads" }, +]; + +function AdvancedConfigTab({ + server, + config, + onChange, +}: { + server: ServerRow; + config: ServerConfigJson; + onChange: (patch: Partial) => void; +}) { + const [memLimit, setMemLimit] = useState(server.memory_limit_gb != null ? String(server.memory_limit_gb) : ""); + const [savingMem, setSavingMem] = useState(false); + + const launchArgs = config.launchArgs as Record; + + const setArg = (key: string, value: string) => { + onChange({ launchArgs: { ...launchArgs, [key]: value } }); + }; + + const currentThread = THREAD_OPTIONS.find((o) => o.value && launchArgs[o.value] === "true")?.value ?? ""; + + const handleThreadChange = (val: string) => { + const next = { ...launchArgs }; + for (const o of THREAD_OPTIONS) { if (o.value) delete next[o.value]; } + if (val) next[val] = "true"; + onChange({ launchArgs: next }); + }; + + const handleSaveMemLimit = async () => { + setSavingMem(true); + try { + const n = parseFloat(memLimit); + await updateServerMemoryLimit(server.id, isNaN(n) || n <= 0 ? null : n); + toast.success("Memory limit saved"); + } catch (e) { toast.error(`Failed: ${e}`); } + finally { setSavingMem(false); } + }; + + return ( +
+ {/* Thread options */} +
+

Thread Options

+

+ Undocumented by Wildcard. Leave at Default unless you have a specific reason to change. +

+ +
+ + {/* Platform */} +
+

Platform

+
+
+

All Platforms (Crossplay)

+

Pass -AllPlatforms — allow PC, Xbox, PlayStation, and other platforms to join.

+
+ +
+
+ + {/* Custom CLI */} +
+

Custom Launch Arguments

+

+ Appended verbatim to the launch command. Useful for undocumented or mod-specific flags. +

+ setArg("_customCli", e.target.value)} + placeholder="-SomeFlag -AnotherFlag=value" + className="font-mono text-xs" + style={{ background: "rgba(10,10,30,0.8)", borderColor: "rgba(255,165,0,0.3)", color: "var(--text-primary)" }} + /> +
+ + {/* Memory limit */} +
+

Memory Limit Restart

+

+ Automatically restart the server if RAM usage exceeds this threshold. Leave blank to disable. +

+
+ setMemLimit(e.target.value)} + placeholder="e.g. 12" + type="number" + min={1} + step={0.5} + className="w-32 text-xs" + style={{ background: "rgba(10,10,30,0.8)", borderColor: "rgba(255,165,0,0.3)", color: "var(--text-primary)" }} + /> + GB + +
+
+ + {/* Network settings */} +
+

Advanced Network

+

+ For multi-NIC setups, VPN-based DDoS protection, or port forwarding edge cases. Leave blank if not needed. +

+ {[ + { key: "ServerIP", label: "Server IP (-ServerIP=)", placeholder: "e.g. 1.2.3.4 — public IP for DDoS protection VPN" }, + { key: "MultiHome", label: "MultiHome IP (-MULTIHOME=)", placeholder: "e.g. 192.168.1.100 — internal NIC IP" }, + { key: "UDPSocketPort", label: "UDP Socket Port (-UDPSocketPort=)", placeholder: "Experimental — leave blank (undocumented)" }, + ].map(({ key, label, placeholder }) => ( +
+ + setArg(key, e.target.value)} + placeholder={placeholder} + className="text-xs font-mono" + style={{ background: "rgba(10,10,30,0.8)", borderColor: "rgba(255,165,0,0.3)", color: "var(--text-primary)" }} + /> +
+ ))} +
+
+ ); +} + export function ConfigTab({ server }: Props) { const [config, setConfig] = useState(null); const [rawGus, setRawGus] = useState(""); const [rawGame, setRawGame] = useState(""); const [rawMode, setRawMode] = useState(false); + const [advancedMode, setAdvancedMode] = useState(false); const [loading, setLoading] = useState(true); const [saving, setSaving] = useState(false); const [readingIni, setReadingIni] = useState(false); const [savedFlash, setSavedFlash] = useState(false); const [isDirty, setIsDirty] = useState(false); const [error, setError] = useState(null); - const [showFullModal, setShowFullModal] = useState(false); const [showPasteModal, setShowPasteModal] = useState(false); const [showQuickSetup, setShowQuickSetup] = useState(false); + const [showCopyFromServer, setShowCopyFromServer] = useState(false); + const [copyFromServerId, setCopyFromServerId] = useState(""); + const [otherServers, setOtherServers] = useState([]); + + useEffect(() => { + getServers().then((all) => setOtherServers(all.filter((s) => s.id !== server.id))).catch(() => {}); + }, [server.id]); + + const handleCopyFromServer = async () => { + if (!copyFromServerId) return; + try { + await copyServerConfig(copyFromServerId, server.id); + await loadFromDb(); + setShowCopyFromServer(false); + setCopyFromServerId(""); + toast.success("Config copied"); + } catch (e) { + toast.error(`Failed to copy config: ${e}`); + } + }; // Load from DB on mount — reflects what we last saved, not what the server may have overwritten const loadFromDb = useCallback(async () => { @@ -1360,10 +1613,8 @@ export function ConfigTab({ server }: Props) { // Snapshot INI files into the backup system (best-effort, non-blocking) const backupDir = await getAppSetting("backup_dir").catch(() => null); - const plat = typeof navigator !== "undefined" && !navigator.userAgent.includes("Windows") - ? "LinuxServer" : "WindowsServer"; if (backupDir) { - tauriCmd.createIniBackup(server.id, server.install_path, backupDir, plat).catch(() => {}); + tauriCmd.createIniBackup(server.id, server.install_path, backupDir).catch(() => {}); } } catch (e) { setError(String(e)); @@ -1385,6 +1636,7 @@ export function ConfigTab({ server }: Props) { const game = rawTextToSections(rawGame); if (config) setConfig({ ...config, gameUserSettings: gus, gameIni: game }); setRawMode(false); + setAdvancedMode(false); }; if (loading) { @@ -1396,59 +1648,64 @@ export function ConfigTab({ server }: Props) { ); } - // Quick-edit: only show a curated subset of groups - const quickGroups = INI_FIELD_GROUPS.filter((g) => QUICK_EDIT_GROUP_IDS.includes(g.id)); - return (
- {/* Toolbar */} -
-
- - - {!rawMode && ( - <> - - - - )} + + {/* ── Sticky toolbar — always visible at top ─────────────────────────── */} +
+ {/* Tab selectors */} +
+ + + +
+ + {/* Right: dirty badge + import + save */}
{isDirty && ( Unsaved changes )} - {/* Import dropdown */} -
)} - {/* Structured editor — quick groups */} + {/* ── Structured view — ALL INI groups ──────────────────────────────── */} {!rawMode && config && (
- {quickGroups.map((g, idx) => ( + {INI_FIELD_GROUPS.map((g, idx) => ( -

- Click Full INI Editor in the toolbar to access all server settings. -

)} - {/* Raw INI editor */} + {/* ── Raw INI editor ────────────────────────────────────────────────── */} {rawMode && (
@@ -1529,7 +1789,7 @@ export function ConfigTab({ server }: Props) {