mirror of
https://github.com/penpot/penpot.git
synced 2025-07-23 04:27:18 +02:00
Merge pull request #2223 from penpot/niwinz-public-uri-improvements
✨ Improve public-uri handling
This commit is contained in:
commit
ad32512980
16 changed files with 73 additions and 58 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue