Skip to content
This repository has been archived by the owner on Nov 10, 2018. It is now read-only.

Commit

Permalink
face lifting, fixed recover
Browse files Browse the repository at this point in the history
  • Loading branch information
flexsurfer committed Feb 7, 2018
1 parent 1074f2f commit 8b16101
Show file tree
Hide file tree
Showing 18 changed files with 405 additions and 376 deletions.
11 changes: 10 additions & 1 deletion app/dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@
.app, html, body {
height:100%;
margin:0;
background-color:#4360df;
}
.app {
display: flex;
flex-direction: column;
}
.container {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
}
input:focus,
select:focus,
textarea:focus,
Expand All @@ -21,7 +28,9 @@
</style>
<body>
<div id="app" class="app">
<p>Loading...</p>
<div class="container">
<img src="resources/logo.png">
</div>
</div>
<script type="text/javascript" src="js/out_front/goog/base.js" charset="utf-8"></script>
<script type="text/javascript" src="js/front.js" charset="utf-8"></script>
Expand Down
11 changes: 10 additions & 1 deletion app/prod/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,18 @@
.app, html, body {
height:100%;
margin:0;
background-color:#4360df;
}
.app {
display: flex;
flex-direction: column;
}
.container {
display: flex;
flex: 1;
align-items: center;
justify-content: center;
}
input:focus,
select:focus,
textarea:focus,
Expand All @@ -21,7 +28,9 @@
</style>
<body>
<div id="app" class="app">
<p>Loading...</p>
<div class="container">
<img src="resources/logo.png">
</div>
</div>
<script type="text/javascript" src="js/out_front/goog/base.js" charset="utf-8"></script>
<script type="text/javascript" src="js/front.js" charset="utf-8"></script>
Expand Down
8 changes: 6 additions & 2 deletions src/status_desktop/core.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,9 @@
(set! (.-returnValue event) (.Login status-go address password))))

(.on ipcMain "RecoverAccount"
(fn [event passphrase password]
(set! (.-returnValue event) (.RecoverAccount status-go passphrase password))))
(fn [event password passphrase]
(set! (.-returnValue event) (.RecoverAccount status-go password passphrase))))

#_(.on ipcMain "AddPeer"
(fn [event enode]
(set! (.-returnValue event) (.AddPeer status-go enode))))
4 changes: 2 additions & 2 deletions src_front/status_desktop_front/override/account.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
::recover.events/recover-account-fx
(fn [[passphrase password]]
(re-frame/dispatch [:account-recovered (status-go/recover-account
(string/trim passphrase)
password)])))
password
(string/trim passphrase))])))
7 changes: 5 additions & 2 deletions src_front/status_desktop_front/status_go.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@
(.log js/console (str "Login result " res))
res))

(defn recover-account [passphrase password]
(.sendSync ipcRenderer "RecoverAccount" passphrase password))
(defn recover-account [password passphrase]
(.sendSync ipcRenderer "RecoverAccount" password passphrase))

(defn add-peer [enode]
(.sendSync ipcRenderer "AddPeer" enode))
8 changes: 4 additions & 4 deletions src_front/status_desktop_front/ui/components/tabs.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
:content {:title "Home"
:icon-inactive :icons/home
:icon-active :icons/home-active}}
{:view-id :wallet
:content {:title "Wallet"
:icon-inactive :icons/wallet
:icon-active :icons/wallet-active}}
#_{:view-id :wallet
:content {:title "Wallet"
:icon-inactive :icons/wallet
:icon-active :icons/wallet-active}}

{:view-id :profile
:content {:title "Profile"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
[react/view {:style {:margin-vertical 22}}
[react/text {:style {:color :white :font-size 18}}
name]]
[react/view {:style {:height 52 :width 290 :background-color :white
:opacity 0.2 :border-radius 8 :justify-content :center}}
[react/view {:style {:height 52 :width 290 :background-color "#FFFFFF4D"
:border-radius 8 :justify-content :center}}
[react/text-input {:value (or password "")
:placeholder "Password"
:auto-focus true
:style {:padding-horizontal 17}
:style {:padding-horizontal 17 :color :white}
:on-key-press (fn [e]
(let [native-event (.-nativeEvent e)
key (.-key native-event)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,39 @@
[clojure.string :as string]))

(defview recover []
(letsubs [{:keys [passphrase password]} [:get :accounts/recover]]
(letsubs [{:keys [passphrase password]} [:get :accounts/recover]
profile-name [:get-in [:accounts/create :name]]]
[react/view {:style (merge ast/accounts-container {:align-items :center :justify-content :center})}
[components/back-button #(re-frame/dispatch [:navigate-back])]
[react/view {:style {:align-items :center}}
[react/view {:style {:margin-vertical 22}}
[react/text {:style {:color :white :font-size 18}}
"Recover account"]]
[react/view {:style {:height 107 :width 290 :background-color :white
:opacity 0.2 :border-radius 8 :padding-vertical 17}}
[react/view {:style {:height 52 :width 290 :background-color "#FFFFFF4D"
:border-radius 8 :margin-top 22 :justify-content :center}}
[react/text-input {:value (or profile-name "")
:auto-focus true
:style {:padding-horizontal 17 :color :white}
:placeholder "Name"
:on-change (fn [e]
(let [native-event (.-nativeEvent e)
text (.-text native-event)]
(re-frame/dispatch [:set-in [:accounts/create :name] text])))}]]
[react/view {:style {:height 107 :width 290 :background-color "#FFFFFF4D"
:border-radius 8 :padding-vertical 17 :margin-top 8}}
[react/text-input {:value (or passphrase "")
:placeholder "Passphrase"
:multiline true
:auto-focus true
:style {:padding-horizontal 17}
:style {:padding-horizontal 17 :color :white}
:on-change (fn [e]
(let [native-event (.-nativeEvent e)
text (.-text native-event)]
(re-frame/dispatch [:set-in [:accounts/recover :passphrase] text])))}]]
[react/view {:style {:height 52 :width 290 :background-color :white :margin-top 8
:opacity 0.2 :border-radius 8 :justify-content :center}}
[react/view {:style {:height 52 :width 290 :background-color "#FFFFFF4D" :margin-top 8
:border-radius 8 :justify-content :center}}
[react/text-input {:value (or password "")
:placeholder "Password"
:style {:padding-horizontal 17}
:style {:padding-horizontal 17 :color :white}
:on-key-press (fn [e]
(let [native-event (.-nativeEvent e)
key (.-key native-event)]
Expand Down
18 changes: 9 additions & 9 deletions src_front/status_desktop_front/ui/screens/accounts/views.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,31 @@
[react/text {:style styles/account-title-text}
"To create an account set up \na password"]];(i18n/label :t/sign-in-to-status)]]
[react/view {:style st/accounts-list-container}
[react/view {:style {:height 52 :width 290 :background-color :white
:opacity 0.2 :border-radius 8 :margin-top 22 :justify-content :center}}
[react/view {:style {:height 52 :width 290 :background-color "#FFFFFF4D"
:border-radius 8 :margin-top 22 :justify-content :center}}
[react/text-input {:value (or profile-name "")
:auto-focus true
:style {:padding-horizontal 17}
:style {:padding-horizontal 17 :color :white}
:placeholder "Name"
:on-change (fn [e]
(let [native-event (.-nativeEvent e)
text (.-text native-event)]
(re-frame/dispatch [:set-in [:accounts/create :name] text])))}]]
[react/view {:style {:height 52 :width 290 :background-color :white
:opacity 0.2 :border-radius 8 :margin-top 22 :justify-content :center}}
[react/view {:style {:height 52 :width 290 :background-color "#FFFFFF4D"
:border-radius 8 :margin-top 22 :justify-content :center}}
[react/text-input {:value (or password "")
:style {:padding-horizontal 17}
:style {:padding-horizontal 17 :color :white}
:placeholder "Password"
:secure-text-entry true
:on-change (fn [e]
(let [native-event (.-nativeEvent e)
text (.-text native-event)]
(re-frame/dispatch [:set-in [:accounts/create :password] text])))}]]
[react/view {:style {:height 52 :width 290 :background-color :white
:opacity 0.2 :border-radius 8 :margin-top 8 :justify-content :center}}
[react/view {:style {:height 52 :width 290 :background-color "#FFFFFF4D"
:border-radius 8 :margin-top 8 :justify-content :center}}
[react/text-input {:value (or password-confirm "")
:placeholder "Repeat your password"
:style {:padding-horizontal 17}
:style {:padding-horizontal 17 :color :white}
:on-key-press (fn [e]
(let [native-event (.-nativeEvent e)
key (.-key native-event)]
Expand Down
Loading

0 comments on commit 8b16101

Please sign in to comment.