mirror of
https://github.com/tsightler/ring-mqtt.git
synced 2025-09-26 21:01:12 +08:00
97 lines
2.7 KiB
HTML
97 lines
2.7 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Ring-MQTT Web Authenticator</title>
|
|
<style>
|
|
:root {
|
|
--primary-color: #47a9e6;
|
|
--primary-hover: #315b82;
|
|
--bg-color: #f2f2f2;
|
|
--error-color: #dc3545;
|
|
--success-color: #39ff14;
|
|
--text-color: #333;
|
|
--spacing: 1rem;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
|
|
max-width: 500px;
|
|
margin: 0 auto;
|
|
padding: var(--spacing);
|
|
color: white;
|
|
background-color: #666;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.container {
|
|
background-color: var(--bg-color);
|
|
padding: calc(var(--spacing) * 1.5);
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
color: var(--text-color);
|
|
margin-top: var(--spacing);
|
|
}
|
|
|
|
h2 {
|
|
margin: 0 0 var(--spacing) 0;
|
|
color: var(--success-color);
|
|
}
|
|
|
|
.display-name {
|
|
margin: calc(var(--spacing) / 2) 0;
|
|
padding: 0;
|
|
border-radius: 4px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.display-name span {
|
|
color: var(--success-color);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.message {
|
|
margin-top: var(--spacing);
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
strong {
|
|
color: var(--primary-color);
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
body {
|
|
padding: calc(var(--spacing) / 2);
|
|
}
|
|
|
|
.container {
|
|
padding: var(--spacing);
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h2>Ring-MQTT Authentication Complete</h2>
|
|
<div id="displayName" class="display-name">Device Name: <span></span></div>
|
|
<div class="message">
|
|
Authentication with Ring was successful and <strong>ring-mqtt</strong> will now attempt to connect to Ring servers. No additional steps are required, please review the ring-mqtt logs to monitor progress.
|
|
</div>
|
|
|
|
<script>
|
|
// Cookie handling
|
|
function getCookie(key) {
|
|
const value = document.cookie.match('(^|;) ?' + key + '=([^;]*)(;|$)');
|
|
return value ? decodeURIComponent(value[2]) : null;
|
|
}
|
|
|
|
// System ID display
|
|
const displayName = getCookie('displayName');
|
|
if (displayName) {
|
|
document.querySelector('#displayName span').textContent = displayName;
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |