mirror of
https://github.com/fosrl/pangolin.git
synced 2026-03-02 08:46:38 +00:00
Compare commits
2 Commits
1.14.1-s.1
...
1.14.1-s.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9ec94441f3 | ||
|
|
53e7b99605 |
@@ -2244,7 +2244,7 @@
|
|||||||
"deviceOrganizationsAccess": "Access to all organizations your account has access to",
|
"deviceOrganizationsAccess": "Access to all organizations your account has access to",
|
||||||
"deviceAuthorize": "Authorize {applicationName}",
|
"deviceAuthorize": "Authorize {applicationName}",
|
||||||
"deviceConnected": "Device Connected!",
|
"deviceConnected": "Device Connected!",
|
||||||
"deviceAuthorizedMessage": "Device is authorized to access your account.",
|
"deviceAuthorizedMessage": "Device is authorized to access your account. Please return to the client application.",
|
||||||
"pangolinCloud": "Pangolin Cloud",
|
"pangolinCloud": "Pangolin Cloud",
|
||||||
"viewDevices": "View Devices",
|
"viewDevices": "View Devices",
|
||||||
"viewDevicesDescription": "Manage your connected devices",
|
"viewDevicesDescription": "Manage your connected devices",
|
||||||
|
|||||||
@@ -456,11 +456,11 @@ export async function getTraefikConfig(
|
|||||||
// );
|
// );
|
||||||
} else if (resource.maintenanceModeType === "automatic") {
|
} else if (resource.maintenanceModeType === "automatic") {
|
||||||
showMaintenancePage = !hasHealthyServers;
|
showMaintenancePage = !hasHealthyServers;
|
||||||
if (showMaintenancePage) {
|
// if (showMaintenancePage) {
|
||||||
logger.warn(
|
// logger.warn(
|
||||||
`Resource ${resource.name} (${fullDomain}) has no healthy servers - showing maintenance page (AUTOMATIC mode)`
|
// `Resource ${resource.name} (${fullDomain}) has no healthy servers - showing maintenance page (AUTOMATIC mode)`
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { useLicenseStatusContext } from "@app/hooks/useLicenseStatusContext";
|
|||||||
import { CheckCircle2 } from "lucide-react";
|
import { CheckCircle2 } from "lucide-react";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
|
import { useEffect } from "react";
|
||||||
|
|
||||||
export default function DeviceAuthSuccessPage() {
|
export default function DeviceAuthSuccessPage() {
|
||||||
const { env } = useEnvContext();
|
const { env } = useEnvContext();
|
||||||
@@ -20,6 +21,29 @@ export default function DeviceAuthSuccessPage() {
|
|||||||
? env.branding.logo?.authPage?.height || 58
|
? env.branding.logo?.authPage?.height || 58
|
||||||
: 58;
|
: 58;
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// Detect if we're on iOS or Android
|
||||||
|
const userAgent = navigator.userAgent || navigator.vendor || (window as any).opera;
|
||||||
|
const isIOS = /iPad|iPhone|iPod/.test(userAgent) && !(window as any).MSStream;
|
||||||
|
const isAndroid = /android/i.test(userAgent);
|
||||||
|
|
||||||
|
if (isIOS || isAndroid) {
|
||||||
|
// Wait 500ms then attempt to open the app
|
||||||
|
setTimeout(() => {
|
||||||
|
// Try to open the app using deep link
|
||||||
|
window.location.href = "pangolin://";
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
if (isIOS) {
|
||||||
|
window.location.href = "https://apps.apple.com/app/pangolin/net.pangolin.Pangolin.PangoliniOS";
|
||||||
|
} else if (isAndroid) {
|
||||||
|
window.location.href = "https://play.google.com/store/apps/details?id=net.pangolin.Pangolin";
|
||||||
|
}
|
||||||
|
}, 2000);
|
||||||
|
}, 500);
|
||||||
|
}
|
||||||
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Card>
|
<Card>
|
||||||
|
|||||||
Reference in New Issue
Block a user