mirror of
https://github.com/penpot/penpot.git
synced 2025-03-25 06:01:46 -05:00
Merge pull request #5603 from penpot/palba-bugfixing-04
Palba bugfixing 04
This commit is contained in:
commit
8dd0a4f275
3 changed files with 31 additions and 2 deletions
26
frontend/src/app/main/data/workspace/history.cljs
Normal file
26
frontend/src/app/main/data/workspace/history.cljs
Normal file
|
@ -0,0 +1,26 @@
|
|||
;; This Source Code Form is subject to the terms of the Mozilla Public
|
||||
;; License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
;;
|
||||
;; Copyright (c) KALEIDOS INC
|
||||
|
||||
(ns app.main.data.workspace.history
|
||||
(:require
|
||||
[app.main.data.workspace.common :as dwc]
|
||||
[app.main.data.workspace.layout :as dwl]
|
||||
[beicon.v2.core :as rx]
|
||||
[potok.v2.core :as ptk]))
|
||||
|
||||
|
||||
(defn initialize-history
|
||||
[]
|
||||
(ptk/reify ::initialize-history
|
||||
ptk/WatchEvent
|
||||
(watch [_ _ stream]
|
||||
(let [clear-history-mode #(dwl/remove-layout-flag :document-history)]
|
||||
(rx/merge
|
||||
(rx/of (dwl/toggle-layout-flag :document-history))
|
||||
(->> stream
|
||||
(rx/filter dwc/interrupt?)
|
||||
(rx/take 1)
|
||||
(rx/map clear-history-mode)))))))
|
|
@ -209,7 +209,9 @@
|
|||
(open-permissions-dialog plugin))
|
||||
(st/emit! (notif/error (tr "dashboard.plugins.parse-error")))))
|
||||
(fn [_]
|
||||
(st/emit! (notif/error (tr "dashboard.plugins.bad-url"))))))))))
|
||||
(st/emit! (notif/error (tr "dashboard.plugins.bad-url"))))))
|
||||
(binding [storage/*sync* true]
|
||||
(swap! storage/session dissoc :plugin-url))))))
|
||||
|
||||
(defn use-templates-import
|
||||
[can-edit? template-url default-project-id]
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
[app.main.data.shortcuts :as scd]
|
||||
[app.main.data.workspace :as dw]
|
||||
[app.main.data.workspace.drawing.common :as dwc]
|
||||
[app.main.data.workspace.history :as dwh]
|
||||
[app.main.data.workspace.shortcuts :as sc]
|
||||
[app.main.refs :as refs]
|
||||
[app.main.store :as st]
|
||||
|
@ -197,7 +198,7 @@
|
|||
(st/emit! :interrupt
|
||||
(dw/clear-edition-mode)))
|
||||
|
||||
(st/emit! (-> (dw/toggle-layout-flag :document-history)
|
||||
(st/emit! (-> (dwh/initialize-history)
|
||||
(vary-meta assoc ::ev/origin "workspace-header")))))
|
||||
|
||||
open-share-dialog
|
||||
|
|
Loading…
Add table
Reference in a new issue