mirror of
https://github.com/revoltchat/revite.git
synced 2024-12-25 23:22:06 -05:00
fix: properly detect ipados (#504)
This commit is contained in:
parent
eea4d49743
commit
5a46c50b81
2 changed files with 7 additions and 2 deletions
|
@ -21,6 +21,7 @@ export function FormLogin() {
|
|||
if (browser) {
|
||||
let { name } = browser;
|
||||
const { os } = browser;
|
||||
let isiPad;
|
||||
if (window.isNative) {
|
||||
friendly_name = `Revolt Desktop on ${os}`;
|
||||
} else {
|
||||
|
@ -28,8 +29,12 @@ export function FormLogin() {
|
|||
name = "safari";
|
||||
} else if (name === "fxios") {
|
||||
name = "firefox";
|
||||
} else if (name === "crios") {
|
||||
name = "chrome";
|
||||
}
|
||||
friendly_name = `${name} on ${os}`;
|
||||
if (os === "Mac OS" && navigator.maxTouchPoints > 0)
|
||||
isiPad = true;
|
||||
friendly_name = `${name} on ${isiPad ? "iPadOS" : os}`;
|
||||
}
|
||||
} else {
|
||||
friendly_name = "Unknown Device";
|
||||
|
|
|
@ -92,7 +92,7 @@ export function Sessions() {
|
|||
return <Android size={14} />;
|
||||
case /mac.*os/i.test(name):
|
||||
return <Macos size={14} />;
|
||||
case /ios/i.test(name):
|
||||
case /i(Pad)os/i.test(name):
|
||||
return <Apple size={14} />;
|
||||
case /windows/i.test(name):
|
||||
return <Windows size={14} />;
|
||||
|
|
Loading…
Reference in a new issue