Skip to content

Commit

Permalink
fix iPhone and iPad detection functions
Browse files Browse the repository at this point in the history
  • Loading branch information
leizhe authored and leizhe committed Nov 23, 2021
1 parent e0bfc6a commit 9765d14
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 10 deletions.
8 changes: 4 additions & 4 deletions capacitor.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
3 changes: 2 additions & 1 deletion ios/App/App.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
B9A79754543D95E609C23F91 /* Pods-App.debug.xcconfig */,
A693BFCEA424C37DF4D9AF1B /* Pods-App.release.xcconfig */,
);
name = Pods;
path = Pods;
sourceTree = "<group>";
};
Expand Down Expand Up @@ -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";
Expand All @@ -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";
Expand Down
6 changes: 3 additions & 3 deletions ios/App/App/capacitor.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
"splashImmersive": true,
"backgroundColor": "#002b36"
}
}
"server": {
},
"server": {
"url": "http://192.168.0.104:3001",
"cleartext": true
}
}
}
7 changes: 7 additions & 0 deletions src/main/frontend/components/sidebar.css
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
6 changes: 4 additions & 2 deletions src/main/frontend/mobile/util.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -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
[]
Expand Down

0 comments on commit 9765d14

Please sign in to comment.