Fixes styles

This commit is contained in:
alonso.torres 2020-04-29 10:03:38 +02:00
parent 7ab3d86bc6
commit 71e30a1607
7 changed files with 35 additions and 21 deletions

View file

@ -1,3 +1,5 @@
.projects-page { .projects-page {
padding: 1rem; padding: 1rem;
height: 100%;
background-color: $color-white;
} }

View file

@ -1,20 +1,13 @@
.recent-files-page { .recent-files-page {
overflow: scroll; overflow: scroll;
height: 100%; height: 100%;
background-color: $color-white;
} }
.recent-files-row { .recent-files-row {
padding: 1rem; padding: 1rem;
border-top: 1px solid $color-gray-10; border-top: 1px solid $color-gray-10;
&:hover {
background-color: $color-white;
.grid-item.project-th {
box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.2);
}
}
&.first { &.first {
border-top: none; border-top: none;
} }

View file

@ -349,11 +349,18 @@
position: relative; position: relative;
width: 100%; width: 100%;
background-color: $color-canvas;
.img-th { .img-th {
height: auto; height: auto;
width: 100%; width: 100%;
} }
svg {
height: 100%;
width: 100%;
}
} }
// MULTISELECT OPTIONS BAR // MULTISELECT OPTIONS BAR

View file

@ -22,13 +22,14 @@
[uxbox.main.ui.shapes.text :as text] [uxbox.main.ui.shapes.text :as text]
[uxbox.main.ui.shapes.group :as group])) [uxbox.main.ui.shapes.group :as group]))
(def ^:private background-color "#E8E9EA") ;; $color-canvas
(mf/defc background (mf/defc background
[] []
[:rect [:rect
{:x 0 :y 0 {:x 0 :y 0
:width "100%" :width "100%"
:height "100%" :height "100%"
:fill "#AFB2BF"}]) :fill background-color}])
(defn- calculate-dimensions (defn- calculate-dimensions
[data] [data]

View file

@ -10,7 +10,8 @@
[okulary.core :as l] [okulary.core :as l]
[potok.core :as ptk] [potok.core :as ptk]
[uxbox.common.uuid :as uuid] [uxbox.common.uuid :as uuid]
[uxbox.util.storage :refer [storage]])) [uxbox.util.storage :refer [storage]]
[uxbox.util.debug :refer [debug? logjs]]))
(enable-console-print!) (enable-console-print!)
@ -34,13 +35,11 @@
:else :else
(str "unk: " (pr-str event)))) (str "unk: " (pr-str event))))
(defonce ^:dynamic *debug* (atom false))
(when *assert* (when *assert*
(defonce debug-subscription (defonce debug-subscription
(as-> stream $ (as-> stream $
(rx/filter ptk/event? $) #_(rx/filter ptk/event? $)
(rx/filter (fn [s] (deref *debug*)) $) (rx/filter (fn [s] (debug? :events)) $)
(rx/subscribe $ (fn [event] (rx/subscribe $ (fn [event]
(println "[stream]: " (repr-event event))))))) (println "[stream]: " (repr-event event)))))))
(defn emit! (defn emit!
@ -62,3 +61,10 @@
([props] ([props]
(emit! #(merge % initial-state props)) (emit! #(merge % initial-state props))
(rx/to-atom store state))) (rx/to-atom store state)))
(defn ^:export dump-state []
(logjs "state" @state))
(defn ^:export dump-objects []
(let [page-id (get @state :current-page-id)]
(logjs "state" (get-in @state [:workspace-data page-id :objects]))))

View file

@ -51,11 +51,14 @@
(mf/defc recent-project (mf/defc recent-project
[{:keys [project files first? locale] :as props}] [{:keys [project files first? locale] :as props}]
(let [project-id (:id project)] (let [project-id (:id project)
team-id (:team-id project)]
[:div.recent-files-row [:div.recent-files-row
{:class-name (when first? "first")} {:class-name (when first? "first")}
[:div.recent-files-row-title [:div.recent-files-row-title
[:h2.recent-files-row-title-name (:name project)] [:h2.recent-files-row-title-name {:on-click #(st/emit! (rt/nav :dashboard-project {:team-id team-id
:project-id project-id}))
:style {:cursor "pointer"}} (:name project)]
[:span.recent-files-row-title-info (str (:file-count project) " files")] [:span.recent-files-row-title-info (str (:file-count project) " files")]
(let [time (-> (:modified-at project) (let [time (-> (:modified-at project)
(dt/timeago {:locale locale}))] (dt/timeago {:locale locale}))]

View file

@ -35,15 +35,18 @@
(declare handle-finish-drawing) (declare handle-finish-drawing)
(declare conditional-align) (declare conditional-align)
(def ^:private default-color "#b1b2b5") ;; $color-gray-20
(def ^:private minimal-shapes (def ^:private minimal-shapes
[{:type :rect [{:type :rect
:name "Rect" :name "Rect"
:stroke-color "#000000" :fill-color default-color
:stroke-alignment :center} :stroke-alignment :center}
{:type :image} {:type :image}
{:type :icon} {:type :icon}
{:type :circle {:type :circle
:name "Circle"} :name "Circle"
:fill-color default-color}
{:type :path {:type :path
:name "Path" :name "Path"
:stroke-style :solid :stroke-style :solid
@ -312,10 +315,9 @@
[:rect.main {:x x :y y [:rect.main {:x x :y y
:width width :width width
:height height :height height
:stroke-dasharray (str (/ 5.0 zoom) "," (/ 5 zoom)) :style {:stroke "#1FDEA7"
:style {:stroke "#333"
:fill "transparent" :fill "transparent"
:stroke-opacity "1"}}]]))) :stroke-width "1"}}]])))
(mf/defc path-draw-area (mf/defc path-draw-area
[{:keys [shape] :as props}] [{:keys [shape] :as props}]