[Ai] Improved File upload, some documentation

This commit is contained in:
2025-05-25 22:38:22 +02:00
parent ec5610c919
commit 1e44745b72
8 changed files with 399 additions and 20 deletions

157
src/css.h
View File

@@ -7,6 +7,15 @@ body {
background-color: #f4f4f4; /* Light background */
}
.playlist-container {
max-height: 300px;
overflow-y: auto;
border: 1px solid #ccc;
padding: 10px;
margin-top: 20px;
text-align: left; /* Align playlist text to the left */
}
li {
cursor: pointer;
list-style-type: none;
@@ -74,4 +83,150 @@ li {
margin: 20px 0; /* Space out elements */
}
)rawliteral";
/* Upload progress bar styles */
.progress-bar {
width: 100%;
height: 20px;
background-color: #e0e0e0;
border-radius: 10px;
overflow: hidden;
margin: 10px 0;
box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, #007bff, #0056b3);
width: 0%;
transition: width 0.3s ease;
border-radius: 10px;
}
#uploadProgress {
margin: 15px 0;
text-align: center;
}
#progressText {
font-weight: bold;
color: #007bff;
margin-left: 10px;
}
#uploadStatus {
margin: 10px 0;
padding: 8px;
border-radius: 4px;
font-weight: bold;
}
#uploadStatus:not(:empty) {
background-color: #e7f3ff;
border: 1px solid #007bff;
color: #0056b3;
}
/* Form styling improvements */
#uploadForm {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin: 20px 0;
}
#uploadButton {
background-color: #007bff;
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
margin-left: 10px;
transition: background-color 0.3s ease;
}
#uploadButton:hover:not(:disabled) {
background-color: #0056b3;
}
#uploadButton:disabled {
background-color: #6c757d;
cursor: not-allowed;
}
#uploadFile {
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
margin-right: 10px;
}
/* RFID mapping form styling */
#editMappingForm {
background-color: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
margin: 20px 0;
text-align: left;
}
#editMappingForm label {
display: block;
margin: 10px 0 5px 0;
font-weight: bold;
}
#editMappingForm input[type="text"] {
width: 100%;
padding: 8px;
border: 1px solid #ccc;
border-radius: 4px;
margin-bottom: 10px;
box-sizing: border-box;
}
#editMappingForm button {
background-color: #28a745;
color: white;
border: none;
padding: 10px 20px;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
margin-top: 10px;
transition: background-color 0.3s ease;
}
#editMappingForm button:hover {
background-color: #218838;
}
/* Responsive design improvements */
@media (max-width: 600px) {
body {
padding: 10px;
}
.slider {
width: 95%;
}
#uploadForm, #editMappingForm {
padding: 15px;
}
#uploadButton, #editMappingForm button {
width: 100%;
margin: 10px 0;
}
#uploadFile {
width: 100%;
margin: 10px 0;
}
}
)rawliteral";