Parcourir la source

Quick patch for mobile desktop switch for FM

Toby Chui il y a 2 ans
Parent
commit
e9752616b8
2 fichiers modifiés avec 5 ajouts et 5 suppressions
  1. 1 1
      file_system.go
  2. 4 4
      web/SystemAO/file_system/file_explorer.html

+ 1 - 1
file_system.go

@@ -123,7 +123,7 @@ func FileSystemInit() {
 		Version:     "1.0",
 		StartDir:    "SystemAO/file_system/file_explorer.html",
 		SupportFW:   true,
-		InitFWSize:  []int{1080, 580},
+		InitFWSize:  []int{1040, 600},
 		LaunchFWDir: "SystemAO/file_system/file_explorer.html",
 		SupportEmb:  false,
 	})

+ 4 - 4
web/SystemAO/file_system/file_explorer.html

@@ -555,7 +555,7 @@
 
             //Browser detection
             //TODO: REMOVE DEBUG
-            let isMobile = true; //window.mobilecheck();
+            let isMobile = window.mobilecheck();
             let isChromium = window.chrome;
             let isChrome = /Chrome/.test(navigator.userAgent) && /Google Inc/.test(navigator.vendor);
             let isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
@@ -3652,13 +3652,13 @@
                 if (isMobile){
                     $("#directorySidebar").stop().finish().toggle();
                 }else{
-                    if ($("#directorySidebar").is(":visible")){
-                        $("#directorySidebar").transition("slide right out", function(){
+                    if (sideBarShown){
+                        $("#directorySidebar").stop().finish().transition("slide right out", function(){
                             $("#directorySidebar").hide();
                         });
                         //$("#directorySidebar").stop().finish().animate({left: 0},200);
                     }else{
-                        $("#directorySidebar").transition("slide right in", function(){
+                        $("#directorySidebar").stop().finish().transition("slide right in", function(){
                             $("#directorySidebar").show();
                         });
                         //$("#directorySidebar").stop().finish().animate({left: -1 * directorySidebarWidth},200);