Revert "Hide key storage selection screen temporarily"

This reverts commit 8764fafc42.
This commit is contained in:
Vitaliy Vlasov 2019-07-18 13:14:37 +03:00
parent 8764fafc42
commit 3a903fbaa2
No known key found for this signature in database
GPG Key ID: A7D57C347F2B2964
2 changed files with 4 additions and 10 deletions

View File

@ -38,17 +38,11 @@
(defn dec-step [step] (defn dec-step [step]
(let [inverted (map-invert step-kw-to-num)] (let [inverted (map-invert step-kw-to-num)]
; Skip select-key-storage step (inverted (dec (step-kw-to-num step)))))
(if (= step :create-code)
:choose-key
(inverted (dec (step-kw-to-num step))))))
(defn inc-step [step] (defn inc-step [step]
(let [inverted (map-invert step-kw-to-num)] (let [inverted (map-invert step-kw-to-num)]
; Skip select-key-storage step (inverted (inc (step-kw-to-num step)))))
(if (= step :choose-key)
:create-code
(inverted (inc (step-kw-to-num step))))))
(defn get-status [cofx] (defn get-status [cofx]
(assoc cofx :status (rand-nth statuses/data))) (assoc cofx :status (rand-nth statuses/data)))

View File

@ -24,7 +24,7 @@
(testing "Back from create-code" (testing "Back from create-code"
(let [db {:intro-wizard {:step :create-code :key-code "qwerty"}} (let [db {:intro-wizard {:step :create-code :key-code "qwerty"}}
result (get-in (models/intro-step-back {:db db}) [:db :intro-wizard])] result (get-in (models/intro-step-back {:db db}) [:db :intro-wizard])]
(is (= result {:step :choose-key :key-code nil :weak-password? true})))) (is (= result {:step :select-key-storage :key-code nil :weak-password? true}))))
(testing "Back from confirm-code" (testing "Back from confirm-code"
(let [db {:intro-wizard {:step :confirm-code :confirm-failure? true}} (let [db {:intro-wizard {:step :confirm-code :confirm-failure? true}}
@ -37,7 +37,7 @@
;; In this case intro-step-forward returns fx/merge result which is an fn ;; In this case intro-step-forward returns fx/merge result which is an fn
;; to be invoked on cofx ;; to be invoked on cofx
result (get-in ((models/intro-step-forward {:db db}) {:db db}) [:db :intro-wizard])] result (get-in ((models/intro-step-forward {:db db}) {:db db}) [:db :intro-wizard])]
(is (= result {:step :create-code})))) (is (= result {:step :select-key-storage}))))
(testing "Forward from generate-key" (testing "Forward from generate-key"
(let [db {:intro-wizard {:step :generate-key}} (let [db {:intro-wizard {:step :generate-key}}