mirror of
https://github.com/penpot/penpot.git
synced 2025-03-13 08:11:30 -05:00
Add clipboard dummy lightbox.
This commit is contained in:
parent
ffbaf87cf5
commit
bd4b8d3354
2 changed files with 31 additions and 2 deletions
23
src/uxbox/ui/workspace/clipboard.cljs
Normal file
23
src/uxbox/ui/workspace/clipboard.cljs
Normal file
|
@ -0,0 +1,23 @@
|
|||
(ns uxbox.ui.workspace.clipboard
|
||||
(:require [sablono.core :as html :refer-macros [html]]
|
||||
[uxbox.ui.mixins :as mx]
|
||||
[uxbox.ui.lightbox :as lightbox]))
|
||||
|
||||
(defn- clipboard-dialog-render
|
||||
[own]
|
||||
(html
|
||||
[:div.lightbox-body
|
||||
[:div.clipboard-items
|
||||
(for [i (range 5)]
|
||||
[:div {:key i}
|
||||
[:span (str "shape " i)]])]]))
|
||||
|
||||
(def clipboard-dialog
|
||||
(mx/component
|
||||
{:render clipboard-dialog-render
|
||||
:name "clipboard-dialog"
|
||||
:mixins []}))
|
||||
|
||||
(defmethod lightbox/render-lightbox :clipboard
|
||||
[_]
|
||||
(clipboard-dialog))
|
|
@ -5,11 +5,13 @@
|
|||
[uxbox.router :as r]
|
||||
[uxbox.rstore :as rs]
|
||||
[uxbox.data.workspace :as dw]
|
||||
[uxbox.ui.workspace.clipboard]
|
||||
[uxbox.ui.workspace.base :as wb]
|
||||
[uxbox.ui.icons :as i]
|
||||
[uxbox.ui.users :as ui.u]
|
||||
[uxbox.ui.navigation :as nav]
|
||||
[uxbox.ui.mixins :as mx]
|
||||
[uxbox.ui.lightbox :as lightbox]
|
||||
[uxbox.util.math :as mth]))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
@ -48,7 +50,9 @@
|
|||
[own]
|
||||
(let [page (rum/react wb/page-l)
|
||||
flags (rum/react wb/flags-l)
|
||||
toggle #(rs/emit! (dw/toggle-flag %))]
|
||||
toggle #(rs/emit! (dw/toggle-flag %))
|
||||
;; TODO: temporary
|
||||
open-clipboard-dialog #(lightbox/open! :clipboard)]
|
||||
(html
|
||||
[:header#workspace-bar.workspace-bar
|
||||
[:div.main-icon
|
||||
|
@ -85,7 +89,9 @@
|
|||
:on-click (partial toggle :document-history)}
|
||||
i/undo-history]]
|
||||
[:ul.options-btn
|
||||
[:li.tooltip.tooltip-bottom {:alt "Undo (Ctrl + Z)"}
|
||||
[:li.tooltip.tooltip-bottom
|
||||
{:alt "Undo (Ctrl + Z)"
|
||||
:on-click open-clipboard-dialog}
|
||||
i/undo]
|
||||
[:li.tooltip.tooltip-bottom {:alt "Redo (Ctrl + Shift + Z)"}
|
||||
i/redo]]
|
||||
|
|
Loading…
Add table
Reference in a new issue