From 1102f17a93111dca640d790cf9963a9ec9312096 Mon Sep 17 00:00:00 2001 From: salmonik Date: Wed, 29 Jul 2026 11:19:12 +0200 Subject: Enable/disable mods, batch toggle & delete MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add column to mods table (auto-migrated) - Toggle endpoint: rename .jar ↔ .jar.disabled on disk, flip DB flag - Batch toggle & delete with checkboxes + JS helper (fixes nested-form bug) - Raw Vec<(String,String)> form deserialization fixes 'duplicate field' error - Batch action bars at top and bottom of mod list - Uploads default to enabled=1, rescan skips .jar.disabled files --- src/db.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/db.rs') diff --git a/src/db.rs b/src/db.rs index 2024032..4d2de88 100644 --- a/src/db.rs +++ b/src/db.rs @@ -114,6 +114,9 @@ impl Database { let _ = conn.execute_batch( "ALTER TABLE instances ADD COLUMN whitelist_enabled INTEGER NOT NULL DEFAULT 1", ); + // Migration: add enabled column to mods for disable/enable toggling + let _ = + conn.execute_batch("ALTER TABLE mods ADD COLUMN enabled INTEGER NOT NULL DEFAULT 1"); Ok(()) } -- cgit v1.2.3