Add config UI interface and update app.py with config card functionality
- Copied config.py with FreeSimpleGUI configuration interface to root folder - Added load_config() function to launch config UI when card 12886709 is inserted - Config UI allows setting hostname and work table (Loc De Munca) - Automatic printer configuration and hostname updates - System reboot after configuration changes - Added config.py to version control
This commit is contained in:
69
data/html/Screen.html
Executable file
69
data/html/Screen.html
Executable file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Device Not Configured</title>
|
||||
<style>
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
html, body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
body {
|
||||
overflow: hidden;
|
||||
background-color: #000;
|
||||
font-family: Arial, sans-serif;
|
||||
}
|
||||
#container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: #000;
|
||||
}
|
||||
img {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
width: auto;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
#fallback {
|
||||
display: none;
|
||||
color: white;
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="container">
|
||||
<img id="mainImage" src="file:///home/pi/Desktop/Prezenta/data/html/harting_background.jpg" alt="Harting Module" />
|
||||
<div id="fallback">
|
||||
<h1>Device Not Configured</h1>
|
||||
<p>Please scan the configuration RFID card</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('mainImage').onerror = function() {
|
||||
console.error('Image failed to load, showing fallback');
|
||||
document.getElementById('mainImage').style.display = 'none';
|
||||
document.getElementById('fallback').style.display = 'block';
|
||||
};
|
||||
|
||||
// Log when image loads successfully
|
||||
document.getElementById('mainImage').onload = function() {
|
||||
console.log('Image loaded successfully');
|
||||
};
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user