feat: releay ui example, simplify logging

This commit is contained in:
2025-09-16 15:32:49 +02:00
parent 2d85f560bb
commit 702eec5a13
27 changed files with 577 additions and 1106 deletions

View File

@@ -0,0 +1,141 @@
.relay-component {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border-radius: 20px;
padding: 40px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
text-align: center;
max-width: 400px;
width: 100%;
color: white;
box-sizing: border-box;
}
.relay-component h1 {
margin: 0 0 30px 0;
font-size: 2.2em;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.relay-component .relay-status {
margin-bottom: 30px;
}
.relay-component .status-indicator {
width: 120px;
height: 120px;
border-radius: 50%;
margin: 0 auto 20px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.2em;
font-weight: bold;
transition: all 0.3s ease;
border: 4px solid rgba(255, 255, 255, 0.3);
}
.relay-component .status-indicator.off {
background: rgba(255, 0, 0, 0.3);
color: #ff6b6b;
}
.relay-component .status-indicator.on {
background: rgba(0, 255, 0, 0.3);
color: #51cf66;
box-shadow: 0 0 20px rgba(81, 207, 102, 0.5);
}
.relay-component .status-text {
font-size: 1.5em;
margin-bottom: 10px;
}
.relay-component .pin-info {
font-size: 0.9em;
opacity: 0.8;
}
.relay-component .controls {
display: flex;
gap: 15px;
justify-content: center;
flex-wrap: wrap;
}
.relay-component .btn {
padding: 12px 24px;
border: none;
border-radius: 25px;
font-size: 1em;
font-weight: bold;
cursor: pointer;
transition: all 0.3s ease;
min-width: 100px;
text-transform: uppercase;
letter-spacing: 1px;
}
.relay-component .btn-primary {
background: rgba(255, 255, 255, 0.2);
color: #333;
border: 2px solid rgba(0, 0, 0, 0.8);
font-weight: bold;
}
.relay-component .btn-primary:hover {
background: rgba(255, 255, 255, 0.4);
color: #222;
transform: translateY(-2px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.relay-component .btn-primary:active {
transform: translateY(0);
}
.relay-component .btn-success {
background: rgba(81, 207, 102, 0.8);
color: white;
border: 2px solid rgba(81, 207, 102, 1);
}
.relay-component .btn-success:hover {
background: rgba(81, 207, 102, 1);
transform: translateY(-2px);
}
.relay-component .btn-danger {
background: rgba(255, 107, 107, 0.8);
color: white;
border: 2px solid rgba(255, 107, 107, 1);
}
.relay-component .btn-danger:hover {
background: rgba(255, 107, 107, 1);
transform: translateY(-2px);
}
.relay-component .loading {
opacity: 0.6;
pointer-events: none;
}
.relay-component .error {
color: #ff6b6b;
margin-top: 15px;
font-size: 0.9em;
}
.relay-component .success {
color: #51cf66;
margin-top: 15px;
font-size: 0.9em;
}
.relay-component .uptime {
margin-top: 20px;
font-size: 0.8em;
opacity: 0.7;
}