|
|
@@ -12,16 +12,19 @@
|
|
|
|
|
|
(rum/defc modal < rum/reactive
|
|
|
[presenting-element]
|
|
|
- (let [{:keys [open? block]} (rum/react state/*modal-data)
|
|
|
+ (let [{:keys [open? block mode]} (rum/react state/*modal-data)
|
|
|
show-action-bar? (fstate/sub :mobile/show-action-bar?)]
|
|
|
(ion/modal
|
|
|
- {:isOpen (boolean open?)
|
|
|
- :presenting-element presenting-element
|
|
|
- :onDidDismiss (fn [] (state/set-modal! nil))
|
|
|
- :expand "block"}
|
|
|
- (ion/content {:class "ion-padding scrolling"}
|
|
|
- (ui/classic-app-container-wrap
|
|
|
- (page/page-cp (db/entity [:block/uuid (:block/uuid block)])))
|
|
|
+ (cond-> {:isOpen (boolean open?)
|
|
|
+ :presenting-element presenting-element
|
|
|
+ :onDidDismiss (fn [] (state/set-modal! nil))
|
|
|
+ :expand "block"}
|
|
|
+
|
|
|
+ (string? mode)
|
|
|
+ (assoc :mode mode))
|
|
|
+ (ion/content {:class "ion-padding scrolling"}
|
|
|
+ (ui/classic-app-container-wrap
|
|
|
+ (page/page-cp (db/entity [:block/uuid (:block/uuid block)])))
|
|
|
(mobile-bar/mobile-bar)
|
|
|
(when show-action-bar?
|
|
|
(action-bar/action-bar))))))
|