Add menu enable toggle, user status, and mobile/UI polish

- Admin menu page: mobile item cards now put Actions in the top-right
  corner next to Status, matching the desktop row layout instead of
  stacking at the bottom; same treatment applied to announcements and
  users for consistency across all three admin lists
- Center button label text everywhere via .btn { justify-content: center }
  instead of one-off overrides
- Add a Disable/Enable Menu toggle to the admin menu toolbar; the public
  menu page shows its existing "menu being updated" message while disabled
- Add an Enabled/Disabled status to user accounts, with its own toggle
  badge, guardrails against disabling your own account or the last
  enabled account, and an immediate session kick for anyone disabled
  mid-session
- Fix the announcement banner / hero tagline "·" separators to hide only
  when their neighboring text actually wraps onto a different line,
  instead of a fixed breakpoint or always-on dot

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
David DyerandClaude Sonnet 5 committed 2026-09-01 14:10:08 -04:00
1 parent eab20899de
commit cd4c6c1969
13 files changed
+405 -50

No files matched your search

+4 -3
View File
@@ -7,7 +7,8 @@ require __DIR__ . '/inc/menu.php';
require __DIR__ . '/inc/hours.php';
$activeAnnouncements = get_active_announcements();
$menuCategories = get_full_menu(true); // available items only
$menuEnabled = is_menu_enabled();
$menuCategories = $menuEnabled ? get_full_menu(true) : []; // available items only, or none while the menu is disabled
$hoursByDay = get_all_hours();
$siteUrl = rtrim(SITE_URL, '/');
?>
@@ -83,7 +84,7 @@ $siteUrl = rtrim(SITE_URL, '/');
<div class="announcement-banner banner-<?= htmlspecialchars($banner['type']) ?>" role="region" aria-label="Important Announcement">
<div class="container announcement-inner">
<span class="announcement-tag"><?= htmlspecialchars($banner['headline']) ?></span>
<span class="announcement-sep" aria-hidden="true">·</span>
<span class="announcement-sep wrap-sep" aria-hidden="true">·</span>
<span class="announcement-text"><?= htmlspecialchars($banner['message']) ?></span>
</div>
</div>
@@ -109,7 +110,7 @@ $siteUrl = rtrim(SITE_URL, '/');
<section class="menu-page-content" style="padding-top: 0;">
<div class="container" style="max-width: 62rem;">
<?php if (!empty($menuCategories)): ?>
<?php if ($menuEnabled && !empty($menuCategories)): ?>
<div class="menu-grid" style="margin-top: 0;">
<?php foreach ($menuCategories as $category): ?>
<?php if (!empty($category['items'])): ?>