From d242008d07edd0b7b57f5a42b1fb94390ff75fca Mon Sep 17 00:00:00 2001 From: charlie Date: Thu, 14 May 2026 15:12:53 +0800 Subject: [PATCH] fix(ui): increase max height for top and bottom popups --- src/main/mobile/components/app.css | 4 ++-- src/main/mobile/components/popup.cljs | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main/mobile/components/app.css b/src/main/mobile/components/app.css index 587855914c..857cc49f39 100644 --- a/src/main/mobile/components/app.css +++ b/src/main/mobile/components/app.css @@ -192,11 +192,11 @@ ul { max-width: calc(100vw - 40px); &[data-side=top] { - max-height: var(--top-popup-content-max-height, 50vh); + max-height: var(--top-popup-content-max-height, 60vh); } &[data-side=bottom] { - max-height: var(--bottom-popup-content-max-height, 50vh); + max-height: var(--bottom-popup-content-max-height, 60vh); } } } diff --git a/src/main/mobile/components/popup.cljs b/src/main/mobile/components/popup.cljs index e284f321c7..92867d52e8 100644 --- a/src/main/mobile/components/popup.cljs +++ b/src/main/mobile/components/popup.cljs @@ -65,7 +65,7 @@ (defn- wrap-calc-commands-popup-side [pos opts] - (let [[side mh] (let [[_x y _ height] pos + (let [[side _mh] (let [[_x y _ height] pos vh (.-clientHeight js/document.body) [th bh] [(- y 85) (- vh (+ y height) 310)] direction (if (> bh 280) "bottom" @@ -74,8 +74,7 @@ (if (= "top" direction) ["top" th] ["bottom" bh]))] - (-> (assoc opts :auto-side? false) - (assoc :max-popup-height mh) + (-> (assoc opts :auto-side? true) (assoc-in [:content-props :side] side)))) (defn popup-show!