fix(ui): increase max height for top and bottom popups

This commit is contained in:
charlie
2026-05-14 15:12:53 +08:00
parent 0c0222003c
commit d242008d07
2 changed files with 4 additions and 5 deletions

View File

@@ -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);
}
}
}

View File

@@ -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!