Skip to content

Commit

Permalink
detect android
Browse files Browse the repository at this point in the history
  • Loading branch information
arily committed Jul 16, 2023
1 parent 9ba8def commit 9379941
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/server/trpc/middleware/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,24 @@ function createSession(e: H3Event) {
break
}
case 'Mac OS': {
r.OS = OS.macOS
if (res.device.type === 'tablet') {
r.OS = OS.iPadOS
}
else {
r.OS = OS.macOS
}
break
}
case 'iOS': {
r.OS = OS.iOS
break
}
case 'iPadOS': {
r.OS = OS.iPadOS
// case 'iPadOS': {
// r.OS = OS.iPadOS
// break
// }
case 'Android': {
r.OS = OS.Android
break
}
case 'Chromium OS': {
Expand Down

0 comments on commit 9379941

Please sign in to comment.