Преглед на файлове

fix iPhone and iPad detection functions

leizhe преди 3 години
родител
ревизия
9765d14b28

+ 4 - 4
capacitor.config.ts

@@ -16,10 +16,10 @@ const config: CapacitorConfig = {
     }
     // do not commit this into source control
     // source: https://capacitorjs.com/docs/guides/live-reload
-    // , server: {
-    //     url: process.env.LOGSEQ_APP_SERVER_URL,
-    //     cleartext: true
-    // }
+    , server: {
+        url: "http://192.168.0.104:3001" //process.env.LOGSEQ_APP_SERVER_URL,
+        cleartext: true
+    }
 };
 
 export = config;

+ 2 - 1
ios/App/App.xcodeproj/project.pbxproj

@@ -99,7 +99,6 @@
 				B9A79754543D95E609C23F91 /* Pods-App.debug.xcconfig */,
 				A693BFCEA424C37DF4D9AF1B /* Pods-App.release.xcconfig */,
 			);
-			name = Pods;
 			path = Pods;
 			sourceTree = "<group>";
 		};
@@ -368,6 +367,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
+				DEVELOPMENT_TEAM = LJPXH48TM2;
 				INFOPLIST_FILE = App/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -389,6 +389,7 @@
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				CLANG_ENABLE_MODULES = YES;
 				CODE_SIGN_STYLE = Automatic;
+				DEVELOPMENT_TEAM = LJPXH48TM2;
 				INFOPLIST_FILE = App/Info.plist;
 				IPHONEOS_DEPLOYMENT_TARGET = 12.0;
 				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

+ 3 - 3
ios/App/App/capacitor.config.json

@@ -11,9 +11,9 @@
 			"splashImmersive": true,
 			"backgroundColor": "#002b36"
 		}
-	}
-    "server": {
+	},
+	"server": {
 		"url": "http://192.168.0.104:3001",
 		"cleartext": true
-	} 
+	}
 }

+ 7 - 0
src/main/frontend/components/sidebar.css

@@ -1,3 +1,10 @@
+@supports(padding: max(0px)) {
+    .post {
+        padding-left: max(12px, env(safe-area-inset-left));
+        padding-right: max(12px, env(safe-area-inset-right));
+    }
+}
+
 #app-container {
   background-color: var(--ls-primary-background-color, #fff);
   position: relative;

+ 4 - 2
src/main/frontend/mobile/util.cljs

@@ -86,11 +86,13 @@
 
 (defn native-iphone?
   []
-  (str/starts-with? (first (get-idevice-model)) "iPhone"))
+  (when-let [model (get-idevice-model)]
+   (str/starts-with? (first model) "iPhone")))
 
 (defn native-ipad?
   []
-  (str/starts-with? (first (get-idevice-model)) "iPad"))
+  (when-let [model (get-idevice-model)]
+   (str/starts-with? (first model) "iPad")))
 
 (defn get-idevice-statusbar-height
   []