Changed to popups for installing and uninstalling extensions

Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
Frederik Bolding 2018-11-15 16:32:33 +01:00 committed by Julien Eluard
parent a31d10f6dc
commit 5d549fec12
No known key found for this signature in database
GPG Key ID: 6FD7DB5437FCBEF6
1 changed files with 5 additions and 8 deletions

View File

@ -56,10 +56,9 @@
:active? true} :active? true}
new-extensions (assoc (:extensions account) (:url extension) extension)] new-extensions (assoc (:extensions account) (:url extension) extension)]
(fx/merge cofx (fx/merge cofx
{:ui/show-confirmation {:title (i18n/label :t/success) {:utils/show-popup {:title (i18n/label :t/success)
:content (i18n/label :t/extension-installed) :content (i18n/label :t/extension-installed)
:on-accept #(re-frame/dispatch [:navigate-to-clean :my-profile]) :on-dismiss #(re-frame/dispatch [:navigate-to-clean :my-profile])}}
:on-cancel nil}}
(accounts.update/account-update {:extensions new-extensions} {}) (accounts.update/account-update {:extensions new-extensions} {})
(add-to-registry (:value url) extension-data true)))) (add-to-registry (:value url) extension-data true))))
@ -68,10 +67,8 @@
(let [{:account/keys [account]} db (let [{:account/keys [account]} db
new-extensions (dissoc (:extensions account) extension-key)] new-extensions (dissoc (:extensions account) extension-key)]
(fx/merge cofx (fx/merge cofx
{:ui/show-confirmation {:title (i18n/label :t/success) {:utils/show-popup {:title (i18n/label :t/success)
:content (i18n/label :t/extension-uninstalled) :content (i18n/label :t/extension-uninstalled)}}
:on-accept nil
:on-cancel nil}}
(remove-from-registry extension-key) (remove-from-registry extension-key)
(accounts.update/account-update {:extensions new-extensions} {})))) (accounts.update/account-update {:extensions new-extensions} {}))))