-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathconnect.html
More file actions
136 lines (115 loc) · 3.71 KB
/
Copy pathconnect.html
File metadata and controls
136 lines (115 loc) · 3.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Flux Remote Connect</title>
<style>
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background-color: #f5f5f7;
color: #1d1d1f;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
text-align: center;
padding: 20px;
}
.container {
background: white;
padding: 40px;
border-radius: 20px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
max-width: 400px;
width: 100%;
}
h1 {
font-size: 24px;
margin-bottom: 10px;
}
p {
font-size: 16px;
color: #86868b;
margin-bottom: 30px;
line-height: 1.5;
}
.icon {
width: 80px;
height: 80px;
background-color: #007aff;
border-radius: 18px;
margin: 0 auto 20px;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-size: 40px;
font-weight: bold;
}
.btn {
display: inline-block;
background-color: #007aff;
color: white;
padding: 14px 24px;
border-radius: 12px;
text-decoration: none;
font-weight: bold;
font-size: 16px;
width: 100%;
box-sizing: border-box;
margin-bottom: 15px;
transition: background-color 0.2s;
}
.btn:hover {
background-color: #0056b3;
}
.btn-secondary {
background-color: #e5e5ea;
color: #1d1d1f;
}
.btn-secondary:hover {
background-color: #d1d1d6;
}
.loading {
margin-top: 20px;
font-size: 14px;
color: #86868b;
}
</style>
</head>
<body>
<div class="container">
<div class="icon">F</div>
<h1>Flux Remote</h1>
<p id="message">Attempting to open Flux Remote...</p>
<div id="loader" class="loading">Connecting...</div>
</div>
<script>
// Extract current URL query parameters to forward to the custom scheme (flux://)
const urlParams = window.location.search;
// Check user agent
const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
const isAndroid = /android/i.test(navigator.userAgent);
// Custom scheme URL for app connection
const appSchemeUrl = "flux://connect" + urlParams;
function tryOpenApp() {
window.location.href = appSchemeUrl;
// Redirect to appropriate app store after a short delay if the app didn't open
setTimeout(() => {
if (isIOS) {
document.getElementById('message').innerText = "Redirecting to App Store...";
window.location.href = "https://apps.apple.com/app/flux-remote/id6761290185";
} else {
document.getElementById('message').innerText = "Redirecting to Google Play Store...";
window.location.href = "https://play.google.com/store/apps/details?id=com.ct106.flux_remote";
}
}, 200);
}
// Automatically try to open on load
window.onload = tryOpenApp;
</script>
</body>
</html>