Bladeren bron

fix: reserve space for copyright footer in scrollable card lists and modals

neyrogovnarik 1 maand geleden
bovenliggende
commit
bad468de4b

+ 27 - 24
frontend/src/app/admin/page.tsx

@@ -103,31 +103,32 @@ export default function AdminModerationPage() {
   }
 
   return (
-    <div>
-      <h1 className="mb-6 text-2xl font-bold text-white">Модерация</h1>
-
-      {actionMsg && (
-        <p className="mb-4 rounded-lg bg-green-500/10 px-4 py-2 text-sm text-green-400">{actionMsg}</p>
-      )}
-
-      <div className="mb-6 flex flex-wrap gap-2">
-        {FILTERS.map((f) => (
-          <button key={f.key} onClick={() => { setFilter(f.key); setActionMsg('') }}
-            className={`rounded-lg px-4 py-2 text-sm transition ${
-              filter === f.key ? 'bg-green-600 text-white' : 'bg-white/10 text-white/60 hover:bg-white/20'
-            }`}
-          >
-            {f.label}
-          </button>
-        ))}
-      </div>
+    <div className="min-h-screen pt-20">
+      <div className="mx-auto max-w-3xl px-4">
+        <h1 className="mb-6 text-2xl font-bold text-white">Модерация</h1>
+
+        {actionMsg && (
+          <p className="mb-4 rounded-lg bg-green-500/10 px-4 py-2 text-sm text-green-400">{actionMsg}</p>
+        )}
+
+        <div className="mb-6 flex flex-wrap gap-2">
+          {FILTERS.map((f) => (
+            <button key={f.key} onClick={() => { setFilter(f.key); setActionMsg('') }}
+              className={`rounded-lg px-4 py-2 text-sm transition ${
+                filter === f.key ? 'bg-green-600 text-white' : 'bg-white/10 text-white/60 hover:bg-white/20'
+              }`}
+            >
+              {f.label}
+            </button>
+          ))}
+        </div>
 
-      {loading ? (
-        <p className="text-white/60">Загрузка...</p>
-      ) : places.length === 0 ? (
-        <p className="text-white/40">Нет мест</p>
-      ) : (
-        <div className="space-y-4">
+        {loading ? (
+          <p className="text-white/60">Загрузка...</p>
+        ) : places.length === 0 ? (
+          <p className="text-white/40">Нет мест</p>
+        ) : (
+          <div className="max-h-[calc(100vh-15rem)] space-y-4 overflow-y-auto pb-8 pr-1">
           {places.map((place) => (
             <div key={place.id} className="rounded-lg border border-white/10 bg-white/5 p-4">
               <div className="mb-2 flex items-center gap-3">
@@ -192,6 +193,8 @@ export default function AdminModerationPage() {
         </div>
       )}
 
+      </div>
+
       {reworkPlace && (
         <ReworkModal
           place={reworkPlace}

+ 3 - 3
frontend/src/app/admin/tags/page.tsx

@@ -65,7 +65,7 @@ export default function AdminTagsPage() {
   if (loading) return <p className="text-white/60">Загрузка...</p>
 
   return (
-    <div className="grid grid-cols-2 gap-8">
+    <div className="grid grid-cols-2 gap-8 pt-20">
       {error && (
         <div className="col-span-2 rounded-lg bg-red-500/10 px-4 py-2 text-sm text-red-400">
           {error}
@@ -86,7 +86,7 @@ export default function AdminTagsPage() {
             +
           </button>
         </div>
-        <div className="space-y-1">
+        <div className="max-h-[calc(100vh-13rem)] space-y-1 overflow-y-auto pb-8 pr-1">
           {tags.map((tag) => (
             <div key={tag.id} className="flex items-center justify-between rounded-lg bg-white/5 px-3 py-2">
               <span className="text-sm text-white">{tag.name}</span>
@@ -111,7 +111,7 @@ export default function AdminTagsPage() {
             +
           </button>
         </div>
-        <div className="space-y-1">
+        <div className="max-h-[calc(100vh-13rem)] space-y-1 overflow-y-auto pb-8 pr-1">
           {features.map((feat) => (
             <div key={feat.id} className="flex items-center justify-between rounded-lg bg-white/5 px-3 py-2">
               <span className="text-sm text-white">{feat.name}</span>

+ 6 - 3
frontend/src/app/admin/users/page.tsx

@@ -116,8 +116,9 @@ export default function AdminUsersPage() {
   if (loading) return <p className="text-white/60">Загрузка...</p>
 
   return (
-    <div>
-      <div className="mb-6 flex items-center justify-between">
+    <div className="min-h-screen pt-20">
+      <div className="mx-auto max-w-3xl px-4">
+        <div className="mb-6 flex items-center justify-between">
         <h1 className="text-2xl font-bold text-white">Управление пользователями</h1>
         <button onClick={() => setShowCreate(true)}
           className="rounded-lg bg-green-600 px-4 py-2 text-sm text-white hover:bg-green-500 transition"
@@ -139,7 +140,7 @@ export default function AdminUsersPage() {
 
       {(() => {
         return (
-          <div className="space-y-2">
+          <div className="max-h-[calc(100vh-15rem)] space-y-2 overflow-y-auto pb-8 pr-1">
             {users.map((user) => {
               const isSelf = user.id === currentUser?.id
 
@@ -188,6 +189,8 @@ export default function AdminUsersPage() {
         )
       })()}
 
+      </div>
+
       {showCreate && (
         <CreateUserModal onClose={() => setShowCreate(false)} onCreated={() => { setShowCreate(false); setMsg('Пользователь создан'); fetchUsers() }} />
       )}

+ 2 - 2
frontend/src/app/places/my/page.tsx

@@ -25,7 +25,7 @@ function EditModal({ placeId, onClose, onSaved }: { placeId: string; onClose: ()
   }, [placeId, onClose])
 
   return (
-    <div className="fixed inset-0 z-50 flex items-start justify-center overflow-y-auto bg-black/60 pt-10 pb-10 backdrop-blur-sm" onClick={onClose}>
+    <div className="fixed inset-0 z-50 flex items-start justify-center overflow-y-auto bg-black/60 pt-10 pb-16 backdrop-blur-sm" onClick={onClose}>
       <div className="w-full max-w-2xl rounded-xl bg-[#1e293b] shadow-xl" onClick={(e) => e.stopPropagation()}>
         {loading ? (
           <div className="flex items-center justify-center p-8">
@@ -183,7 +183,7 @@ export default function MyPlacesPage() {
           }
 
           return (
-            <div className="max-h-[calc(100vh-14rem)] space-y-4 overflow-y-auto pb-8 pr-1">
+            <div className="max-h-[calc(100vh-17rem)] space-y-4 overflow-y-auto pb-8 pr-1">
               {filtered.map((place) => (
                 <PlaceCard
                   key={place.id}