diff options
| author | salmonik <salmonik@tuta.io> | 2026-07-29 11:19:12 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-07-29 11:19:12 +0200 |
| commit | 1102f17a93111dca640d790cf9963a9ec9312096 (patch) | |
| tree | 4134d9629fc67bf955a069805b37d5ee6e499c1d /src/db.rs | |
| parent | Mod picker: allow selecting multiple .jar files for upload (diff) | |
| download | minecraft-ui-1102f17a93111dca640d790cf9963a9ec9312096.tar.gz minecraft-ui-1102f17a93111dca640d790cf9963a9ec9312096.zip | |
Enable/disable mods, batch toggle & delete
- 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
Diffstat (limited to 'src/db.rs')
| -rw-r--r-- | src/db.rs | 3 |
1 files changed, 3 insertions, 0 deletions
| @@ -114,6 +114,9 @@ impl Database { | |||
| 114 | let _ = conn.execute_batch( | 114 | let _ = conn.execute_batch( |
| 115 | "ALTER TABLE instances ADD COLUMN whitelist_enabled INTEGER NOT NULL DEFAULT 1", | 115 | "ALTER TABLE instances ADD COLUMN whitelist_enabled INTEGER NOT NULL DEFAULT 1", |
| 116 | ); | 116 | ); |
| 117 | // Migration: add enabled column to mods for disable/enable toggling | ||
| 118 | let _ = | ||
| 119 | conn.execute_batch("ALTER TABLE mods ADD COLUMN enabled INTEGER NOT NULL DEFAULT 1"); | ||
| 117 | Ok(()) | 120 | Ok(()) |
| 118 | } | 121 | } |
| 119 | 122 | ||
