mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Use strings for layout ids instead keywords.
This commit is contained in:
parent
a522682ee4
commit
098d38e079
3 changed files with 29 additions and 24 deletions
|
@ -28,11 +28,11 @@
|
|||
{:name [sc/required sc/string]
|
||||
:width [sc/required sc/integer]
|
||||
:height [sc/required sc/integer]
|
||||
:layout [sc/keyword]})
|
||||
:layout [sc/required sc/string]})
|
||||
|
||||
(def ^:static +create-page-schema+
|
||||
{:name [sc/required sc/string]
|
||||
:layout [sc/keyword]
|
||||
:layout [sc/required sc/string]
|
||||
:width [sc/required sc/integer]
|
||||
:height [sc/required sc/integer]
|
||||
:project [sc/required sc/uuid]})
|
||||
|
@ -41,7 +41,7 @@
|
|||
{:name [sc/required sc/string]
|
||||
:width [sc/required sc/integer]
|
||||
:height [sc/required sc/integer]
|
||||
:layout [sc/keyword]})
|
||||
:layout [sc/required sc/string]})
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Helpers
|
||||
|
|
|
@ -32,28 +32,33 @@
|
|||
(def +ordering-options+ {:name "ds.project-ordering.by-name"
|
||||
:created "ds.project-ordering.by-creation-date"})
|
||||
|
||||
(def +layouts+ {:mobile {:name "Mobile"
|
||||
:id "mobile"
|
||||
:width 320
|
||||
:height 480}
|
||||
:tablet {:name "Tablet"
|
||||
:id "tablet"
|
||||
:width 1024
|
||||
:height 768}
|
||||
:notebook {:name "Notebook"
|
||||
:id "notebook"
|
||||
:width 1366
|
||||
:height 768}
|
||||
:desktop {:name "Desktop"
|
||||
:id "desktop"
|
||||
:width 1920
|
||||
:height 1080}})
|
||||
(def +layouts+
|
||||
{"mobile"
|
||||
{:name "Mobile"
|
||||
:id "mobile"
|
||||
:width 320
|
||||
:height 480}
|
||||
"tablet"
|
||||
{:name "Tablet"
|
||||
:id "tablet"
|
||||
:width 1024
|
||||
:height 768}
|
||||
"notebook"
|
||||
{:name "Notebook"
|
||||
:id "notebook"
|
||||
:width 1366
|
||||
:height 768}
|
||||
"desktop"
|
||||
{:name "Desktop"
|
||||
:id "desktop"
|
||||
:width 1920
|
||||
:height 1080}})
|
||||
|
||||
(def ^:static ^:private
|
||||
+project-defaults+ {:name ""
|
||||
:width 1920
|
||||
:height 1080
|
||||
:layout :desktop})
|
||||
:layout "desktop"})
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Top Menu
|
||||
|
|
|
@ -167,10 +167,10 @@
|
|||
:on-change #(update-size :height %)}]]
|
||||
|
||||
[:div.input-radio.radio-primary
|
||||
(layout-input local page :mobile)
|
||||
(layout-input local page :tablet)
|
||||
(layout-input local page :notebook)
|
||||
(layout-input local page :desktop)]
|
||||
(layout-input local page "mobile")
|
||||
(layout-input local page "tablet")
|
||||
(layout-input local page "notebook")
|
||||
(layout-input local page "desktop")]
|
||||
|
||||
(when valid?
|
||||
[:input#project-btn.btn-primary
|
||||
|
|
Loading…
Add table
Reference in a new issue