浏览代码

fix(ui): missing padding of the modal container on mobile

charlie 2 年之前
父节点
当前提交
6bfa722cd9
共有 2 个文件被更改,包括 8 次插入2 次删除
  1. 2 1
      src/main/frontend/handler/events.cljs
  2. 6 1
      src/main/frontend/ui.css

+ 2 - 1
src/main/frontend/handler/events.cljs

@@ -390,7 +390,8 @@
 (defmethod handle :go/search [_]
   (state/set-modal! component-search/search-modal
                     {:fullscreen? false
-                     :close-btn?  false}))
+                     :close-btn?  false
+                     :label "ls-modal-search"}))
 
 (defmethod handle :go/plugins [_]
   (plugin/open-plugins-modal!))

+ 6 - 1
src/main/frontend/ui.css

@@ -227,12 +227,17 @@ html.is-native-iphone-without-notch
 html.is-mobile {
   .ui__modal {
     @apply bottom-0 inset-x-0 top-20;
+
+    &[label="ls-modal-search"] {
+      .panel-content {
+        padding-bottom: 0;
+      }
+    }
   }
 
   .ui__modal-panel .panel-content {
     width: calc(98vw - 2rem);
     padding-top: 24px;
-    padding-bottom: 0;
   }
 }