Revert " Hide browser behind feature flag (#20036)"
This reverts commit ba3d4dd4ce
.
This commit is contained in:
parent
ba3d4dd4ce
commit
afd92d2df1
|
@ -11,11 +11,9 @@
|
|||
[legacy.status-im.utils.random :as random]
|
||||
[native-module.core :as native-module]
|
||||
[re-frame.core :as re-frame]
|
||||
[react-native.core :as react]
|
||||
[react-native.platform :as platform]
|
||||
[status-im.common.json-rpc.events :as json-rpc]
|
||||
[status-im.common.universal-links :as links]
|
||||
[status-im.config :as config]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.contexts.chat.events :as chat.events]
|
||||
[status-im.navigation.events :as navigation]
|
||||
|
@ -304,7 +302,6 @@
|
|||
:history [normalized-url]}]
|
||||
(if (links/universal-link? normalized-url)
|
||||
{:dispatch [:universal-links/handle-url normalized-url]}
|
||||
(if config/show-not-implemented-features?
|
||||
(rf/merge cofx
|
||||
{:db (assoc db
|
||||
:browser/options
|
||||
|
@ -314,8 +311,7 @@
|
|||
(chat.events/close-chat)
|
||||
(navigation/change-tab :browser-stack)
|
||||
(update-browser browser)
|
||||
(resolve-url nil))
|
||||
(.openURL ^js react/linking (url/normalize-url url))))))
|
||||
(resolve-url nil)))))
|
||||
|
||||
(rf/defn open-existing-browser
|
||||
"Opens an existing browser with it's history"
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
(ns legacy.status-im.browser.core-test
|
||||
(:require
|
||||
[cljs.test :refer-macros [deftest is testing]]
|
||||
[legacy.status-im.browser.core :as browser]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.url :as url]))
|
||||
|
||||
(defn has-wrong-properties?
|
||||
|
@ -18,7 +21,7 @@
|
|||
(some #(when (= (url/normalize-and-decode-url dapp-url) (first (:history %))) (:browser-id %))
|
||||
(vals (get-in result [:db :browser/browsers]))))
|
||||
|
||||
#_(deftest browser-test
|
||||
(deftest browser-test
|
||||
(let [dapp1-url "cryptokitties.co"
|
||||
dapp2-url "http://test2.com"]
|
||||
|
||||
|
@ -99,8 +102,7 @@
|
|||
dapp1-id
|
||||
{:browser-id dapp1-id
|
||||
:history-index 0
|
||||
:history ["https://cryptokitties.co"
|
||||
dapp1-url2]
|
||||
:history ["https://cryptokitties.co" dapp1-url2]
|
||||
:dapp? false
|
||||
:name (i18n/label :t/browser)}))
|
||||
"some properties of the browser are not correct")
|
||||
|
@ -113,8 +115,7 @@
|
|||
dapp1-id
|
||||
{:browser-id dapp1-id
|
||||
:history-index 1
|
||||
:history ["https://cryptokitties.co"
|
||||
dapp1-url2]
|
||||
:history ["https://cryptokitties.co" dapp1-url2]
|
||||
:dapp? false
|
||||
:name (i18n/label :t/browser)}))
|
||||
"some properties of the browser are not correct"))))))))))))
|
||||
|
|
|
@ -1,6 +1,12 @@
|
|||
(ns legacy.status-im.browser.permissions-test)
|
||||
(ns legacy.status-im.browser.permissions-test
|
||||
(:require
|
||||
[cljs.test :refer-macros [deftest is testing]]
|
||||
[legacy.status-im.browser.core :as browser]
|
||||
[legacy.status-im.browser.core-test :as core.tests]
|
||||
[legacy.status-im.browser.permissions :as permissions]
|
||||
[legacy.status-im.utils.deprecated-types :as types]))
|
||||
|
||||
#_(deftest permissions-test
|
||||
(deftest permissions-test
|
||||
(let [dapp-name "test.com"
|
||||
dapp-name2 "test2.org"
|
||||
cofx {:db (assoc-in (:db (browser/open-url {:db {}} dapp-name))
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
[legacy.status-im.ui.components.react :as react]
|
||||
[re-frame.core :as re-frame]
|
||||
[react-native.platform :as platform]
|
||||
[status-im.config :as config]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.url :as url]))
|
||||
|
||||
|
@ -28,9 +27,8 @@
|
|||
(defn browse
|
||||
[link]
|
||||
(show {:title (i18n/label :t/browsing-title)
|
||||
:options [(when config/show-not-implemented-features?
|
||||
{:label (i18n/label :t/browsing-open-in-status)
|
||||
:action #(re-frame/dispatch [:browser.ui/open-url link])})
|
||||
:options [{:label (i18n/label :t/browsing-open-in-status)
|
||||
:action #(re-frame/dispatch [:browser.ui/open-url link])}
|
||||
{:label (i18n/label (platform-web-browser))
|
||||
:action #(.openURL ^js react/linking (url/normalize-url link))}]
|
||||
:cancel-text (i18n/label :t/browsing-cancel)}))
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
[react-native.gesture :as gesture]
|
||||
[react-native.platform :as platform]
|
||||
[react-native.reanimated :as reanimated]
|
||||
[status-im.config :as config]
|
||||
[status-im.contexts.shell.jump-to.animation :as animation]
|
||||
[status-im.contexts.shell.jump-to.components.bottom-tabs.style :as style]
|
||||
[status-im.contexts.shell.jump-to.constants :as shell.constants]
|
||||
|
@ -71,5 +70,4 @@
|
|||
[gesture/gesture-detector {:gesture messages-double-tap-gesture}
|
||||
[bottom-tab :i/messages :chats-stack shared-values notifications-data]]
|
||||
[bottom-tab :i/wallet :wallet-stack shared-values notifications-data]
|
||||
(when config/show-not-implemented-features?
|
||||
[bottom-tab :i/browser :browser-stack shared-values notifications-data])]]]))
|
||||
[bottom-tab :i/browser :browser-stack shared-values notifications-data]]]]))
|
||||
|
|
Loading…
Reference in New Issue