Changed to popups for installing and uninstalling extensions
Signed-off-by: Julien Eluard <julien.eluard@gmail.com>
This commit is contained in:
parent
a31d10f6dc
commit
5d549fec12
|
@ -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} {}))))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue