[#6997] Remove desktop download nightly release feature
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
This commit is contained in:
parent
13b5c14b78
commit
f56a500f64
|
@ -16,23 +16,11 @@
|
|||
:home)
|
||||
nil))
|
||||
|
||||
(fx/defn fetch-desktop-version
|
||||
[_ tab-name]
|
||||
(when (and platform/isMacOs?
|
||||
(= tab-name :profile))
|
||||
{:http-get
|
||||
{:url
|
||||
"https://status-im.ams3.digitaloceanspaces.com/latest.json"
|
||||
:success-event-creator
|
||||
(fn [o]
|
||||
[:fetch-desktop-version-success o])}}))
|
||||
|
||||
(fx/defn show-desktop-tab
|
||||
[cofx tab-name]
|
||||
(fx/merge cofx
|
||||
(change-tab tab-name)
|
||||
(navigate-to tab-name)
|
||||
(fetch-desktop-version tab-name)))
|
||||
(navigate-to tab-name)))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:show-desktop-tab
|
||||
|
|
|
@ -140,10 +140,8 @@
|
|||
|
||||
(views/defview profile [{:keys [seed-backed-up? mnemonic] :as user}]
|
||||
(views/letsubs [current-view-id [:get :view-id]
|
||||
nightly-version [:get-in [:desktop/desktop :nightly-version]]
|
||||
editing? [:get :my-profile/editing?]] ;; TODO janherich: refactor my-profile, unnecessary complicated structure in db (could be just `:staged-name`/`:editing?` fields in account map) and horrible way to access it woth `:get`/`:set` subs/events
|
||||
(let [{:keys [url commit]} nightly-version
|
||||
adv-settings-open? (= current-view-id :advanced-settings)
|
||||
(let [adv-settings-open? (= current-view-id :advanced-settings)
|
||||
backup-recovery-phrase-open? (= current-view-id :backup-recovery-phrase)
|
||||
notifications? (get-in user [:desktop-notifications?])
|
||||
show-backup-seed? (and (not seed-backed-up?) (not (string/blank? mnemonic)))]
|
||||
|
@ -180,14 +178,7 @@
|
|||
[react/view {:style (styles/profile-row false)}
|
||||
[react/touchable-highlight {:on-press #(re-frame/dispatch [:accounts.logout.ui/logout-confirmed])}
|
||||
[react/text {:style (styles/profile-row-text colors/red)} (i18n/label :t/logout)]]
|
||||
[react/view [react/text {:style (styles/profile-row-text colors/gray)} "V" build/version " (" build/commit-sha ")"]]]
|
||||
(when (and url commit (not= (subs build/commit-sha 0 6) commit))
|
||||
[react/view {:style {:margin-top 20}}
|
||||
[react/touchable-highlight {:on-press #(.openURL react/linking url)}
|
||||
[react/view {:style styles/share-contact-code}
|
||||
[react/view {:style styles/share-contact-code-text-container}
|
||||
[react/text {:style styles/share-contact-code-text}
|
||||
(str "Download latest " commit)]]]]])]])))
|
||||
[react/view [react/text {:style (styles/profile-row-text colors/gray)} "V" build/version " (" build/commit-sha ")"]]]]])))
|
||||
|
||||
(views/defview profile-data []
|
||||
(views/letsubs
|
||||
|
|
|
@ -170,13 +170,4 @@
|
|||
(handlers/register-handler-fx
|
||||
:update-window-dimensions
|
||||
(fn [{:keys [db]} [_ dimensions]]
|
||||
{:db (assoc db :dimensions/window (dimensions/window dimensions))}))
|
||||
|
||||
(handlers/register-handler-fx
|
||||
:fetch-desktop-version-success
|
||||
(fn [{:keys [db]} [_ result]]
|
||||
(when (and result (not (str/blank? result)) (or platform/isMacOs? platform/isNix?))
|
||||
(when-let [url (get (types/json->clj result) (if platform/isMacOs? :MAC :APP))]
|
||||
(let [dt (- (count url) (if platform/isMacOs? 12 17))
|
||||
commit (subs url (- dt 6) dt)]
|
||||
{:db (assoc-in db [:desktop/desktop :nightly-version] {:url url :commit commit})})))))
|
||||
{:db (assoc db :dimensions/window (dimensions/window dimensions))}))
|
Loading…
Reference in New Issue