Browse Source

fix: порядок и стиль кнопок в тулбаре, скругление модалки

neyrogovnarik 1 month ago
parent
commit
376237b47d
2 changed files with 18 additions and 16 deletions
  1. 10 8
      frontend/src/components/AddLocationModal.tsx
  2. 8 8
      frontend/src/components/Header.tsx

+ 10 - 8
frontend/src/components/AddLocationModal.tsx

@@ -5,14 +5,16 @@ import PlaceForm from './PlaceForm'
 export default function AddLocationModal({ onClose }: { onClose: () => void }) {
   return (
     <div className="fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm">
-      <div className="relative max-h-[90vh] w-full max-w-2xl overflow-y-auto rounded-2xl bg-[#1e293b]">
-        <button
-          onClick={onClose}
-          className="absolute right-4 top-4 z-10 text-white/60 hover:text-white"
-        >
-          ✕
-        </button>
-        <PlaceForm type="place" onSuccess={onClose} />
+      <div className="w-full max-w-2xl overflow-hidden rounded-2xl bg-[#1e293b]">
+        <div className="relative max-h-[90vh] overflow-y-auto">
+          <button
+            onClick={onClose}
+            className="absolute right-4 top-4 z-10 text-white/60 hover:text-white"
+          >
+            ✕
+          </button>
+          <PlaceForm type="place" onSuccess={onClose} />
+        </div>
       </div>
     </div>
   )

+ 8 - 8
frontend/src/components/Header.tsx

@@ -28,6 +28,13 @@ export default function Header() {
       <div className="absolute right-4 top-4 z-30 inline-flex items-center gap-3 rounded-lg bg-white/10 backdrop-blur-md px-4 py-2">
         {isLoading ? null : user ? (
           <>
+            <button
+              onClick={() => setShowAddLocation(true)}
+              className="rounded-lg bg-white/10 backdrop-blur-md px-3 py-1 text-sm font-bold text-white hover:bg-white/20 transition"
+              title="Добавить локацию"
+            >
+              +
+            </button>
             <Link
               href="/places/my"
               className="text-sm text-white hover:text-green-400 transition"
@@ -37,17 +44,10 @@ export default function Header() {
             <span className="text-sm text-white/60">{user.name || user.email}</span>
             <button
               onClick={logout}
-              className="rounded-md px-3 py-1 text-sm text-white/80 hover:bg-[#ff5656] hover:text-white transition-colors"
+              className="rounded-lg bg-white/10 backdrop-blur-md px-3 py-1 text-sm text-white/80 hover:bg-[#ff5656] hover:text-white transition-colors"
             >
               Выйти
             </button>
-            <button
-              onClick={() => setShowAddLocation(true)}
-              className="flex h-7 w-7 items-center justify-center rounded-md bg-green-600 text-lg font-bold text-white hover:bg-green-500 transition"
-              title="Добавить локацию"
-            >
-              +
-            </button>
           </>
         ) : (
           <>