mirror of
https://github.com/penpot/penpot.git
synced 2025-07-21 09:17:16 +02:00
✨ Add support for optional human challenge
This commit is contained in:
parent
b2010e5fd8
commit
3f34aa92fa
5 changed files with 62 additions and 2 deletions
|
@ -13,8 +13,10 @@
|
|||
[app.main.data.events :as ev]
|
||||
[app.util.browser-history :as bhistory]
|
||||
[app.util.dom :as dom]
|
||||
[app.util.globals :as globals]
|
||||
[app.util.timers :as ts]
|
||||
[beicon.v2.core :as rx]
|
||||
[cuerdas.core :as str]
|
||||
[goog.events :as e]
|
||||
[potok.v2.core :as ptk]
|
||||
[reitit.core :as r]))
|
||||
|
@ -143,6 +145,20 @@
|
|||
(= (.-hostname location) (:host referrer)))
|
||||
(nav-back))))
|
||||
|
||||
(defn nav-raw
|
||||
[href]
|
||||
(ptk/reify ::nav-raw
|
||||
ptk/EffectEvent
|
||||
(effect [_ _ _]
|
||||
(set! (.-href globals/location) href))))
|
||||
|
||||
(defn get-current-path
|
||||
[]
|
||||
(let [hash (.-hash globals/location)]
|
||||
(if (str/starts-with? hash "#")
|
||||
(subs hash 1)
|
||||
hash)))
|
||||
|
||||
;; --- History API
|
||||
|
||||
(defn initialize-history
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue