diff options
| author | salmonik <salmonik@tuta.io> | 2026-07-29 01:03:24 +0200 |
|---|---|---|
| committer | salmonik <salmonik@tuta.io> | 2026-07-29 01:03:24 +0200 |
| commit | 74d2ada067bd2fd9436710ab7ac260e0eddf1314 (patch) | |
| tree | 1f791bb895a611d8e729a735ba098a647808a157 /src/routes/mod.rs | |
| parent | create example config on startup (diff) | |
| download | minecraft-ui-74d2ada067bd2fd9436710ab7ac260e0eddf1314.tar.gz minecraft-ui-74d2ada067bd2fd9436710ab7ac260e0eddf1314.zip | |
Add per-instance mod management with client-side detection
- New mod validation engine (src/mods.rs) with constant-pool class-file
scanning: detects server-side content (block, tileentity, command,
worldgen) vs client-only API (gui, renderer, forge/client)
- 7 client-only mods correctly detected (AppleSkin, CraftingTweaks,
Durability101, EnchantmentDescriptions, InventoryHUD, MouseTweaks,
TrashSlot); 51 server-capable; 1 unknown
- Routes + templating for mod upload (jar/zip), listing, delete, rescan
- Multipart upload with 500MB limit (bypasses axum's default 2MB)
- Per-instance mod summary card on edit page
- Whitelist toggle checkbox on edit page (persisted, drives ENABLE_WHITELIST)
- Dynamic Java image tag (java8/java17/java21) based on MC version
- Class scan is informational-only; rejection based on metadata side=CLIENT
- has_modpack flag cleanup on mod delete
- Remove hx-boost from <body> (was corrupting multipart uploads)
Diffstat (limited to 'src/routes/mod.rs')
| -rw-r--r-- | src/routes/mod.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/routes/mod.rs b/src/routes/mod.rs index 1cb0e54..a4d200c 100644 --- a/src/routes/mod.rs +++ b/src/routes/mod.rs | |||
| @@ -2,6 +2,7 @@ pub mod accounts; | |||
| 2 | pub mod backups; | 2 | pub mod backups; |
| 3 | pub mod dashboard; | 3 | pub mod dashboard; |
| 4 | pub mod instances; | 4 | pub mod instances; |
| 5 | pub mod mods; | ||
| 5 | pub mod players; | 6 | pub mod players; |
| 6 | 7 | ||
| 7 | use askama::Template; | 8 | use askama::Template; |
| @@ -35,6 +36,7 @@ pub fn build_router(state: AppState) -> Router { | |||
| 35 | .merge(players::router()) | 36 | .merge(players::router()) |
| 36 | .merge(accounts::router()) | 37 | .merge(accounts::router()) |
| 37 | .merge(backups::router()) | 38 | .merge(backups::router()) |
| 39 | .merge(mods::router()) | ||
| 38 | .layer(auth_required); | 40 | .layer(auth_required); |
| 39 | 41 | ||
| 40 | Router::new() | 42 | Router::new() |
