parent
f5854fb43c
commit
d0d3cf107d
|
@ -97,17 +97,19 @@ function webView(url) {
|
|||
|
||||
function validationMessage(titleText, descriptionText) {
|
||||
var titleStyle = {
|
||||
style: {
|
||||
color: "white",
|
||||
fontSize: 12,
|
||||
fontFamily: "sans-serif"
|
||||
fontSize: 12
|
||||
}
|
||||
};
|
||||
var title = status.components.text(titleStyle, titleText);
|
||||
|
||||
var descriptionStyle = {
|
||||
style: {
|
||||
color: "white",
|
||||
fontSize: 12,
|
||||
fontFamily: "sans-serif",
|
||||
opacity: 0.9
|
||||
}
|
||||
};
|
||||
var description = status.components.text(descriptionStyle, descriptionText);
|
||||
|
||||
|
|
|
@ -39,18 +39,21 @@
|
|||
[{:keys [current-chat-id] :as db}]
|
||||
(let [path [:chats current-chat-id :command-input :command :type]
|
||||
type (get-in db path)
|
||||
command? (= :command type)
|
||||
response? (not command?)
|
||||
errors (get-in db [:validation-errors current-chat-id])
|
||||
validation-errors? (seq errors)
|
||||
suggestion? (get-in db [:has-suggestions? current-chat-id])
|
||||
custom-errors (get-in db [:custom-validation-errors current-chat-id])
|
||||
validation-height (if (or (seq errors) (seq custom-errors))
|
||||
request-info-height
|
||||
0)]
|
||||
(+ validation-height
|
||||
(if (= :response type)
|
||||
minimum-suggestion-height
|
||||
(if-not suggestion?
|
||||
input-height
|
||||
(+ input-height suggestions-header-height))))))
|
||||
custom-errors? (seq custom-errors)
|
||||
validation-errors? (or validation-errors? custom-errors?)]
|
||||
(cond-> 0
|
||||
validation-errors? (+ request-info-height)
|
||||
response? (+ minimum-suggestion-height)
|
||||
command? (+ input-height)
|
||||
(and suggestion? command?) (+ suggestions-header-height)
|
||||
custom-errors? (+ suggestions-header-height)
|
||||
(and command? validation-errors?) (+ suggestions-header-height))))
|
||||
|
||||
(register-handler :animate-show-response
|
||||
;[(after #(dispatch [:command-edit-mode]))]
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
(defn message [{:keys [title description]}]
|
||||
(c/list-item
|
||||
[c/view
|
||||
[c/text st/title title]
|
||||
[c/text st/description description]]))
|
||||
[c/text {:style st/title} title]
|
||||
[c/text {:style st/description} description]]))
|
||||
|
||||
(defn messages-list [errors]
|
||||
[c/list-view {:renderRow message
|
||||
|
|
Loading…
Reference in New Issue