Design fixes for profile options (#15966)

design fixes for profile options
This commit is contained in:
Volodymyr Kozieiev 2023-05-22 16:07:39 +01:00 committed by GitHub
parent 7e47057b2e
commit 540e5be290
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 10 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 744 B

After

Width:  |  Height:  |  Size: 880 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1017 B

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -8,7 +8,7 @@
(defn- get-icon-color (defn- get-icon-color
[danger? override-theme] [danger? override-theme]
(if danger? (if danger?
colors/danger-50 colors/danger-60
(colors/theme-colors colors/neutral-50 colors/neutral-40 override-theme))) (colors/theme-colors colors/neutral-50 colors/neutral-40 override-theme)))
(def divider (def divider

View File

@ -73,7 +73,7 @@
(styles/sheet insets window-height override-theme shell?))} (styles/sheet insets window-height override-theme shell?))}
(when shell? (when shell?
[blur/view [blur/ios-view
{:style styles/shell-bg}]) {:style styles/shell-bg}])
(when selected-item (when selected-item

View File

@ -69,7 +69,8 @@
(defn show-profile-options (defn show-profile-options
[key-uid context] [key-uid context]
(rf/dispatch [:show-bottom-sheet (rf/dispatch [:show-bottom-sheet
{:content (fn [] [profile-options key-uid context])}])) {:content (fn [] [profile-options key-uid context])
:shell? true}]))
(defn profile-card (defn profile-card
[{:keys [name key-uid customization-color keycard-pairing last-index set-hide-profiles] [{:keys [name key-uid customization-color keycard-pairing last-index set-hide-profiles]

View File

@ -69,12 +69,17 @@
(when js/goog.DEBUG (when js/goog.DEBUG
[reloader/reload-view])])))) [reloader/reload-view])]))))
; Designs require bottom inset to be bigger than safe area, otherwise it is too close to the bottom
(defn bottom-sheet-insets
[]
(assoc (safe-area/get-insets) :bottom 55))
(def bottom-sheet (def bottom-sheet
(reagent/reactify-component (reagent/reactify-component
(fn [] (fn []
(let [{:keys [sheets hide?]} (rf/sub [:bottom-sheet]) (let [{:keys [sheets hide?]} (rf/sub [:bottom-sheet])
sheet (last sheets) sheet (last sheets)
insets (safe-area/get-insets)] insets (bottom-sheet-insets)]
^{:key (str "sheet" @reloader/cnt)} ^{:key (str "sheet" @reloader/cnt)}
[:<> [:<>
[inactive] [inactive]