0
Fork 0
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:
Andrey Antukh 2025-01-20 15:36:19 +01:00 committed by GitHub
commit 8dd0a4f275
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 31 additions and 2 deletions

View 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)))))))

View file

@ -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]

View file

@ -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