enhance(electron): close notification message when test proxy setting

This commit is contained in:
Andelf
2023-09-15 17:52:55 +08:00
parent 8f5b1da36f
commit af2d00ac88

View File

@@ -447,9 +447,10 @@
(-> (p/let [result (ipc/ipc :testProxyUrl val opts)]
(js->clj result :keywordize-keys true))
(p/then (fn [{:keys [code response-ms]}]
(notification/clear! :proxy-net-check)
(notification/show! (str "Success! Status " code " in " response-ms "ms.") :success)))
(p/catch (fn [e]
(notification/show! (str e) :error)))
(notification/show! (str e) :error false :proxy-net-check)))
(p/finally (fn [] (set-testing?! false)))))))]
[:p.pt-2