mirror of
https://github.com/penpot/penpot.git
synced 2025-03-21 12:11:37 -05:00
Add settings lightbox.
This commit is contained in:
parent
f50457db64
commit
e8d56bdd5a
2 changed files with 34 additions and 2 deletions
src/uxbox/ui/workspace
|
@ -6,6 +6,7 @@
|
|||
[uxbox.rstore :as rs]
|
||||
[uxbox.data.workspace :as dw]
|
||||
[uxbox.ui.workspace.clipboard]
|
||||
[uxbox.ui.workspace.settings]
|
||||
[uxbox.ui.workspace.base :as wb]
|
||||
[uxbox.ui.icons :as i]
|
||||
[uxbox.ui.users :as ui.u]
|
||||
|
@ -52,7 +53,8 @@
|
|||
flags (rum/react wb/flags-l)
|
||||
toggle #(rs/emit! (dw/toggle-flag %))
|
||||
;; TODO: temporary
|
||||
open-clipboard-dialog #(lightbox/open! :clipboard)]
|
||||
open-clipboard-dialog #(lightbox/open! :clipboard)
|
||||
open-settings-dialog #(lightbox/open! :settings)]
|
||||
(html
|
||||
[:header#workspace-bar.workspace-bar
|
||||
[:div.main-icon
|
||||
|
@ -93,7 +95,9 @@
|
|||
{:alt "Undo (Ctrl + Z)"
|
||||
:on-click open-clipboard-dialog}
|
||||
i/undo]
|
||||
[:li.tooltip.tooltip-bottom {:alt "Redo (Ctrl + Shift + Z)"}
|
||||
[:li.tooltip.tooltip-bottom
|
||||
{:alt "Redo (Ctrl + Shift + Z)"
|
||||
:on-click open-settings-dialog}
|
||||
i/redo]]
|
||||
[:ul.options-btn
|
||||
;; TODO: refactor
|
||||
|
|
28
src/uxbox/ui/workspace/settings.cljs
Normal file
28
src/uxbox/ui/workspace/settings.cljs
Normal file
|
@ -0,0 +1,28 @@
|
|||
(ns uxbox.ui.workspace.settings
|
||||
(:require [sablono.core :as html :refer-macros [html]]
|
||||
[uxbox.ui.icons :as i]
|
||||
[uxbox.ui.mixins :as mx]
|
||||
[uxbox.ui.lightbox :as lightbox]))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Component
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(defn- settings-dialog-render
|
||||
[own]
|
||||
(html
|
||||
[:div.lightbox-body.settings
|
||||
[:div.settings-list
|
||||
(for [i (range 5)]
|
||||
[:div {:key i}
|
||||
[:span (str "shape " i)]])]]))
|
||||
|
||||
(def settings-dialog
|
||||
(mx/component
|
||||
{:render settings-dialog-render
|
||||
:name "settings-dialog"
|
||||
:mixins []}))
|
||||
|
||||
(defmethod lightbox/render-lightbox :settings
|
||||
[_]
|
||||
(settings-dialog))
|
Loading…
Add table
Reference in a new issue