Browse Source

improve(mobile): WIP polish ui details

charlie 3 years ago
parent
commit
0777a11df4

+ 3 - 2
src/main/frontend/components/block.cljs

@@ -1711,13 +1711,14 @@
   (let [doc-mode? (state/sub :document/mode?)
         control-show? (util/react *control-show?)
         ref? (:ref? config)
-        empty-content? (block-content-empty? block)]
+        empty-content? (block-content-empty? block)
+        fold-button-right? (state/enable-fold-button-right?)]
     [:div.mr-1.flex.flex-row.items-center.sm:mr-2
      {:style {:height 24
               :margin-top 0
               :float "left"}}
 
-     (when has-child?
+     (when (or (not fold-button-right?) has-child?)
        [:a.block-control
         {:id       (str "control-" uuid)
          :on-click (fn [event]

+ 1 - 5
src/main/frontend/components/block.css

@@ -1,6 +1,4 @@
 .block-content-wrapper {
-  @apply border border-red-400;
-
   /* 38px is the width of block-control */
   width: calc(100% - 22px);
 
@@ -11,8 +9,6 @@
 }
 
 .block-content {
-  @apply border border-blue-400;
-
   min-height: 24px;
   max-width: 100%;
   overflow: initial;
@@ -328,7 +324,7 @@
 
 .ls-block {
   @apply border border-dashed border-green-600;
-  
+
   position: relative;
   min-height: 24px;
   padding: 2px 0;

+ 1 - 1
src/main/frontend/components/sidebar.css

@@ -375,7 +375,7 @@
   }
 
   &.is-open {
-    width: 100% !important;
+    width: 100%;
 
     .left-sidebar-inner {
       transform: translate3d(0, 0, 0);

+ 6 - 2
src/main/frontend/components/theme.css

@@ -116,8 +116,8 @@ html.is-resizing-buf {
 
 main.ls-fold-button-on-right {
   #main-content-container {
-    padding-right:12px;
-    padding-left: 12px;
+    padding-right:15px;
+    padding-left: 15px;
     
     .page-blocks-inner {
       margin-left: 0 !important;
@@ -126,6 +126,10 @@ main.ls-fold-button-on-right {
 
   .cp__sidebar-left-layout {
     width: 15px;
+
+    &.is-open {
+      width: 100%;
+    }
   }
 
   .ls-block {

+ 2 - 1
src/main/frontend/state.cljs

@@ -566,7 +566,8 @@ Similar to re-frame subscriptions"
 
 (defn enable-fold-button-right?
   []
-  (true? (:feature/enable-fold-button-on-right? (sub-config))))
+  (and (mobile-util/native-platform?)
+       (true? (:feature/enable-fold-button-on-right? (sub-config)))))
 
 (defn enable-journals?
   ([]