mirror of
https://github.com/usetrmnl/tailor.git
synced 2026-04-29 13:44:32 -07:00
fix drag and drop bug
This commit is contained in:
@@ -59,14 +59,12 @@ function downloadBinaryFile(data, filename) {
|
||||
}, 100);
|
||||
}
|
||||
|
||||
export async function createBinary() {
|
||||
export async function createBinary(logoFile, loaderFile) {
|
||||
const BRAND_NAME = "TRMNL";
|
||||
const API_URL = "https://trmnl.app";
|
||||
|
||||
const logo = document.getElementById('logo-input');
|
||||
const loader = document.getElementById('loader-input');
|
||||
const logoBinary = await encodePNG(logo.files[0]);
|
||||
const loaderBinary = await encodePNG(loader.files[0]);
|
||||
const logoBinary = await encodePNG(logoFile);
|
||||
const loaderBinary = await encodePNG(loaderFile);
|
||||
|
||||
const totalLength = logoBinary.length + loaderBinary.length;
|
||||
if (totalLength > IMAGES_SIZE) {
|
||||
|
||||
+1
-1
@@ -169,7 +169,7 @@
|
||||
btn.disabled = true;
|
||||
|
||||
try {
|
||||
const blob = await createBinary();
|
||||
const blob = await createBinary(state.logo.file, state.loader.file);
|
||||
const manifest = {
|
||||
name: "TRMNL Firmware",
|
||||
new_install_prevent_erase: true,
|
||||
|
||||
Reference in New Issue
Block a user