qrcode: allow custom app name (for multiple QR codes)

master
Rob Pilling 2025-04-28 22:07:53 +01:00
parent 2401063c7d
commit e146686b07
1 changed files with 5 additions and 1 deletions

View File

@ -101,6 +101,8 @@
<option value="2">H - High - 30%</option> <option value="2">H - High - 30%</option>
</select> </select>
</div> </div>
<label for="appname">App name</label>
<input type="text" id="appname" class="form-input" value="qrcode">
<button id="upload" class="btn btn-primary">Upload</button> <button id="upload" class="btn btn-primary">Upload</button>
<script src="../../core/lib/customize.js"></script> <script src="../../core/lib/customize.js"></script>
@ -365,8 +367,10 @@ g.drawString(content,g.getWidth()/2,g.getHeight()-(g.getHeight()-img[1])/4);
`} `}
g.setColor(1,1,1); g.setColor(1,1,1);
`; `;
var appname = document.getElementById("appname").value.trim() || "qrcode";
sendCustomizedApp({ sendCustomizedApp({
storage:[{name:"qrcode.app.js", url:"app.js", content:app}] storage:[{name:`${appname}.app.js`, url:"app.js", content:app}]
}); });
}); });