0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 15:39:50 -05:00

Adapt workspace main menu to binfile-v3 config flag

This commit is contained in:
Andrey Antukh 2024-11-14 12:00:11 +01:00
parent 2d1158efa3
commit 15d3107c48

View file

@ -593,13 +593,14 @@
(for [sc (scd/split-sc (sc/get-tooltip :export-shapes))] (for [sc (scd/split-sc (sc/get-tooltip :export-shapes))]
[:span {:class (stl/css :shortcut-key) :key sc} sc])]] [:span {:class (stl/css :shortcut-key) :key sc} sc])]]
(when-not (contains? cf/flags :export-file-v3)
[:> dropdown-menu-item* {:class (stl/css :submenu-item) [:> dropdown-menu-item* {:class (stl/css :submenu-item)
:on-click on-export-file :on-click on-export-file
:on-key-down on-export-file-key-down :on-key-down on-export-file-key-down
:data-format "binfile-v1" :data-format "binfile-v1"
:id "file-menu-binary-file"} :id "file-menu-binary-file"}
[:span {:class (stl/css :item-name)} [:span {:class (stl/css :item-name)}
(tr "dashboard.download-binary-file")]] (tr "dashboard.download-binary-file")]])
(when (contains? cf/flags :export-file-v3) (when (contains? cf/flags :export-file-v3)
[:> dropdown-menu-item* {:class (stl/css :submenu-item) [:> dropdown-menu-item* {:class (stl/css :submenu-item)
@ -608,15 +609,16 @@
:data-format "binfile-v3" :data-format "binfile-v3"
:id "file-menu-binary-file"} :id "file-menu-binary-file"}
[:span {:class (stl/css :item-name)} [:span {:class (stl/css :item-name)}
(tr "dashboard.download-binary-file-v3")]]) (tr "dashboard.download-binary-file")]])
(when-not (contains? cf/flags :export-file-v3)
[:> dropdown-menu-item* {:class (stl/css :submenu-item) [:> dropdown-menu-item* {:class (stl/css :submenu-item)
:on-click on-export-file :on-click on-export-file
:on-key-down on-export-file-key-down :on-key-down on-export-file-key-down
:data-format "legacy-zip" :data-format "legacy-zip"
:id "file-menu-standard-file"} :id "file-menu-standard-file"}
[:span {:class (stl/css :item-name)} [:span {:class (stl/css :item-name)}
(tr "dashboard.download-standard-file")]] (tr "dashboard.download-standard-file")]])
(when (seq frames) (when (seq frames)
[:> dropdown-menu-item* {:class (stl/css :submenu-item) [:> dropdown-menu-item* {:class (stl/css :submenu-item)