0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

Add download lightbox to view mode

This commit is contained in:
mathieu.brunot 2019-02-20 03:05:22 +01:00
parent cc2d0247ee
commit 2662f9f72c
No known key found for this signature in database
GPG key ID: 81584BEAF692D7E0

View file

@ -9,6 +9,7 @@
(:require [potok.core :as ptk]
[uxbox.builtins.icons :as i]
[rumext.core :as mx :include-macros true]
[uxbox.main.data.lightbox :as udl]
[uxbox.view.store :as st]
[uxbox.view.data.viewer :as dv]))
@ -17,7 +18,8 @@
(let [toggle-sitemap #(st/emit! (dv/toggle-flag :sitemap))
toggle-interactions #(st/emit! (dv/toggle-flag :interactions))
sitemap? (contains? flags :sitemap)
interactions? (contains? flags :interactions)]
interactions? (contains? flags :interactions)
on-download #(udl/open! :download)]
[:div.view-nav
[:ul.view-options-btn
[:li.tooltip.tooltip-right
@ -33,4 +35,6 @@
[:li.tooltip.tooltip-right
{:alt "share"} i/export]
[:li.tooltip.tooltip-right
{:alt "save SVG"} i/save]]]))
{:alt "save SVG"
:on-click on-download}
i/save]]]))