app locked screen design review changes (#15927)

This commit is contained in:
Ajay Sivan 2023-05-19 05:17:03 -07:00 committed by GitHub
parent 77ddd8688f
commit 7e8f1fac8a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 204 additions and 177 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 685 B

After

Width:  |  Height:  |  Size: 788 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 801 B

After

Width:  |  Height:  |  Size: 868 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -8,7 +8,9 @@
(defn themes
[customization-color]
{:light {:primary {:icon-color colors/white
{:light
{:primary {:icon-color colors/white
:icon-secondary-color colors/white-opa-70
:label-color colors/white
:background-color {:default (colors/custom-color customization-color 50)
:pressed (colors/custom-color customization-color 60)
@ -41,11 +43,13 @@
:label-color colors/neutral-100
:background-color {:pressed colors/neutral-10}}
:danger {:icon-color colors/white
:icon-secondary-color colors/white-opa-70
:label-color colors/white
:background-color {:default colors/danger-50
:pressed colors/danger-60
:disabled colors/danger-50}}
:positive {:icon-color colors/white
:icon-secondary-color colors/white-opa-70
:label-color colors/white
:background-color {:default colors/success-50
:pressed colors/success-60
@ -73,7 +77,9 @@
:background-color {:default colors/neutral-95
:pressed colors/neutral-95
:disabled colors/neutral-95}}}
:dark {:primary {:icon-color colors/white
:dark
{:primary {:icon-color colors/white
:icon-secondary-color colors/white-opa-70
:label-color colors/white
:background-color {:default (colors/custom-color customization-color 60)
:pressed (colors/custom-color customization-color 50)
@ -106,11 +112,13 @@
:label-color colors/white
:background-color {:pressed colors/neutral-80}}
:danger {:icon-color colors/white
:icon-secondary-color colors/white-opa-70
:label-color colors/white
:background-color {:default colors/danger-60
:pressed colors/danger-50
:disabled colors/danger-60}}
:positive {:icon-color colors/white
:icon-secondary-color colors/white-opa-70
:label-color colors/white
:background-color {:default colors/success-60
:pressed colors/success-50

View File

@ -4,7 +4,8 @@
[quo2.components.inputs.input.style :as style]
[quo2.components.markdown.text :as text]
[react-native.core :as rn]
[reagent.core :as reagent]))
[reagent.core :as reagent]
[quo2.theme :as theme]))
(defn- label-&-counter
[{:keys [label current-chars char-limit variant-colors]}]
@ -100,6 +101,7 @@
(cond-> {:style (style/input colors-by-status small? @multiple-lines?)
:accessibility-label :input
:placeholder-text-color (:placeholder colors-by-status)
:keyboard-appearance (theme/theme-value :light :dark override-theme)
:cursor-color (:cursor variant-colors)
:editable (not disabled?)
:on-focus (fn []

View File

@ -2,7 +2,8 @@
(:require [clojure.string :as string]
[quo2.components.inputs.recovery-phrase.style :as style]
[react-native.core :as rn]
[reagent.core :as reagent]))
[reagent.core :as reagent]
[quo2.theme :as theme]))
(def ^:private custom-props
[:customization-color :override-theme :blur? :cursor-color :multiline :on-focus :on-blur
@ -42,6 +43,7 @@
:style (style/input)
:placeholder-text-color (style/placeholder-color @state override-theme blur?)
:cursor-color (style/cursor-color customization-color override-theme)
:keyboard-appearance (theme/theme-value :light :dark override-theme)
:multiline true
:on-focus (fn []
(set-focused)

View File

@ -3,7 +3,8 @@
[quo2.components.icon :as icon]
[quo2.components.inputs.search-input.style :as style]
[react-native.core :as rn]
[reagent.core :as reagent]))
[reagent.core :as reagent]
[quo2.foundations.colors :as colors]))
(def ^:private tag-separator [rn/view {:style style/tag-separator}])
@ -68,6 +69,7 @@
:placeholder-text-color (style/placeholder-color @state blur? override-theme)
:editable (not disabled?)
:on-key-press #(handle-backspace % @scroll-view-ref)
:keyboard-appearance (colors/theme-colors :light :dark override-theme)
:on-change-text (fn [new-text]
(when on-change-text
(on-change-text new-text))

View File

@ -3,7 +3,8 @@
[quo2.components.inputs.title-input.style :as style]
[quo2.components.markdown.text :as text]
[reagent.core :as reagent]
[react-native.core :as rn]))
[react-native.core :as rn]
[quo2.theme :as theme]))
(defn- pad-0
[value]
@ -38,6 +39,7 @@
:style (style/title-text disabled? blur? override-theme)})
:default-value default-value
:accessibility-label :profile-title-input
:keyboard-appearance (theme/theme-value :light :dark override-theme)
:on-focus #(swap! focused? (fn [] true))
:on-blur #(swap! focused? (fn [] false))
:input-mode :text

View File

@ -14,3 +14,11 @@
(defn set-theme
[value]
(reset! theme value))
(defn theme-value
"Returns a value based on the current/override-theme theme."
([light-value dark-value]
(theme-value light-value dark-value nil))
([light-value dark-value override-theme]
(let [theme (or override-theme (get-theme))]
(if (= theme :light) light-value dark-value))))

View File

@ -21,7 +21,8 @@
[status-im2.contexts.chat.composer.gesture :as drag-gesture]
[status-im2.contexts.chat.composer.handlers :as handler]
[status-im2.contexts.chat.composer.gradients.view :as gradients]
[status-im2.contexts.chat.composer.selection :as selection]))
[status-im2.contexts.chat.composer.selection :as selection]
[quo2.theme :as theme]))
(defn sheet-component
[{:keys [insets window-height blur-height opacity background-y]} props state]
@ -99,6 +100,7 @@
:on-change-text #(handler/change-text % props state)
:on-selection-change #(handler/selection-change % props state)
:on-selection #(selection/on-selection % props state)
:keyboard-appearance (theme/theme-value :light :dark)
:max-height max-height
:max-font-size-multiplier 1
:multiline true

View File

@ -1,6 +1,5 @@
(ns status-im2.contexts.onboarding.profiles.style
(:require [quo2.foundations.colors :as colors]
[react-native.platform :as platform]))
(:require [quo2.foundations.colors :as colors]))
;; Profiles Section
@ -48,15 +47,10 @@
(def login-profile-card
{:margin-bottom 20})
(def info-message
{:margin-top 8})
(def forget-password-button
{:margin-vertical 8})
(defn login-button
[]
{:margin-bottom (if platform/android? 20 46)})
(def error-message
{:margin-top 8
:flex-direction :row
:align-items :center})
(def forget-password-doc-container {:margin-right 16})
(def forget-password-step-container {:flex-direction :row :margin-top 14})

View File

@ -10,7 +10,9 @@
[utils.i18n :as i18n]
[utils.re-frame :as rf]
[utils.security.core :as security]
[utils.transforms :as types]))
[utils.transforms :as types]
[quo2.foundations.colors :as colors]
[react-native.safe-area :as safe-area]))
(defn login-multiaccount
[]
@ -178,7 +180,8 @@
sign-in-enabled? (rf/sub [:sign-in-enabled?])
profile-picture (:uri (first (:images multiaccount)))]
[rn/keyboard-avoiding-view
{:style style/login-container}
{:style style/login-container
:keyboardVerticalOffset (- (safe-area/get-bottom))}
[quo/button
{:size 32
:type :blur-bg
@ -213,23 +216,25 @@
:default-value (security/safe-unmask-data password)
:on-submit-editing (when sign-in-enabled? login-multiaccount)}]
(when (seq error)
[rn/view {:style style/error-message}
[quo/info-message
{:type :error
:size :default
:icon :i/info
:style style/info-message}
error])]
[quo/button
{:size 40
:type :ghost
:before :i/info
:icon :i/info}
error]
[rn/touchable-opacity
{:hit-slop {:top 6 :bottom 20 :left 0 :right 0}
:style {:margin-left -4}
:disabled processing
:accessibility-label :forget-password-button
:override-theme :dark
:style style/forget-password-button
:active-opacity 1
:on-press #(rf/dispatch [:show-bottom-sheet
{:content forget-password-doc :shell? true}])}
(i18n/label :t/forgot-password)]
[rn/text
{:style {:text-decoration-line :underline
:color colors/danger-60}
:size :paragraph-2
:suppress-highlighting true}
(i18n/label :t/forgot-password)]]])]
[quo/button
{:size 40
:type :primary
@ -239,7 +244,7 @@
:before :i/unlocked
:disabled (or (not sign-in-enabled?) processing)
:on-press login-multiaccount
:style (style/login-button)}
:style {:margin-bottom (+ (safe-area/get-bottom) 12)}}
(i18n/label :t/log-in)]]))
(defn views

View File

@ -4,7 +4,8 @@
[react-native.blur :as blur]
[react-native.core :as rn]
[reagent.core :as reagent]
[status-im2.common.resources :as resources])
[status-im2.common.resources :as resources]
[quo2.theme :as theme])
(:require-macros status-im2.contexts.quo-preview.preview))
(def container
@ -112,6 +113,7 @@
:border-width 1
:color (colors/theme-colors colors/neutral-100 colors/white)
:border-color (colors/theme-colors colors/neutral-100 colors/white)}
:keyboard-appearance (theme/theme-value :light :dark)
:on-change-text #(do
(reset! state* (if (and suffix (> (count %) (count @state*)))
(str (string/replace % suffix "") suffix)