-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.html
More file actions
135 lines (123 loc) · 7.4 KB
/
Copy pathapp.html
File metadata and controls
135 lines (123 loc) · 7.4 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>XEsync</title>
<link rel="stylesheet" href="app.css">
<script src="config.js"></script>
</head>
<body>
<!-- ── TOP BAR ──────────────────────────────────────── -->
<div id="topbar" class="visible">
<button class="tbar-btn danger" onclick="doExit()">EXIT</button>
<span style="flex:1"></span>
<button class="tbar-btn" id="tbar-disconnect-btn" onclick="disconnectRower()" style="display:none;color:#a66;">DISCONNECT</button>
<button class="tbar-btn accent" id="tbar-row-btn" onclick="resumeRowing()" style="display:none;">ROW AGAIN</button>
<button class="tbar-btn accent" id="tbar-scan-btn" onclick="startScan()">SCAN FOR ROWER</button>
<button class="tbar-btn" id="tbar-debug-btn" onclick="debugMode()" style="color:#555;border-color:#333;display:none;">DEBUG</button>
<div id="tbar-user"></div>
</div>
<!-- ── BOOT SPLASH ───────────────────────────────────── -->
<div id="boot-splash">
<div class="boot-logo">XESYNC</div>
<div class="boot-spinner"></div>
</div>
<!-- ── LOGIN ─────────────────────────────────────────── -->
<div id="screen-login" class="screen active" style="overflow-y:auto;justify-content:flex-start;padding-top:30px;">
<h1>XESYNC</h1>
<div id="offline-notice" style="display:none;font-size:0.85em;color:#886;letter-spacing:0.1em;text-align:center;margin-bottom:16px;padding:10px;border:1px solid #332200;background:#1a1000;max-width:320px;">
CONNECT TO INTERNET TO LOG IN
</div>
<input type="text" id="username" placeholder="username" autocomplete="off" autocorrect="off" autocapitalize="off">
<input type="password" id="password" placeholder="password">
<button class="btn primary" onclick="doLogin()">LOGIN</button>
<button class="btn" onclick="show('screen-register')" style="margin-top:20px;opacity:0.7;">CREATE ACCOUNT</button>
<div class="status-msg" id="login-status"></div>
</div>
<!-- ── REGISTER ─────────────────────────────────────── -->
<div id="screen-register" class="screen" style="overflow-y:auto;justify-content:flex-start;padding-top:30px;">
<h1>CREATE ACCOUNT</h1>
<input type="text" id="reg-username" placeholder="username" autocomplete="off" autocorrect="off" autocapitalize="off">
<input type="email" id="reg-email" placeholder="email" autocomplete="off" autocorrect="off" autocapitalize="off">
<input type="password" id="reg-password" placeholder="password (min 8 chars)">
<label style="display:flex;align-items:flex-start;gap:8px;font-size:0.8em;color:#888;max-width:320px;margin:10px 0;line-height:1.4;">
<input type="checkbox" id="reg-consent" style="width:auto;margin-top:3px;">
<span>I agree to the privacy policy and consent to my data being stored to provide the service.</span>
</label>
<button class="btn primary" onclick="doRegister()">CREATE</button>
<button class="btn" onclick="show('screen-login')" style="margin-top:10px;opacity:0.7;">BACK</button>
<div class="status-msg" id="register-status"></div>
</div>
<!-- ── HOME ─────────────────────────────────────────── -->
<div id="screen-home" class="screen">
<iframe id="home-frame" src="about:blank"></iframe>
</div>
<!-- ── SCAN ──────────────────────────────────────────── -->
<div id="screen-scan" class="screen" style="justify-content:flex-start;padding-top:20px;overflow-y:auto;padding-bottom:40px;">
<div id="scan-idle">
<h1 style="opacity:0.4;">XESYNC</h1>
<div id="scan-offline-msg" style="display:none;text-align:center;margin-top:24px;">
<div style="font-size:0.9em;color:#666;letter-spacing:0.1em;margin-bottom:20px;">CONNECT TO INTERNET AND LOGIN</div>
<button class="btn primary" onclick="show('screen-login')">LOGIN</button>
</div>
</div>
<div id="scan-active">
<div id="pulse-ring"></div>
<div id="scan-label">SCANNING...</div>
<button class="btn danger" onclick="stopScan()" style="margin-top:16px;">STOP</button>
<div id="device-list"></div>
</div>
</div>
<!-- ── CONNECTING ────────────────────────────────────── -->
<div id="screen-connecting" class="screen">
<div class="big-label" id="connecting-label">CONNECTING...</div>
</div>
<!-- ── ROWING ─────────────────────────────────────────── -->
<div id="screen-rowing" class="screen" style="position:relative;">
<!-- ROWING_DISPLAY -->
<div id="loading-overlay" class="rowing-overlay visible">
<div class="big-label">LOADING...</div>
</div>
<div id="reconnect-overlay" class="rowing-overlay" style="background:rgba(0,0,0,0.85);">
<div class="big-label">RECONNECTING...</div>
<button class="btn danger" onclick="doGiveUp()">STOP</button>
</div>
</div>
<!-- ── POST WORKOUT ──────────────────────────────────── -->
<div id="post-workout" class="ftms-overlay">
<div id="pw-title" class="ftms-overlay-title">WORKOUT ENDED</div>
<div id="pw-subtitle" class="ftms-overlay-subtitle"></div>
<div class="ftms-actions">
<button id="pw-workouts-btn" class="ftms-btn primary" onclick="postWorkoutGoWorkouts()">WORKOUTS</button>
<button class="ftms-btn secondary" onclick="postWorkoutGoLogin()">LOGIN</button>
</div>
</div>
<!-- ── REGISTER SUCCESS ──────────────────────────────── -->
<div id="register-success" class="ftms-overlay">
<div class="ftms-overlay-title">CHECK YOUR EMAIL</div>
<div class="ftms-overlay-subtitle">a verification link has been sent to your inbox</div>
<div class="ftms-actions">
<button class="ftms-btn primary" onclick="hideRegisterSuccess()">GO TO LOGIN</button>
</div>
</div>
<!-- ── EXIT CONFIRM ───────────────────────────────────── -->
<div id="exit-confirm" class="ftms-overlay">
<div class="ftms-overlay-title">EXIT</div>
<div class="ftms-overlay-subtitle">what would you like to do?</div>
<div class="ftms-actions">
<button class="ftms-btn" onclick="doLogoff()">LOG OFF</button>
<button class="ftms-btn primary" onclick="doQuit()">QUIT APP</button>
<button class="ftms-btn secondary" onclick="hideExitConfirm()">CANCEL</button>
</div>
</div>
<script src="state.js"></script>
<script src="view.js"></script>
<script src="api.js"></script>
<script src="bridge.js"></script>
<script src="debug.js"></script>
<script src="ftms_integration.js"></script>
<script src="controller.js"></script>
<script src="debug_sim.js"></script>
</body>
</html>