Add pairing docs link, disable pfs toggle in release
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
This commit is contained in:
parent
7985ee838e
commit
89725d693a
1
.env
1
.env
|
@ -12,6 +12,7 @@ LOG_LEVEL_STATUS_GO=info
|
|||
LOG_LEVEL=debug
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
RN_BRIDGE_THRESHOLD_WARNINGS=0
|
||||
|
|
1
.env.e2e
1
.env.e2e
|
@ -10,6 +10,7 @@ LOG_LEVEL=debug
|
|||
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
||||
PAIRING_POPUP_DISABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
RN_BRIDGE_THRESHOLD_WARNINGS=0
|
||||
|
|
|
@ -12,6 +12,7 @@ LOG_LEVEL=debug
|
|||
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
RN_BRIDGE_THRESHOLD_WARNINGS=0
|
||||
|
|
|
@ -10,6 +10,7 @@ LOG_LEVEL=debug
|
|||
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
RN_BRIDGE_THRESHOLD_WARNINGS=0
|
||||
|
|
|
@ -10,6 +10,7 @@ LOG_LEVEL=debug
|
|||
MAILSERVER_CONFIRMATIONS_ENABLED=0
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=1
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
RN_BRIDGE_THRESHOLD_WARNINGS=0
|
||||
|
|
|
@ -9,6 +9,7 @@ LOG_LEVEL_STATUS_GO=
|
|||
LOG_LEVEL=info
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
PFS_TOGGLE_VISIBLE=0
|
||||
POW_TARGET=0.002
|
||||
POW_TIME=1
|
||||
RN_BRIDGE_THRESHOLD_WARNINGS=0
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
[status-im.contact.core :as models.contact]))
|
||||
|
||||
;; How long do we wait until we process a contact-recovery again?
|
||||
(def contact-recovery-interval-ms (* 6 60 60 1000))
|
||||
(def contact-recovery-interval-ms (* 60 60 1000))
|
||||
|
||||
(defn prompt-dismissed! [public-key]
|
||||
(re-frame/dispatch [:contact-recovery.ui/prompt-dismissed public-key]))
|
||||
|
@ -40,10 +40,11 @@
|
|||
[now public-key]
|
||||
(let [{:keys [timestamp]} (data-store.contact-recovery/get-contact-recovery-by-id public-key)]
|
||||
(and timestamp
|
||||
(< contact-recovery-interval-ms (- now timestamp)))))
|
||||
(> contact-recovery-interval-ms (- now timestamp)))))
|
||||
|
||||
(defn handle-recovery-fx [now public-key]
|
||||
(when-not (notified-recently? now public-key)
|
||||
(if (notified-recently? now public-key)
|
||||
(prompt-dismissed! public-key)
|
||||
(re-frame/dispatch [:contact-recovery.callback/handle-recovery public-key])))
|
||||
|
||||
(fx/defn notify-user
|
||||
|
|
|
@ -74,7 +74,7 @@
|
|||
[{:keys [db] :as cofx} {:keys [payload chat-id success-event]}]
|
||||
(let [{:keys [web3]} db]
|
||||
(let [pfs? (get-in db [:account/account :settings :pfs?])]
|
||||
(if pfs?
|
||||
(if (and config/pfs-toggle-visible? pfs?)
|
||||
(send-direct-message cofx
|
||||
chat-id
|
||||
success-event
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
[pairing.views/edit-installation-name]
|
||||
[react/view
|
||||
[pairing.views/pair-this-device]
|
||||
[pairing.views/info-section]
|
||||
[pairing.views/sync-devices]
|
||||
[react/view {:style pairing.styles/installation-list}
|
||||
[pairing.views/your-device your-installation-id your-installation-name]
|
||||
|
@ -193,7 +194,7 @@
|
|||
[react/view {:style styles/title-separator}]
|
||||
[react/text {:style styles/adv-settings-subtitle} (i18n/label :t/pfs)]
|
||||
[react/view {:style (styles/profile-row false)}
|
||||
[react/text {:style (styles/profile-row-text colors/black)} (i18n/label :notifications)]
|
||||
[react/text {:style (styles/profile-row-text colors/black)} (i18n/label :t/pfs)]
|
||||
[react/switch {:on-tint-color colors/blue
|
||||
:value pfs?
|
||||
:on-value-change #(re-frame/dispatch [:accounts.ui/toggle-pfs (not pfs?)])}]]])))
|
||||
|
|
|
@ -44,6 +44,13 @@
|
|||
:padding-top 12
|
||||
:background-color :white})
|
||||
|
||||
(def info-section
|
||||
{:padding-horizontal 16
|
||||
:padding-top 12})
|
||||
|
||||
(def info-section-text
|
||||
{:color colors/blue})
|
||||
|
||||
(def pair-this-device-actions
|
||||
{:flex 1
|
||||
:flex-direction :row})
|
||||
|
|
|
@ -177,6 +177,11 @@
|
|||
(re-frame/dispatch [:pairing.ui/set-name-pressed @installation-name])
|
||||
(reset! installation-name ""))}]]])
|
||||
|
||||
(defn info-section []
|
||||
[react/view {:style styles/info-section}
|
||||
[react/touchable-highlight {:on-press #(.openURL react/linking "https://status.im/tutorials/pairing.html")}
|
||||
[react/text {:style styles/info-section-text} (i18n/label :t/learn-more)]]])
|
||||
|
||||
(defn installations-list [installation-id installation-name installations]
|
||||
[react/view {:style styles/installation-list}
|
||||
[react/view {:style styles/paired-devices-title}
|
||||
|
@ -197,5 +202,6 @@
|
|||
[edit-installation-name]
|
||||
[react/view
|
||||
[pair-this-device]
|
||||
[info-section]
|
||||
[installations-list installation-id installation-name installations]])]
|
||||
(when (seq installations) [footer syncing])]))
|
||||
|
|
|
@ -200,9 +200,9 @@
|
|||
{:label-kw :t/bootnodes
|
||||
:action-fn #(re-frame/dispatch [:navigate-to :bootnodes-settings])
|
||||
:accessibility-label :bootnodes-settings-button}])
|
||||
(when dev-mode?
|
||||
(when (and dev-mode? config/pfs-toggle-visible?)
|
||||
[profile.components/settings-item-separator])
|
||||
(when dev-mode?
|
||||
(when (and dev-mode? config/pfs-toggle-visible?)
|
||||
[profile.components/settings-switch-item
|
||||
{:label-kw :t/pfs
|
||||
:value (:pfs? settings)
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
(def mainnet-warning-enabled? (enabled? (get-config :MAINNET_WARNING_ENABLED 0)))
|
||||
(def pfs-encryption-enabled? (enabled? (get-config :PFS_ENCRYPTION_ENABLED "0")))
|
||||
(def pairing-popup-disabled? (enabled? (get-config :PAIRING_POPUP_DISABLED "0")))
|
||||
(def pfs-toggle-visible? (enabled? (get-config :PFS_TOGGLE_VISIBLE "0")))
|
||||
(def cached-webviews-enabled? (enabled? (get-config :CACHED_WEBVIEWS_ENABLED 0)))
|
||||
(def rn-bridge-threshold-warnings-enabled? (enabled? (get-config :RN_BRIDGE_THRESHOLD_WARNINGS 0)))
|
||||
(def extensions-enabled? (enabled? (get-config :EXTENSIONS 0)))
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
(is (= 3 (group-chats/get-last-clock-value {:db {:chats {chat-id {:last-clock-value 3}}}} chat-id))))
|
||||
|
||||
(deftest handle-group-membership-update-test
|
||||
(with-redefs [config/group-chats-enabled? true]
|
||||
(testing "a brand new chat"
|
||||
(let [actual (->
|
||||
(group-chats/handle-membership-update {:now 0 :db {}} initial-message "payload" admin)
|
||||
|
@ -168,10 +167,9 @@
|
|||
"group-chat-member-added"
|
||||
"group-chat-member-removed"
|
||||
"group-chat-name-changed"]
|
||||
(map (comp :text :content) (sort-by :clock-value (vals (:messages actual-chat)))))))))))))
|
||||
(map (comp :text :content) (sort-by :clock-value (vals (:messages actual-chat))))))))))))
|
||||
|
||||
(deftest set-up-topic
|
||||
(with-redefs [config/group-chats-enabled? true]
|
||||
(let [cofx {:now 0 :db {:account/account {:public-key admin}}}]
|
||||
(testing "a brand new chat"
|
||||
(let [actual (group-chats/handle-membership-update cofx initial-message "payload" admin)]
|
||||
|
@ -198,7 +196,7 @@
|
|||
:member member-1}]}]}
|
||||
actual (group-chats/handle-membership-update cofx new-message "payload" admin)]
|
||||
(testing "it removes the topic"
|
||||
(is (:shh/remove-filter actual))))))))
|
||||
(is (:shh/remove-filter actual)))))))
|
||||
|
||||
(deftest build-group-test
|
||||
(testing "only adds"
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
"public-chat": "Public chat",
|
||||
"description": "Description",
|
||||
"devices": "Devices",
|
||||
"learn-more": "Learn more",
|
||||
"pair": "Pair devices",
|
||||
"pair-this-device": "Pair this device",
|
||||
"pair-this-device-description": "Pair your devices to sync contacts and chats between them",
|
||||
|
|
Loading…
Reference in New Issue