|
@@ -55,7 +55,7 @@
|
|
|
|
|
|
|
|
(defonce icon-size (if (mobile-util/native-platform?) 26 20))
|
|
(defonce icon-size (if (mobile-util/native-platform?) 26 20))
|
|
|
|
|
|
|
|
-(def block-background-colors
|
|
|
|
|
|
|
+(def built-in-colors
|
|
|
["yellow"
|
|
["yellow"
|
|
|
"red"
|
|
"red"
|
|
|
"pink"
|
|
"pink"
|
|
@@ -64,11 +64,15 @@
|
|
|
"purple"
|
|
"purple"
|
|
|
"gray"])
|
|
"gray"])
|
|
|
|
|
|
|
|
|
|
+(defn built-in-color?
|
|
|
|
|
+ [color]
|
|
|
|
|
+ (some #{color} built-in-colors))
|
|
|
|
|
+
|
|
|
(rum/defc menu-background-color
|
|
(rum/defc menu-background-color
|
|
|
[add-bgcolor-fn rm-bgcolor-fn]
|
|
[add-bgcolor-fn rm-bgcolor-fn]
|
|
|
[:div.flex.flex-row.justify-between.py-1.px-2.items-center
|
|
[:div.flex.flex-row.justify-between.py-1.px-2.items-center
|
|
|
[:div.flex.flex-row.justify-between.flex-1.mx-2.mt-2
|
|
[:div.flex.flex-row.justify-between.flex-1.mx-2.mt-2
|
|
|
- (for [color block-background-colors]
|
|
|
|
|
|
|
+ (for [color built-in-colors]
|
|
|
[:a
|
|
[:a
|
|
|
{:title (t (keyword "color" color))
|
|
{:title (t (keyword "color" color))
|
|
|
:on-click #(add-bgcolor-fn color)}
|
|
:on-click #(add-bgcolor-fn color)}
|
|
@@ -716,6 +720,7 @@
|
|
|
(modal-panel show? modal-panel-content state close-fn false close-btn?)))]))))
|
|
(modal-panel show? modal-panel-content state close-fn false close-btn?)))]))))
|
|
|
|
|
|
|
|
(defn loading
|
|
(defn loading
|
|
|
|
|
+ ([] (loading (t :loading)))
|
|
|
([content] (loading content nil))
|
|
([content] (loading content nil))
|
|
|
([content opts]
|
|
([content opts]
|
|
|
[:div.flex.flex-row.items-center.inline
|
|
[:div.flex.flex-row.items-center.inline
|
|
@@ -723,6 +728,18 @@
|
|
|
(when-not (string/blank? content)
|
|
(when-not (string/blank? content)
|
|
|
[:span.text.pl-2 content])]]))
|
|
[:span.text.pl-2 content])]]))
|
|
|
|
|
|
|
|
|
|
+(defn notify-graph-persist!
|
|
|
|
|
+ []
|
|
|
|
|
+ (notification/show!
|
|
|
|
|
+ (loading (t :graph/persist))
|
|
|
|
|
+ :warning))
|
|
|
|
|
+
|
|
|
|
|
+(defn notify-graph-persist-error!
|
|
|
|
|
+ []
|
|
|
|
|
+ (notification/show!
|
|
|
|
|
+ (t :graph/persist-error)
|
|
|
|
|
+ :error))
|
|
|
|
|
+
|
|
|
(rum/defc rotating-arrow
|
|
(rum/defc rotating-arrow
|
|
|
[collapsed?]
|
|
[collapsed?]
|
|
|
[:span
|
|
[:span
|