Refactor colors, remove unneeded (src/status_im) issue #278

This commit is contained in:
alealejandro 2017-01-25 09:20:37 -08:00 committed by Roman Volosovskyi
parent 58fd0c1134
commit 30fb48523e
31 changed files with 82 additions and 122 deletions

2
.gitignore vendored
View File

@ -69,7 +69,7 @@ figwheel_server.log
out
doo-index.html
# Re-natal
# Re-natal
re-natal
# status-go

View File

@ -13,11 +13,8 @@
[status-im.components.toolbar.styles :refer [toolbar-title-container
toolbar-title-text]]
[status-im.components.text-field.view :refer [text-field]]
[status-im.components.styles :refer [color-purple
color-white
[status-im.components.styles :refer [color-white
icon-search
icon-back
icon-qr
button-input]]
[status-im.i18n :refer [label]]
[status-im.accounts.login.styles :as st]))

View File

@ -1,5 +1,6 @@
(ns status-im.accounts.login.styles
(:require [status-im.components.styles :refer [color-white]]))
(:require [status-im.components.styles :refer [color-white
color-blue]]))
(defn screen-container [height]
@ -40,7 +41,7 @@
:paddingHorizontal 28})
(def connect-button-text
{:color "#7099e6"
{:color color-blue
:fontSize 16})
(def input-style
@ -51,4 +52,4 @@
{:color :white})
(def address-input-wrapper
{})
{})

View File

@ -13,8 +13,9 @@
[status-im.components.toolbar.styles :refer [toolbar-gradient
toolbar-title-container
toolbar-title-text]]
[status-im.components.styles :refer [color-purple
color-white
[status-im.components.styles :refer [color-blue
color-gray
separator-color
button-input]]
[status-im.components.react :refer [linear-gradient]]
[status-im.i18n :refer [label]]
@ -40,10 +41,10 @@
[text-field
{:value passphrase
:error error
:error-color "#7099e6"
:error-color color-blue
:label (label :t/passphrase)
:label-color "#838c93de"
:line-color "#0000001f"
:label-color color-gray
:line-color separator-color
:input-style st/input-style
:wrapper-style (merge button-input st/address-input-wrapper)
:on-change-text #(dispatch [:set-in [:recover :passphrase] %])}]]))
@ -59,10 +60,10 @@
{:value password
:secure-text-entry true
:error error
:error-color "#7099e6"
:error-color color-blue
:label (label :t/password)
:label-color "#838c93de"
:line-color "#0000001f"
:label-color color-gray
:line-color separator-color
:input-style st/input-style
:on-change-text #(dispatch [:set-in [:recover :password] %])}]]))

View File

@ -1,5 +1,7 @@
(ns status-im.accounts.recover.styles
(:require [status-im.components.styles :refer [color-white]]))
(:require [status-im.components.styles :refer [color-white
color-gray
color-blue]]))
(def screen-container
@ -20,7 +22,7 @@
:justify-content :center})
(def recover-explain-text
{:color "#838c93de"
{:color color-gray
:font-size 16
:line-height 20
:text-align :center})
@ -45,7 +47,7 @@
{:flex 1})
(defn recover-button [valid-form?]
{:backgroundColor (if valid-form? "#7099e6" :gray)
{:backgroundColor (if valid-form? color-blue :gray)
:color :white
:flex 1
:alignItems :center
@ -64,4 +66,4 @@
{:color :white})
(def address-input-wrapper
{})
{})

View File

@ -12,11 +12,8 @@
[status-im.components.status-bar :refer [status-bar]]
[status-im.components.toolbar.view :refer [toolbar]]
[status-im.components.toolbar.actions :as act]
[status-im.components.styles :refer [color-purple
color-white
[status-im.components.styles :refer [color-white
icon-search
icon-back
icon-qr
icon-plus
white-form-text-input]]
[status-im.components.toolbar.styles :refer [toolbar-title-container

View File

@ -1,15 +1,8 @@
(ns status-im.chat.styles.content-suggestions
(:require [status-im.components.styles :refer [color-light-blue-transparent
color-white
color-black
color-blue
color-blue-transparent
selected-message-color
online-color
(:require [status-im.components.styles :refer [color-white
separator-color
text1-color
text2-color
text3-color]]))
text2-color]]))
(def suggestion-height 56)

View File

@ -1,10 +1,7 @@
(ns status-im.chat.styles.input
(:require [status-im.components.styles :refer [color-white
color-blue
text1-color
text2-color
chat-background
color-black]]))
text1-color]]))
(def command-input-and-suggestions-container
{:flexDirection :column})

View File

@ -1,10 +1,8 @@
(ns status-im.chat.styles.message
(:require [status-im.components.styles :refer [color-light-blue-transparent
color-white
(:require [status-im.components.styles :refer [color-white
color-black
color-blue
selected-message-color
online-color
text1-color
text2-color]]
[status-im.constants :refer [text-content-type

View File

@ -1,5 +1,6 @@
(ns status-im.chat.styles.plain-message
(:require [status-im.components.styles :refer [text1-color]]
(:require [status-im.components.styles :refer [text1-color
color-blue]]
[status-im.chat.constants :refer [max-input-height
min-input-height]]))
@ -34,7 +35,7 @@
:position :absolute})
(def requests-icon
{:background-color :#7099e6
{:background-color color-blue
:margin 2
:width 8
:height 8

View File

@ -1,10 +1,6 @@
(ns status-im.chat.styles.response
(:require [status-im.components.styles :refer [color-white
color-blue
text1-color
text2-color
chat-background
color-black]]
text1-color]]
[status-im.chat.constants :refer [input-height
request-info-height
response-height-normal]]))

View File

@ -1,8 +1,5 @@
(ns status-im.chat.styles.screen
(:require [status-im.components.styles :refer [color-white
color-black
chat-background
online-color
(:require [status-im.components.styles :refer [chat-background
selected-message-color
separator-color
text1-color

View File

@ -1,16 +1,10 @@
(ns status-im.chat.styles.suggestions
(:require [status-im.components.styles :refer [color-light-blue-transparent
color-white
(:require [status-im.components.styles :refer [color-white
color-black
color-gray
color-blue
color-blue-transparent
selected-message-color
online-color
separator-color
text1-color
text2-color
text3-color]]))
text2-color]]))
(def suggestion-height 60)

View File

@ -18,7 +18,7 @@
:password {:input-options {:secure-text-entry true}}
:number {:input-options {:keyboard-type "numeric"}}
;; todo maybe nil is fine for now :)
nil #_(throw (js/Error. "Uknown command type")))]
nil #_(throw (js/Error. "Unknown command type")))]
(if (= :response command-type)
(if placeholder
(assoc-in options [:input-options :placeholder] placeholder)

View File

@ -1,12 +1,5 @@
(ns status-im.components.drawer.styles
(:require [status-im.components.styles :refer [color-light-blue-transparent
color-white
color-black
color-blue
color-blue-transparent
selected-message-color
online-color
separator-color
(:require [status-im.components.styles :refer [color-white
text1-color
text2-color
text3-color

View File

@ -1,4 +1,5 @@
(ns status-im.components.image-button.styles)
(ns status-im.components.image-button.styles
(:require [status-im.components.styles :refer [color-blue]]))
(def image-button
{:position :absolute
@ -22,7 +23,7 @@
:margin-left 8})
(def scan-button-text
(merge image-button-text {:color "#7099e6"}))
(merge image-button-text {:color color-blue}))
(def show-qr-button-text
(merge image-button-text {:color "#838c93"}))
(merge image-button-text {:color "#838c93"}))

View File

@ -1,5 +1,6 @@
(ns status-im.components.selectable-field.styles
(:require [status-im.utils.platform :refer [platform-specific]]))
(:require [status-im.utils.platform :refer [platform-specific]]
[status-im.components.styles :refer [text1-disabled-color]]))
(def selectable-field-container
@ -20,7 +21,7 @@
(def text
{:font-size 16
:color "#555555"
:color text1-disabled-color
:margin-right 16
:text-align-vertical :top})
@ -35,4 +36,3 @@
:padding-left 0
:margin-left 0
:padding-bottom 0})))

View File

@ -3,10 +3,11 @@
(:require [re-frame.core :refer [subscribe dispatch]]
[clojure.string :as str]
[status-im.components.react :refer [view text]]
[status-im.utils.platform :refer [platform-specific]]))
[status-im.utils.platform :refer [platform-specific]]
[status-im.components.styles :refer [color-blue]]))
(defn tag-view [tag]
[text {:style {:color "#7099e6"}
[text {:style {:color color-blue}
:font :medium}
(str tag " ")])
@ -25,4 +26,4 @@
^{:key (str "item-" message-id "-" i)}
[tag-view status]
^{:key (str "item-" message-id "-" i)}
(str status " ")))])
(str status " ")))])

View File

@ -19,8 +19,6 @@
(def text1-disabled-color "#555555")
(def text2-color color-gray)
(def text3-color color-blue)
(def text4-color color-white)
(def text5-color "#838c938f")
(def online-color color-blue)
(def new-messages-count-color color-blue-transparent)
(def chat-background color-light-gray)

View File

@ -12,7 +12,8 @@
[status-im.components.text-field.styles :as st]
[status-im.i18n :refer [label]]
[status-im.components.animation :as anim]
[taoensso.timbre :as log]))
[taoensso.timbre :as log]
[status-im.components.styles :refer [separator-color]]))
(def config {:label-top 16
@ -26,8 +27,8 @@
:line-style {}
:editable true
:label-color "#838c93"
:line-color "#0000001f"
:focus-line-color "#0000001f"
:line-color separator-color
:focus-line-color separator-color
:error-color "#d50000"
:secure-text-entry false
:on-focus #()

View File

@ -1,7 +1,9 @@
(ns status-im.components.toolbar.styles
(:require [status-im.components.styles :refer [text1-color
color-white
color-light-gray]]))
color-light-gray
color-blue
color-black]]))
(def toolbar-background1 color-white)
(def toolbar-background2 color-light-gray)
@ -73,10 +75,10 @@
:margin-left 18
:margin-top 2
:font-size 14
:color "#7099e6"})
:color color-blue})
(def toolbar-with-search-title
{:color "#000000de"
{:color color-black
:align-self :center
:text-align :center
:font-size 16})

View File

@ -23,8 +23,7 @@
[status-im.i18n :refer [label]]
[status-im.contacts.styles :as st]
[status-im.components.styles :refer [color-blue
create-icon
icon-search]]))
create-icon]]))
(def contacts-limit 50)

View File

@ -2,12 +2,10 @@
(:require [status-im.components.styles :refer [text1-color
text2-color
text3-color
text5-color
color-white
color-black
color-light-gray
color-separator
color-gray2]]
color-gray2
color-gray]]
[status-im.components.toolbar.styles :refer [toolbar-background2]]
[status-im.utils.platform :as p]))
@ -201,7 +199,7 @@
(def address-explication
{:textAlign :center
:color "#838c93de"})
:color color-gray})
(def buttons-container
{:position :absolute
@ -238,5 +236,3 @@
:background-color color-white
:align-items :center
:justify-content :center})

View File

@ -13,10 +13,6 @@
[status-im.components.toolbar.actions :as act]
[status-im.components.toolbar.styles :refer [toolbar-background1]]
[status-im.components.drawer.view :refer [drawer-view open-drawer]]
[status-im.components.styles :refer [icon-search
icon-back
button-input-container
button-input]]
[status-im.components.image-button.view :refer [scan-button]]
[status-im.contacts.styles :as st]
[status-im.utils.listview :as lw]

View File

@ -17,9 +17,9 @@
toolbar-background1]]
[status-im.utils.utils :refer [log http-post]]
[status-im.components.styles :refer [icon-ok
icon-back
button-input-container
button-input]]
button-input
color-blue]]
[status-im.components.image-button.view :refer [scan-button]]
[status-im.i18n :refer [label]]
[cljs.spec :as s]
@ -87,7 +87,7 @@
[view button-input-container
[text-field
{:error error
:error-color "#7099e6"
:error-color color-blue
:input-style st/qr-input
:value whisper-identity
:wrapper-style button-input

View File

@ -1,7 +1,7 @@
(ns status-im.discover.styles
(:require [status-im.components.styles :refer [color-gray2
color-white
color-light-gray]]
(:require [status-im.components.styles :refer [color-white
color-light-gray
color-blue]]
[status-im.components.toolbar.styles :refer [toolbar-background2]]))
;; Common
@ -38,7 +38,7 @@
{})
(def tag-name
{:color "#7099e6"
{:color color-blue
:font-size 14
:padding-right 5
:padding-bottom 2
@ -124,7 +124,7 @@
:flex-direction "row"})
(def tag-title
{:color "#7099e6"
{:color color-blue
:font-size 14
:padding-right 5
:padding-bottom 2})

View File

@ -10,7 +10,8 @@
list-view
list-item]]
[status-im.components.text-field.view :refer [text-field]]
[status-im.components.styles :refer [color-purple]]
[status-im.components.styles :refer [color-blue
separator-color]]
[status-im.components.status-bar :refer [status-bar]]
[status-im.components.toolbar.view :refer [toolbar]]
[status-im.utils.listview :refer [to-datasource]]
@ -42,8 +43,8 @@
(not (s/valid? ::v/not-illegal-name new-chat-name))
(label :t/illegal-group-chat-name))
:wrapper-style st/group-chat-name-wrapper
:error-color "#7099e6"
:line-color "#0000001f"
:error-color color-blue
:line-color separator-color
:label-hidden? true
:input-style st/group-chat-name-input
:auto-focus true

View File

@ -1,17 +1,14 @@
(ns status-im.profile.styles
(:require [status-im.components.styles :refer [color-light-blue-transparent
color-white
(:require [status-im.components.styles :refer [color-white
color-gray
color-black
color-blue
color-blue-transparent
selected-message-color
online-color
separator-color
text1-color
text1-disabled-color
text2-color
color-red]]
color-red
separator-color]]
[status-im.utils.platform :as p]))
(def profile
@ -165,7 +162,7 @@
:elevation 4})
(def underline-container
{:background-color "#0000001f"
{:background-color separator-color
:margin-bottom 18
:height 1
:align-items :center})

View File

@ -19,7 +19,7 @@
(defn- parse-content [key {:keys [content]} was-encrypted?]
(debug :parse-content
"Key exitsts:" (not (nil? key))
"Key exists:" (not (nil? key))
"Content exists:" (not (nil? content)))
(if (and (not was-encrypted?) key content)
(decrypt key content)

View File

@ -1,4 +1,6 @@
(ns status-im.transactions.styles)
(ns status-im.transactions.styles
(:require [status-im.components.styles :refer [color-gray
color-black]]))
(def transactions-screen
{:flex 1
@ -83,12 +85,12 @@
(def transaction-info-title
{:textAlign :right
:color "#838c93de"
:color color-gray
:fontSize 14
:lineHeight 20})
(def transaction-info-value
{:color "#000000de"
{:color color-black
:fontSize 14
:lineHeight 20
})

View File

@ -8,8 +8,7 @@
scroll-view
touchable-highlight
touchable-opacity]]
[status-im.components.styles :refer [icon-ok
icon-close]]
[status-im.components.styles :refer [icon-close]]
[status-im.transactions.styles :as st]
[status-im.i18n :refer [label label-pluralize]]))