Added "Akemi' PWA + Favicon

This commit is contained in:
Mountain/\Ash 2023-10-05 15:43:36 +02:00
parent 26e766ee19
commit 7dcf60678b
11 changed files with 51 additions and 29 deletions

View File

@ -0,0 +1,15 @@
{
"id": "wled",
"name": "WLED",
"short_name": "WLED",
"description": "Light controller",
"display": "standalone",
"background_color": "#000",
"theme_color": "#000",
"start_url": "/",
"icons": [{
"src": "/apple-touch-icon.png",
"sizes": "512x512",
"type": "image/png"
}]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -21,7 +21,7 @@
scE.setAttribute("type", "text/javascript");
scE.setAttribute("async", async);
d.body.appendChild(scE);
// success event
// success event
scE.addEventListener("load", () => {
//console.log("File loaded");
GetV();
@ -277,7 +277,7 @@ Y:<input name="P${i}Y" type="number" min="0" max="255" value="0" oninput="UI()">
//if serpentine go next else go down
if (ps) { //serpentine
ctx.lineTo(lnX, lnY); //draw the serpentine line
} else {
} else {
//find the other end of the long line
if (pv) //vertical
lnY += (pb?1:-1) * longLineLength * (serpLine?-1:1); //min as we go back
@ -294,15 +294,15 @@ Y:<input name="P${i}Y" type="number" min="0" max="255" value="0" oninput="UI()">
ctx.beginPath();
ctx.arc(lnX, lnY, ppL*0.5, 0, 2 * Math.PI);
ctx.fill();
ctx.font = '40px Arial';
ctx.font = "40px Arial";
ctx.fillStyle = "orange";
ctx.fillText(p, topLeftX + pw/2*ppL - 10, topLeftY + ph/2*ppL + 10);
}
gId("MD").innerHTML = "Matrix Dimensions (W*H=LC): " + maxWidth + " x " + maxHeight + " = " + maxWidth * maxHeight;
}
</script>
<style>@import url("style.css");</style>
<link rel="stylesheet" href="/style.css">
<link rel="manifest" href="/app.webmanifest">
</head>
<body onload="S()">
<form id="form_s" name="Sf" method="post">

View File

@ -28,7 +28,7 @@
if (i>=numCh) {
d.getElementById("CH"+(i+1) + "s").style.opacity = "0.5";
d.getElementById("CH"+(i+1)).disabled = true;
} else {
d.getElementById("CH"+(i+1) + "s").style.opacity = "1";
d.getElementById("CH"+(i+1)).disabled = false;
@ -42,7 +42,7 @@
scE.setAttribute("type", "text/javascript");
scE.setAttribute("async", async);
d.body.appendChild(scE);
// success event
// success event
scE.addEventListener("load", () => {
//console.log("File loaded");
GCH(15);GetV();mMap();
@ -79,7 +79,8 @@
return (loc ? locproto + "//" + locip : "") + path;
}
</script>
<style>@import url("style.css");</style>
<link rel="stylesheet" href="/style.css">
<link rel="manifest" href="/app.webmanifest">
</head>
<body onload="S()">
<form id="form_s" name="Sf" method="post">

View File

@ -24,7 +24,7 @@
scE.setAttribute("type", "text/javascript");
scE.setAttribute("async", async);
d.body.appendChild(scE);
// success event
// success event
scE.addEventListener("load", () => {
GetV();
checkSi();
@ -517,7 +517,7 @@ Length: <input type="number" name="XC${i}" id="xc${i}" class="l" min="1" max="65
function receivedText(e) {
let lines = e.target.result;
var c = JSON.parse(lines);
var c = JSON.parse(lines);
if (c.hw) {
if (c.hw.led) {
for (var i=0; i<10; i++) addLEDs(-1);
@ -682,7 +682,8 @@ Length: <input type="number" name="XC${i}" id="xc${i}" class="l" min="1" max="65
return (loc ? locproto + "//" + locip : "") + path;
}
</script>
<style>@import url("style.css");</style>
<link rel="stylesheet" href="/style.css">
<link rel="manifest" href="/app.webmanifest">
</head>
<body onload="S()">
<form id="form_s" name="Sf" method="post">

View File

@ -20,7 +20,7 @@
scE.setAttribute("type", "text/javascript");
scE.setAttribute("async", async);
d.body.appendChild(scE);
// success event
// success event
scE.addEventListener("load", () => {
//console.log("File loaded");
GetV();SetVal();
@ -80,7 +80,8 @@
return (loc ? locproto + "//" + locip : "") + path;
}
</script>
<style>@import url("style.css");</style>
<link rel="stylesheet" href="/style.css">
<link rel="manifest" href="/app.webmanifest">
</head>
<body onload="S()">
<form id="form_s" name="Sf" method="post" onsubmit="GC()">

View File

@ -21,7 +21,7 @@
scE.setAttribute("type", "text/javascript");
scE.setAttribute("async", async);
d.body.appendChild(scE);
// success event
// success event
scE.addEventListener("load", () => {
//console.log("File loaded");
BTa();GetV();updLoc();Cs();FC();
@ -159,7 +159,8 @@
if (parseFloat(d.Sf.LN.value)<0) { d.Sf.LNR.value = "W"; d.Sf.LN.value = -1*parseFloat(d.Sf.LN.value); } else d.Sf.LNR.value = "E";
}
</script>
<style>@import url("style.css");</style>
<link rel="stylesheet" href="/style.css">
<link rel="manifest" href="/app.webmanifest">
</head>
<body onload="S()">
<form id="form_s" name="Sf" method="post" onsubmit="Wd()">
@ -171,7 +172,7 @@
Get time from NTP server: <input type="checkbox" name="NT"><br>
<input type="text" name="NS" maxlength="32"><br>
Use 24h format: <input type="checkbox" name="CF"><br>
Time zone:
Time zone:
<select name="TZ">
<option value="0" selected>GMT(UTC)</option>
<option value="1">GMT/BST</option>

View File

@ -114,7 +114,7 @@
function genForm(s) {
var str = "";
str = addRec(s,"",l);
gId('gen').innerHTML = str;
}
function GetLS()
@ -158,12 +158,12 @@
localStorage.removeItem('wledPalx');
showToast("Cleared.");
}
function Save() {
SetLS();
if (d.Sf.DS.value != initial_ds || d.Sf.ST.checked != initial_st || d.Sf.SU.checked != initial_su) d.Sf.submit();
}
// https://www.educative.io/edpresso/how-to-dynamically-load-a-js-file-in-javascript
function loadJS(FILE_URL, async = true) {
let scE = d.createElement("script");
@ -171,10 +171,10 @@
scE.setAttribute("type", "text/javascript");
scE.setAttribute("async", async);
d.body.appendChild(scE);
// success event
// success event
scE.addEventListener("load", () => {
//console.log("File loaded");
GetV();
GetV();
initial_ds = d.Sf.DS.value;
initial_st = d.Sf.ST.checked;
initial_su = d.Sf.SU.checked;
@ -227,7 +227,7 @@
} else {
gId("theme_bg_url").value = "";
}
}
function checkRandomBg() {
if (gId("theme_bg_url").value === "https://picsum.photos/1920/1080") {
@ -248,7 +248,8 @@
return false;
}
</script>
<style>@import url("style.css");</style>
<link rel="stylesheet" href="/style.css">
<link rel="manifest" href="/app.webmanifest">
</head>
<body onload="S()">
<form id="form_s" name="Sf" method="post">
@ -268,9 +269,9 @@
<i>The following UI customization settings are unique both to the WLED device and this browser.<br>
You will need to set them again if using a different browser, device or WLED IP address.<br>
Refresh the main UI to apply changes.</i><br>
<div id="gen">Loading settings...</div>
<h3>UI Appearance</h3>
<span class="l"></span>: <input type="checkbox" id="comp_labels" class="agi cb"><br>
<span class="l"></span>: <input type="checkbox" id="comp_pcmbot" class="agi cb"><br>

View File

@ -28,7 +28,7 @@
scE.setAttribute("type", "text/javascript");
scE.setAttribute("async", async);
d.body.appendChild(scE);
// success event
// success event
scE.addEventListener("load", () => {
GetV();
for (let r of d.rsvd) { pins.push(r); pinO.push("rsvd"); } // reserved pins
@ -313,7 +313,8 @@
if (d.Sf.checkValidity()) d.Sf.submit(); //https://stackoverflow.com/q/37323914
}
</script>
<style>@import url("style.css");</style>
<link rel="stylesheet" href="/style.css">
<link rel="manifest" href="/app.webmanifest">
</head>
<body onload="S()">

View File

@ -145,7 +145,8 @@
return (loc ? locproto + "//" + locip : "") + path;
}
</script>
<style>@import url("style.css");</style>
<link rel="stylesheet" href="/style.css">
<link rel="manifest" href="/app.webmanifest">
</head>
<body onload="S()">
<form id="form_s" name="Sf" method="post">
@ -198,7 +199,7 @@
<h3>Wireless Remote</h3>
<i>Listen for events over ESP-NOW<br>
Keep disabled if not using a remote, increases power consumption.<br></i>
Enable Remote: <input type="checkbox" name="RE"><br>
Hardware MAC: <input type="text" name="RMAC"><br>
Last Seen: <span class="rlid">None</span> <br>