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