diff --git a/web/pages/admin.edit.mod.php b/web/pages/admin.edit.mod.php index 75e548951..7d7072097 100644 --- a/web/pages/admin.edit.mod.php +++ b/web/pages/admin.edit.mod.php @@ -12,8 +12,6 @@ global $userbank, $theme; -new \Sbpp\View\AdminTabs([], $userbank, $theme); - require_once __DIR__ . '/_admin_edit_helpers.php'; $modId = isset($_GET['id']) ? (int) $_GET['id'] : 0; diff --git a/web/tests/e2e/specs/flows/mod-delete-confirm.spec.ts b/web/tests/e2e/specs/flows/mod-delete-confirm.spec.ts index cacc4b000..2610b8835 100644 --- a/web/tests/e2e/specs/flows/mod-delete-confirm.spec.ts +++ b/web/tests/e2e/specs/flows/mod-delete-confirm.spec.ts @@ -210,7 +210,7 @@ test.describe('flow: admin mod delete confirm modal (#1397 — RemoveMod zombie) // Count badge decrements by exactly one (defensive — the // chrome's `decrementCount` reads the span's text and writes // back `n - 1`). - await expect(countBadge).toHaveText(String(startingCount - 1)); + await expect(countBadge).toHaveText(`(${startingCount - 1})`); // Success toast surfaces. Anchor on `data-kind="success"` plus // a hasText filter on the title our handler emits ("Mod diff --git a/web/tests/integration/ModsDeleteDialogTest.php b/web/tests/integration/ModsDeleteDialogTest.php index 095ac0493..2ccbd38f6 100644 --- a/web/tests/integration/ModsDeleteDialogTest.php +++ b/web/tests/integration/ModsDeleteDialogTest.php @@ -218,18 +218,17 @@ public function testPageTailScriptUsesActionsConstant(): void * The mod count badge must carry `data-testid="mod-count"` so the * page-tail script can decrement it after a delete and the E2E * spec can read it as the pre / post-delete oracle. Without the - * testid the badge is unreachable in a theme-agnostic way (the - * surrounding `
… configured
` shape is too brittle to - * regex against). + * testid the badge is unreachable in a theme-agnostic way. The + * rendered text is `(N)` (same shape as the Admins list badge). */ public function testCountBadgeCarriesTestid(): void { $html = $this->renderModsPage(); $this->assertMatchesRegularExpression( - '/]*data-testid="mod-count"[^>]*>\s*\d+\s*<\/span>/', + '/]*data-testid="mod-count"[^>]*>\s*\(?\d+\)?\s*<\/span>/', $html, - 'The mod count number must be wrapped in .' + 'The mod count number must be wrapped in (optionally parenthesised, matching the Admins list badge).' ); } diff --git a/web/themes/default/css/theme.css b/web/themes/default/css/theme.css index e4ccefca1..5fd064729 100644 --- a/web/themes/default/css/theme.css +++ b/web/themes/default/css/theme.css @@ -2130,6 +2130,11 @@ details.queue-row > summary > .row-actions { .admins-list-card:last-child { border-bottom: none; } .admins-list-card__body { padding: 0.75rem 1rem 0.25rem; } +.mods-list-cards { display: none; } +.mods-list-card { border-bottom: 1px solid var(--border); } +.mods-list-card:last-child { border-bottom: none; } +.mods-list-card__body { padding: 0.75rem 1rem 0.25rem; } + /* ---- Responsive ---- */ [data-mobile-menu] { display: none; } @media (max-width: 1024px) { @@ -2148,6 +2153,7 @@ details.queue-row > summary > .row-actions { dance as `.ban-cards` — hidden at desktop, block at mobile. */ .log-cards { display: block; } .admins-list-cards { display: block; } + .mods-list-cards { display: block; } /* #1181: filter chip rows wrap onto multiple lines on mobile instead of horizontal-scrolling, so every chip is reachable without a swipe. The .scroll-x desktop affordance is the @@ -2159,6 +2165,7 @@ details.queue-row > summary > .row-actions { .ban-cards { display: none; } .log-cards { display: none; } .admins-list-cards { display: none; } + .mods-list-cards { display: none; } } /* ---- Utility classes used by templates ---- */ diff --git a/web/themes/default/page_admin_edit_mod.tpl b/web/themes/default/page_admin_edit_mod.tpl index b8b70cd33..83f08a0ad 100644 --- a/web/themes/default/page_admin_edit_mod.tpl +++ b/web/themes/default/page_admin_edit_mod.tpl @@ -27,7 +27,18 @@ template variable — no MooTools-era `$('enabled').checked = …` re-paint script. *} -+ Update the configuration for this game mod. +
+