Skip to content

Commit e146686

Browse files
committed
qrcode: allow custom app name (for multiple QR codes)
1 parent 2401063 commit e146686

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

apps/qrcode/custom.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@
101101
<option value="2">H - High - 30%</option>
102102
</select>
103103
</div>
104+
<label for="appname">App name</label>
105+
<input type="text" id="appname" class="form-input" value="qrcode">
104106
<button id="upload" class="btn btn-primary">Upload</button>
105107

106108
<script src="../../core/lib/customize.js"></script>
@@ -365,8 +367,10 @@
365367
`}
366368
g.setColor(1,1,1);
367369
`;
370+
371+
var appname = document.getElementById("appname").value.trim() || "qrcode";
368372
sendCustomizedApp({
369-
storage:[{name:"qrcode.app.js", url:"app.js", content:app}]
373+
storage:[{name:`${appname}.app.js`, url:"app.js", content:app}]
370374
});
371375

372376
});

0 commit comments

Comments
 (0)