mirror of
https://github.com/penpot/penpot.git
synced 2025-05-13 20:06:38 +02:00
Merge branch 'staging' into develop
This commit is contained in:
commit
e55e5aa168
7 changed files with 21 additions and 9 deletions
|
@ -123,7 +123,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.breadcrumb {
|
.breadcrumb, .current-frame {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
|
@ -148,6 +148,10 @@
|
||||||
color: $color-white;
|
color: $color-white;
|
||||||
margin-right: $x-small;
|
margin-right: $x-small;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.counters {
|
||||||
|
color: $color-gray-20;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -240,7 +240,7 @@
|
||||||
pparams (:path-params route)
|
pparams (:path-params route)
|
||||||
qparams (:query-params route)
|
qparams (:query-params route)
|
||||||
|
|
||||||
page-id (:page-id pparams)
|
page-id (:page-id qparams)
|
||||||
index (:index qparams)
|
index (:index qparams)
|
||||||
|
|
||||||
total (count (get-in state [:viewer :pages page-id :frames]))]
|
total (count (get-in state [:viewer :pages page-id :frames]))]
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
(defn end-path-event? [event]
|
(defn end-path-event? [event]
|
||||||
(or (= (ptk/type event) ::common/finish-path)
|
(or (= (ptk/type event) ::common/finish-path)
|
||||||
(= (ptk/type event) :esc-pressed)
|
(= (ptk/type event) :app.main.data.workspace.path.shortcuts/esc-pressed)
|
||||||
(= :app.main.data.workspace.common/clear-edition-mode (ptk/type event))
|
(= :app.main.data.workspace.common/clear-edition-mode (ptk/type event))
|
||||||
(= :app.main.data.workspace/finalize-page (ptk/type event))
|
(= :app.main.data.workspace/finalize-page (ptk/type event))
|
||||||
(= event :interrupt) ;; ESC
|
(= event :interrupt) ;; ESC
|
||||||
|
|
|
@ -80,8 +80,8 @@
|
||||||
|
|
||||||
(mf/use-effect
|
(mf/use-effect
|
||||||
(mf/deps width height)
|
(mf/deps width height)
|
||||||
#(dom/set-page-style {:size (str (mth/round width) "px "
|
#(dom/set-page-style {:size (str (mth/ceil (+ width padding padding)) "px "
|
||||||
(mth/round height) "px")}))
|
(mth/ceil (+ height padding padding)) "px")}))
|
||||||
|
|
||||||
[:& (mf/provider embed/context) {:value true}
|
[:& (mf/provider embed/context) {:value true}
|
||||||
[:svg {:id "screenshot"
|
[:svg {:id "screenshot"
|
||||||
|
|
|
@ -86,6 +86,7 @@
|
||||||
:handoff-layout (= section :handoff))}
|
:handoff-layout (= section :handoff))}
|
||||||
|
|
||||||
[:& header {:project project
|
[:& header {:project project
|
||||||
|
:index index
|
||||||
:file file
|
:file file
|
||||||
:page page
|
:page page
|
||||||
:frame frame
|
:frame frame
|
||||||
|
|
|
@ -71,11 +71,12 @@
|
||||||
[:span.btn-text-dark {:on-click go-to-workspace} (tr "labels.edit-file")])]))
|
[:span.btn-text-dark {:on-click go-to-workspace} (tr "labels.edit-file")])]))
|
||||||
|
|
||||||
(mf/defc header-sitemap
|
(mf/defc header-sitemap
|
||||||
[{:keys [project file page frame] :as props}]
|
[{:keys [project file page frame index] :as props}]
|
||||||
(let [project-name (:name project)
|
(let [project-name (:name project)
|
||||||
file-name (:name file)
|
file-name (:name file)
|
||||||
page-name (:name page)
|
page-name (:name page)
|
||||||
frame-name (:name frame)
|
frame-name (:name frame)
|
||||||
|
total (count (:frames page))
|
||||||
|
|
||||||
toggle-thumbnails
|
toggle-thumbnails
|
||||||
(fn []
|
(fn []
|
||||||
|
@ -111,10 +112,12 @@
|
||||||
{:on-click toggle-thumbnails}
|
{:on-click toggle-thumbnails}
|
||||||
[:span.label "/"]
|
[:span.label "/"]
|
||||||
[:span.label frame-name]
|
[:span.label frame-name]
|
||||||
[:span.icon i/arrow-down]]]))
|
[:span.icon i/arrow-down]
|
||||||
|
[:span.counters (str (inc index) " / " total)]]]))
|
||||||
|
|
||||||
|
|
||||||
(mf/defc header
|
(mf/defc header
|
||||||
[{:keys [project file page frame zoom section permissions]}]
|
[{:keys [project file page frame zoom section permissions index]}]
|
||||||
(let [go-to-dashboard
|
(let [go-to-dashboard
|
||||||
(st/emitf (dv/go-to-dashboard))
|
(st/emitf (dv/go-to-dashboard))
|
||||||
|
|
||||||
|
@ -129,7 +132,7 @@
|
||||||
;; If the user doesn't have permission we disable the link
|
;; If the user doesn't have permission we disable the link
|
||||||
:style {:pointer-events (when-not permissions "none")}} i/logo-icon]]
|
:style {:pointer-events (when-not permissions "none")}} i/logo-icon]]
|
||||||
|
|
||||||
[:& header-sitemap {:project project :file file :page page :frame frame}]
|
[:& header-sitemap {:project project :file file :page page :frame frame :index index}]
|
||||||
|
|
||||||
[:div.mode-zone
|
[:div.mode-zone
|
||||||
[:button.mode-zone-button.tooltip.tooltip-bottom
|
[:button.mode-zone-button.tooltip.tooltip-bottom
|
||||||
|
|
|
@ -55,6 +55,10 @@
|
||||||
(.insertAdjacentHTML head "beforeend"
|
(.insertAdjacentHTML head "beforeend"
|
||||||
(str "<style>"
|
(str "<style>"
|
||||||
" @page {" style-str "}"
|
" @page {" style-str "}"
|
||||||
|
" html, body {" ; Fix issue having Chromium to add random 1px marging at the bottom
|
||||||
|
" overflow: hidden;" ; https://github.com/puppeteer/puppeteer/issues/2278#issuecomment-410381934
|
||||||
|
" font-size: 0;"
|
||||||
|
" }"
|
||||||
"</style>"))))
|
"</style>"))))
|
||||||
|
|
||||||
(defn get-element-by-class
|
(defn get-element-by-class
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue