Merge pull request #2223 from penpot/niwinz-public-uri-improvements

 Improve public-uri handling
This commit is contained in:
Alejandro 2022-09-06 10:43:30 +02:00 committed by GitHub
commit ad32512980
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 73 additions and 58 deletions

View file

@ -8,7 +8,7 @@
(:refer-clojure :exclude [resolve])
(:require
[app.common.uri :as u]
[app.config :as cfg]
[app.config :as cf]
[app.util.browser-history :as bhistory]
[app.util.dom :as dom]
[app.util.timers :as ts]
@ -117,8 +117,7 @@
(let [router (:router state)
path (resolve router rname path-params query-params)
name (or name "_blank")
uri (-> (u/uri cfg/public-uri)
(assoc :fragment path))]
uri (assoc @cf/public-uri :fragment path)]
(dom/open-new-window uri name nil)))))
(defn nav-back

View file

@ -8,8 +8,6 @@
"A lightweight layer on top of webworkers api."
(:require
[app.common.uuid :as uuid]
[app.util.globals :refer [global]]
[app.util.object :as obj]
[app.worker.messages :as wm]
[beicon.core :as rx]))
@ -83,11 +81,6 @@
(.addEventListener instance "message" handle-message)
(.addEventListener instance "error" handle-error)
(ask! worker
{:cmd :configure
:params
{"penpotPublicURI" (obj/get global "penpotPublicURI")}})
worker))
(defn- handle-response