mirror of
https://github.com/penpot/penpot.git
synced 2026-09-14 07:59:36 +00:00
Add settings lightbox.
This commit is contained in:
parent
f50457db64
commit
e8d56bdd5a
@ -6,6 +6,7 @@
|
|||||||
[uxbox.rstore :as rs]
|
[uxbox.rstore :as rs]
|
||||||
[uxbox.data.workspace :as dw]
|
[uxbox.data.workspace :as dw]
|
||||||
[uxbox.ui.workspace.clipboard]
|
[uxbox.ui.workspace.clipboard]
|
||||||
|
[uxbox.ui.workspace.settings]
|
||||||
[uxbox.ui.workspace.base :as wb]
|
[uxbox.ui.workspace.base :as wb]
|
||||||
[uxbox.ui.icons :as i]
|
[uxbox.ui.icons :as i]
|
||||||
[uxbox.ui.users :as ui.u]
|
[uxbox.ui.users :as ui.u]
|
||||||
@ -52,7 +53,8 @@
|
|||||||
flags (rum/react wb/flags-l)
|
flags (rum/react wb/flags-l)
|
||||||
toggle #(rs/emit! (dw/toggle-flag %))
|
toggle #(rs/emit! (dw/toggle-flag %))
|
||||||
;; TODO: temporary
|
;; TODO: temporary
|
||||||
open-clipboard-dialog #(lightbox/open! :clipboard)]
|
open-clipboard-dialog #(lightbox/open! :clipboard)
|
||||||
|
open-settings-dialog #(lightbox/open! :settings)]
|
||||||
(html
|
(html
|
||||||
[:header#workspace-bar.workspace-bar
|
[:header#workspace-bar.workspace-bar
|
||||||
[:div.main-icon
|
[:div.main-icon
|
||||||
@ -93,7 +95,9 @@
|
|||||||
{:alt "Undo (Ctrl + Z)"
|
{:alt "Undo (Ctrl + Z)"
|
||||||
:on-click open-clipboard-dialog}
|
:on-click open-clipboard-dialog}
|
||||||
i/undo]
|
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]]
|
i/redo]]
|
||||||
[:ul.options-btn
|
[:ul.options-btn
|
||||||
;; TODO: refactor
|
;; 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…
x
Reference in New Issue
Block a user