Browse Source

Merge branch 'master' into gesture-support-on-block

llcc 3 years ago
parent
commit
35364765fb

+ 10 - 12
src/main/frontend/components/header.css

@@ -1,7 +1,7 @@
 .cp__header {
   @apply shadow z-10;
   -webkit-app-region: drag;
-  
+
   padding-top: var(--ls-headbar-inner-top-padding);
   height: calc(var(--ls-headbar-height) + var(--ls-headbar-inner-top-padding));
   display: flex;
@@ -16,7 +16,6 @@
   user-select: none;
   line-height: 1;
   white-space: nowrap;
-  background-color: var(--ls-primary-background-color);
 
   > .l {
     width: var(--ls-left-sidebar-width);
@@ -207,7 +206,6 @@ a.button {
 }
 
 html.is-ios.is-safari {
-    
   .cp__header {
     background-color: var(--ls-primary-background-color);
   }
@@ -241,7 +239,7 @@ html.is-native-ipad {
              margin-top: 24px;
          }
     }
-    
+
     .cp__header > .r {
         display: flex;
     }
@@ -250,11 +248,11 @@ html.is-native-ipad {
 html.is-native-ipad {
     --ls-headbar-inner-top-padding: 0px;
     --ls-headbar-height: 4rem;
-    
+
     .cp__header {
       background-color: transparent !important;
       display: flex;
-      
+
       > .l {
         /* background-color: var(--ls-primary-background-color); */
         padding-top: 20px;
@@ -269,7 +267,7 @@ html.is-native-ipad {
         align-items: center;
       }
     }
-    
+
     .left-sidebar-inner  {
         > .wrap {
             padding-top: 20px;
@@ -291,7 +289,7 @@ html.is-native-ipad {
                 width: 12px;
                 height: 40vh;
             }
-            
+
             .resizer:hover {
                 background-color: var(--ls-guideline-color, #ddd);
             }
@@ -311,11 +309,11 @@ html.is-native-iphone {
             padding-bottom: 12px;
         }
     }
-    
+
     .ui__notifications {
         top: calc(var(--ls-headbar-height) + var(--ls-headbar-inner-top-padding) - 0.3rem);
     }
-    
+
     @media (orientation: landscape) {
         --ls-headbar-inner-top-padding: 8px;
         --ls-headbar-height: 2.5rem;
@@ -327,7 +325,7 @@ html.is-native-iphone {
 }
 
 html.is-native-iphone-without-notch {
-    
+
     --ls-headbar-inner-top-padding: 15px;
     --ls-headbar-height: 2.5rem;
 
@@ -335,7 +333,7 @@ html.is-native-iphone-without-notch {
 
         --ls-headbar-inner-top-padding: 0px;
         --ls-headbar-height: 2.5rem;
-     
+
         .cp__header {
             @apply shadow z-10;
         }

+ 2 - 1
src/main/frontend/mobile/footer.cljs

@@ -46,7 +46,8 @@
 
 (rum/defc footer < rum/reactive
   []
-  (when (and (state/sub :mobile/show-tabbar?)
+  (when (and (state/mobile?)
+             (state/sub :mobile/show-tabbar?)
              (state/get-current-repo))
     [:div.cp__footer.w-full.bottom-0.justify-between
      (audio-record-cp)

+ 7 - 3
src/main/frontend/state.cljs

@@ -58,7 +58,7 @@
      :modal/close-btn?                      nil
      :modal/subsets                         []
 
-     
+
      ;; right sidebar
      :ui/fullscreen?                        false
      :ui/settings-open?                     false
@@ -149,7 +149,7 @@
      :mobile/show-toolbar?                  false
      ;;; toolbar icon doesn't update correctly when clicking after separate it from box,
      ;;; add a random in (<= 1000000) to observer its update
-     :mobile/toolbar-update-observer        0 
+     :mobile/toolbar-update-observer        0
      :mobile/show-tabbar?                   false
 
      ;; plugin
@@ -1196,9 +1196,13 @@
     (set-state! :ui/shortcut-tooltip? (not mode))
     (storage/set :ui/shortcut-tooltip? (not mode))))
 
+(defn mobile?
+  []
+  (or (util/mobile?) (mobile-util/native-platform?)))
+
 (defn enable-tooltip?
   []
-  (if (or (util/mobile?) (mobile-util/native-platform?))
+  (if (mobile?)
     false
     (get (get (sub-config) (get-current-repo))
          :ui/enable-tooltip?