Administration retirée : signalements et bugs par e-mail, base allégée
deploy / deploy (push) Successful in 46s

- Écran d'administration supprimé (page, onglets de modération, alertes, appels admin).
- « Signaler » (avis, commentaire, profil, liste) et « Signaler un bug » ouvrent un e-mail pré-rempli
  vers contact@bobinoo.org (motifs en rappel, références du contenu ; version et appareil pour un bug).
- Remontée automatique des erreurs supprimée. À la place : une ancienne version ouverte qui ne trouve plus
  un fichier après une mise à jour se recharge d'elle-même (« Importing a module script failed »).
- Base (20261130120000_remove_admin, appliquée) : 20 fonctions et 5 tables d'administration supprimées
  (admins, reports, bug_reports, client_errors, moderation_log) ; get_profile, get_review_comments,
  delete_review_comment, delete_shared_list et la garde de suspension réécrites sans « admin ».
  Suspension d'un compte : à la main dans Supabase.
- 116 textes inutilisés retirés dans chacune des 18 langues.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YVo1qxKoBQCaMd7Ue8PGbe
This commit is contained in:
Claude committed 2026-11-30 19:50:11 +00:00
1 parent 897fb2e008
commit 0daee3eddf
38 files changed
+299 -4008

No files matched your search

+3 -9
View File
@@ -23,8 +23,6 @@ const CalendarView = lazyPreload(() => import('./components/CalendarView'))
const StatsPage = lazyPreload(() => import('./pages/StatsPage'))
const SettingsPage = lazyPreload(() => import('./pages/SettingsPage'))
const NotFoundPage = lazyPreload(() => import('./pages/NotFoundPage'))
// Administration : réservée aux admins, jamais préchargée
const AdminPage = lazyPreload(() => import('./pages/AdminPage'))
function preloadScreens() {
// Les plus utilisés d'abord
for (const screen of [TitleSheet, AddTitle, StatsPage, SettingsPage, PersonSheet, CalendarView, Roulette, EditDetails, NotFoundPage]) void screen.preload().catch(() => {})
@@ -33,8 +31,7 @@ function preloadScreens() {
}
const TABS: Tab[] = ['home', 'catalog', 'stats', 'settings']
// L'administration a sa propre route (#/admin), hors de la navigation principale
type Route = Tab | 'admin' | 'notfound'
type Route = Tab | 'notfound'
function routeFromHash(): Route {
const hash = window.location.hash
@@ -42,7 +39,6 @@ function routeFromHash(): Route {
if (!hash.startsWith('#/')) return 'home'
const h = hash.slice(2)
if (h === '' || h.startsWith('u/')) return 'home'
if (h === 'admin') return 'admin'
return (TABS as string[]).includes(h) ? (h as Tab) : 'notfound'
}
@@ -106,8 +102,7 @@ export default function App() {
window.location.hash = `/${t}`
window.scrollTo({ top: 0 })
}, [])
// Dans la barre de navigation, l'administration reste rattachée à « Réglages »
const navTab: Tab = navRoute === 'admin' ? 'settings' : navRoute === 'notfound' ? 'home' : navRoute
const navTab: Tab = navRoute === 'notfound' ? 'home' : navRoute
/** `focus` : saison (ou série) qu'on vient de finir avec +1 → la fiche s'ouvre sur la note */
// Stable : les cartes mémorisées (MediaCard) ne se redessinent pas à chaque rendu de l'app
@@ -138,8 +133,7 @@ export default function App() {
{route === 'catalog' && <CatalogPage onOpen={openItem} onAdd={openNew} />}
<Suspense fallback={null}>
{route === 'stats' && <StatsPage />}
{route === 'settings' && <SettingsPage onOpenAdmin={() => go('admin')} />}
{route === 'admin' && <AdminPage onBack={() => go('settings')} />}
{route === 'settings' && <SettingsPage />}
{route === 'notfound' && <NotFoundPage onHome={() => go('home')} />}
</Suspense>
</main>