From 10e40e62a249f6f28d778244768eff5e5bf9c309 Mon Sep 17 00:00:00 2001 From: Pablo Alba Date: Fri, 28 Aug 2026 13:58:18 +0200 Subject: [PATCH] :sparkles: Add airgapped check to nitrate (#11421) --- frontend/src/app/main/data/nitrate.cljs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/data/nitrate.cljs b/frontend/src/app/main/data/nitrate.cljs index 2addcc0429..4be62a2cbf 100644 --- a/frontend/src/app/main/data/nitrate.cljs +++ b/frontend/src/app/main/data/nitrate.cljs @@ -43,15 +43,25 @@ (swap! storage/storage dissoc nitrate-entry-pending-popup-key))) +(def ^:private offline-connectivity + {:licenses false}) + +(defn- air-gapped? + [] + (contains? cf/flags :air-gapped-conf)) + (defn show-nitrate-popup ([popup-type] (show-nitrate-popup popup-type {})) ([popup-type extra-props] (ptk/reify ::show-nitrate-popup ptk/WatchEvent (watch [_ _ _] - (->> (rp/cmd! ::get-nitrate-connectivity {}) - (rx/map (fn [connectivity] - (modal/show popup-type (merge (or connectivity {}) extra-props))))))))) + (if (air-gapped?) + (rx/of (modal/show popup-type (merge offline-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 ([path]