mirror of
https://github.com/penpot/penpot.git
synced 2026-08-31 09:09:00 +00:00
✨ Add airgapped check to nitrate (#11421)
This commit is contained in:
parent
f06d1df5be
commit
10e40e62a2
@ -43,15 +43,25 @@
|
|||||||
(swap! storage/storage dissoc
|
(swap! storage/storage dissoc
|
||||||
nitrate-entry-pending-popup-key)))
|
nitrate-entry-pending-popup-key)))
|
||||||
|
|
||||||
|
(def ^:private offline-connectivity
|
||||||
|
{:licenses false})
|
||||||
|
|
||||||
|
(defn- air-gapped?
|
||||||
|
[]
|
||||||
|
(contains? cf/flags :air-gapped-conf))
|
||||||
|
|
||||||
(defn show-nitrate-popup
|
(defn show-nitrate-popup
|
||||||
([popup-type] (show-nitrate-popup popup-type {}))
|
([popup-type] (show-nitrate-popup popup-type {}))
|
||||||
([popup-type extra-props]
|
([popup-type extra-props]
|
||||||
(ptk/reify ::show-nitrate-popup
|
(ptk/reify ::show-nitrate-popup
|
||||||
ptk/WatchEvent
|
ptk/WatchEvent
|
||||||
(watch [_ _ _]
|
(watch [_ _ _]
|
||||||
(->> (rp/cmd! ::get-nitrate-connectivity {})
|
(if (air-gapped?)
|
||||||
(rx/map (fn [connectivity]
|
(rx/of (modal/show popup-type (merge offline-connectivity extra-props)))
|
||||||
(modal/show popup-type (merge (or connectivity {}) extra-props)))))))))
|
(->> (rp/cmd! ::get-nitrate-connectivity {})
|
||||||
|
(rx/map (fn [connectivity]
|
||||||
|
(modal/show popup-type
|
||||||
|
(merge (or connectivity {}) extra-props))))))))))
|
||||||
|
|
||||||
(defn build-admin-console-url
|
(defn build-admin-console-url
|
||||||
([path]
|
([path]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user