updated card and board
This commit is contained in:
@@ -7,24 +7,27 @@
|
||||
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
|
||||
<style>
|
||||
body {
|
||||
background-color: #f8f9fa;
|
||||
background-color: #343a40;
|
||||
color: #6e6c6c;
|
||||
}
|
||||
.card {
|
||||
border: 1px solid #dee2e6;
|
||||
background-color: #495057;
|
||||
border: 1px solid #6c757d;
|
||||
border-radius: 0.25rem;
|
||||
box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
|
||||
}
|
||||
.card-title {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 500;
|
||||
color: #f6f6f7;
|
||||
}
|
||||
.card-text {
|
||||
font-size: 1rem;
|
||||
color: #6c757d;
|
||||
color: #f6f6f7;
|
||||
}
|
||||
.timer {
|
||||
font-size: 1rem;
|
||||
color: #6c757d;
|
||||
color: #ced4da;
|
||||
text-align: right;
|
||||
}
|
||||
.status-indicator {
|
||||
@@ -39,6 +42,22 @@
|
||||
.status-off {
|
||||
background-color: #dc3545;
|
||||
}
|
||||
.btn-danger {
|
||||
background-color: #dc3545;
|
||||
border-color: #dc3545;
|
||||
}
|
||||
.btn-danger:hover {
|
||||
background-color: #c82333;
|
||||
border-color: #bd2130;
|
||||
}
|
||||
.btn-secondary {
|
||||
background-color: #6c757d;
|
||||
border-color: #6c757d;
|
||||
}
|
||||
.btn-secondary:hover {
|
||||
background-color: #5a6268;
|
||||
border-color: #545b62;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function updateLogs() {
|
||||
@@ -59,7 +78,8 @@
|
||||
const relayIndicator = document.getElementById(`relay-status-${i}`);
|
||||
relayIndicator.className = `status-indicator ${data.relay_status[`relay${i}`] === 'on' ? 'status-on' : 'status-off'}`;
|
||||
const relayMessage = document.getElementById(`relay-message-${i}`);
|
||||
relayMessage.innerText = data.logs.find(log => log.message.includes(`Relay ${i} turned`)).message;
|
||||
const relayLog = data.logs.find(log => log.message.includes(`Relay ${i} turned`));
|
||||
relayMessage.innerText = relayLog ? relayLog.message : '';
|
||||
}
|
||||
|
||||
// Update input status indicators and messages
|
||||
@@ -67,7 +87,8 @@
|
||||
const inputIndicator = document.getElementById(`input-status-${i}`);
|
||||
inputIndicator.className = `status-indicator ${data.input_status[`input${i}`] === 'on' ? 'status-on' : 'status-off'}`;
|
||||
const inputMessage = document.getElementById(`input-message-${i}`);
|
||||
inputMessage.innerText = data.logs.find(log => log.message.includes(`Input ${i}`)).message;
|
||||
const inputLog = data.logs.find(log => log.message.includes(`Input ${i}`));
|
||||
inputMessage.innerText = inputLog ? inputLog.message : '';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user