Slightly prettier UI

This commit is contained in:
Ignacio Rivero 2025-03-05 15:19:19 -03:00
parent 7832f6e6b8
commit 9a14492e47
4 changed files with 153 additions and 84 deletions

View File

@ -671,6 +671,12 @@ def serve_maskable_icon():
return send_from_directory("static", 'icon512_maskable.png', return send_from_directory("static", 'icon512_maskable.png',
mimetype='image/png') mimetype='image/png')
@app.route('/screenshot1.png')
def serve_screenshot_1():
return send_from_directory("static", 'screenshot1.png',
mimetype='image/png')
if __name__ == "__main__": if __name__ == "__main__":
# Start Qt process # Start Qt process
qt_proc = multiprocessing.Process(target=qt_process) qt_proc = multiprocessing.Process(target=qt_process)

View File

@ -2,6 +2,14 @@
"theme_color":"#222222", "theme_color":"#222222",
"background_color":"#222222", "background_color":"#222222",
"start_url": "/", "start_url": "/",
"screenshots":
[
{
"src": "screenshot1.png",
"type": "image/png",
"sizes": "1080x2017"
}
],
"icons": "icons":
[ [
{ {

BIN
static/screenshot1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View File

@ -1,5 +1,6 @@
<!-- Updated HTML/CSS for the index() function in Flask --> <!DOCTYPE html>
<html> <html>
<head> <head>
<title>IPMPV</title> <title>IPMPV</title>
<link rel="manifest" href="/manifest.json"> <link rel="manifest" href="/manifest.json">
@ -17,6 +18,8 @@
--text-color: white; --text-color: white;
--on-state: #007700; --on-state: #007700;
--off-state: #770000; --off-state: #770000;
--on-border: #229922;
--off-border: #992222;
--border-radius: 15px; --border-radius: 15px;
} }
@ -26,7 +29,7 @@
body { body {
background-color: var(--primary-bg); background-color: var(--primary-bg);
font-family: Fira Sans Regular, Arial, sans-serif; font-family: "Fira Sans", Arial, sans-serif;
color: var(--text-color); color: var(--text-color);
text-align: center; text-align: center;
padding: 10px; padding: 10px;
@ -89,13 +92,14 @@
} }
button { button {
font-family: "Fira Sans", Arial, sans-serif;
padding: 12px; padding: 12px;
min-width: 120px; min-width: 200px;
margin: 5px; margin: 5px;
font-size: 16px; font-size: 16px;
border: 1px solid #353535;
color: var(--text-color); color: var(--text-color);
border: none; transition: background-color 0.2s, transform 0.1s, border-color 0.2s;
transition: background-color 0.2s, transform 0.1s;
background-color: var(--secondary-bg); background-color: var(--secondary-bg);
border-radius: var(--border-radius); border-radius: var(--border-radius);
cursor: pointer; cursor: pointer;
@ -121,12 +125,13 @@
} }
input { input {
font-family: "Fira Sans", Arial, sans-serif;
padding: 12px; padding: 12px;
flex-grow: 1; flex-grow: 1;
margin: 5px 0; margin: 5px 0;
font-size: 16px; font-size: 16px;
color: var(--text-color); color: var(--text-color);
border: none; border: 1px solid #444444;
background-color: var(--input-bg); background-color: var(--input-bg);
border-radius: var(--border-radius); border-radius: var(--border-radius);
min-width: 200px; min-width: 200px;
@ -135,19 +140,21 @@
.osd-toggle { .osd-toggle {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin: 10px 0; margin: 0;
} }
#osd-on-btn { #osd-on-btn {
border-radius: var(--border-radius) 0 0 var(--border-radius); border-radius: var(--border-radius) 0 0 var(--border-radius);
min-width: 80px; min-width: 80px;
margin-right: 0; margin-right: 0;
border-right: 0;
} }
#osd-off-btn { #osd-off-btn {
border-radius: 0 var(--border-radius) var(--border-radius) 0; border-radius: 0 var(--border-radius) var(--border-radius) 0;
min-width: 80px; min-width: 80px;
margin-left: 0; margin-left: 0;
border-left: 0;
} }
#latency-btn { #latency-btn {
@ -156,17 +163,21 @@
margin: 5px 0; margin: 5px 0;
border-radius: 0; border-radius: 0;
flex: 0 0 auto; flex: 0 0 auto;
border-right: 0;
border-left: 0;
} }
.custom-url-input { .custom-url-input {
border-radius: var(--border-radius) 0 0 var(--border-radius); border-radius: var(--border-radius) 0 0 var(--border-radius);
margin-right: 0; margin-right: 0;
border-right: 0;
} }
.input-btn { .input-btn {
border-radius: 0 var(--border-radius) var(--border-radius) 0; border-radius: 0 var(--border-radius) var(--border-radius) 0;
display: block; display: block;
margin: 5px 0; margin: 5px 0;
border-left: 0;
} }
button:hover { button:hover {
@ -180,10 +191,12 @@
button.OFF { button.OFF {
background-color: var(--off-state); background-color: var(--off-state);
border: 1px solid var(--off-border);
} }
button.ON { button.ON {
background-color: var(--on-state); background-color: var(--on-state);
border: 1px solid var(--on-border);
} }
/* Sections */ /* Sections */
@ -217,12 +230,8 @@
flex-wrap: nowrap; flex-wrap: nowrap;
} }
.custom-url-input {
flex-grow: 1;
}
.input-btn { .input-btn {
min-width: 120px; min-width: 200px;
} }
} }
@ -240,10 +249,26 @@
/* Mobile touch improvements */ /* Mobile touch improvements */
@media (max-width: 767px) { @media (max-width: 767px) {
button, input {
padding: 14px; /* Larger touch targets */ button,
input {
padding: 14px;
/* Larger touch targets */
margin: 8px 4px; margin: 8px 4px;
width: 90%;
}
input {
min-width: unset;
width: 90%;
}
.section {
display: flex;
width: 100%; width: 100%;
flex-direction: column;
justify-content: center;
align-items: center;
} }
.group-container { .group-container {
@ -255,34 +280,63 @@
align-items: center; align-items: center;
} }
.osd-toggle {
width: 85%;
margin: 8px 4px;
justify-content: center;
align-items: center;
}
.control-button { .control-button {
width: 100%; width: 90%;
max-width: none; max-width: none;
} }
.url-input-group { .url-input-group {
width: 100%;
flex-direction: column;
flex-wrap: wrap; flex-wrap: wrap;
align-items: center;
justify-content: center;
} }
.custom-url-input { .custom-url-input {
width: 100%; width: 90%;
min-width: 200px;
border-right: 1px solid #444444;
border-radius: var(--border-radius); border-radius: var(--border-radius);
} }
#latency-btn { #latency-btn {
width: 100%; width: 90%;
border-radius: var(--border-radius); border-radius: var(--border-radius);
margin-top: 8px; margin-top: 8px;
} }
.input-btn { .input-btn {
width: 100%; width: 90%;
border-radius: var(--border-radius); border-radius: var(--border-radius);
border-left: 1px solid #353535;
margin-top: 8px; margin-top: 8px;
} }
#osd-on-btn {
margin-top: 8px;
margin-bottom: 8px;
margin-left: 4px;
min-width: 100px;
}
#osd-off-btn {
margin-top: 8px;
margin-bottom: 8px;
margin-right: 4px;
min-width: 100px;
}
} }
</style> </style>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<h1>Welcome to IPMPV</h1> <h1>Welcome to IPMPV</h1>
@ -471,4 +525,5 @@
} }
</script> </script>
</body> </body>
</html> </html>