🎉 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

@ -7,7 +7,7 @@
(ns uxbox.builtins.icons
(: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 actions (icon-xref :actions))
@ -108,7 +108,7 @@
(def recent (icon-xref :recent))
(def loader-pencil
(html
(mf/html
[:svg
{:viewBox "0 0 677.34762 182.15429"
:height "182"

View file

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