🎉 Add loader to workspace.

This commit is contained in:
Andrey Antukh 2020-04-28 09:46:38 +02:00 committed by Alonso Torres
parent 9b3879b3cf
commit 511335ba33
4 changed files with 23 additions and 5 deletions

View file

@ -922,6 +922,7 @@
}, },
"unused" : true "unused" : true
}, },
"workspace.options.font-options.decoration": "Decoration", "workspace.options.font-options.decoration": "Decoration",
"workspace.options.font-options.none": "None", "workspace.options.font-options.none": "None",
"workspace.options.font-options.underline": "Underline", "workspace.options.font-options.underline": "Underline",

View file

@ -46,6 +46,17 @@
} }
} }
.workspace-loader {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
svg#loader-pencil {
fill: $color-gray-50;
}
}
.workspace-content { .workspace-content {
background-color: $color-canvas; background-color: $color-canvas;
display: flex; display: flex;

View file

@ -7,7 +7,7 @@
(ns uxbox.builtins.icons (ns uxbox.builtins.icons
(:require-macros [uxbox.builtins.icons :refer [icon-xref]]) (:require-macros [uxbox.builtins.icons :refer [icon-xref]])
(:require [rumext.alpha :as mf :refer-macros [html]])) (:require [rumext.alpha :as mf]))
(def action (icon-xref :action)) (def action (icon-xref :action))
(def actions (icon-xref :actions)) (def actions (icon-xref :actions))
@ -108,7 +108,7 @@
(def recent (icon-xref :recent)) (def recent (icon-xref :recent))
(def loader-pencil (def loader-pencil
(html (mf/html
[:svg [:svg
{:viewBox "0 0 677.34762 182.15429" {:viewBox "0 0 677.34762 182.15429"
:height "182" :height "182"

View file

@ -85,6 +85,11 @@
:file file :file file
:layout layout}])) :layout layout}]))
(mf/defc workspace-loader
[]
[:div.workspace-loader
i/loader-pencil])
(mf/defc workspace (mf/defc workspace
[{:keys [project-id file-id page-id] :as props}] [{:keys [project-id file-id page-id] :as props}]
(mf/use-effect #(st/emit! dw/initialize-layout)) (mf/use-effect #(st/emit! dw/initialize-layout))
@ -107,9 +112,10 @@
[:& messages] [:& messages]
[:& context-menu] [:& context-menu]
(when (and (and file project) (if (and (and file project)
(:initialized file)) (:initialized file))
[:& workspace-page {:file file [:& workspace-page {:file file
:project project :project project
:layout layout :layout layout
:page-id page-id}])])) :page-id page-id}]
[:& workspace-loader])]))