logging svelte and js

This commit is contained in:
sanjayk03-dev
2024-01-12 01:49:48 +05:30
parent df42c7e5fe
commit 59347cd961
2 changed files with 7 additions and 1 deletions

View File

@@ -68,6 +68,7 @@ module.exports = {
alert(`Unsupported file type: ${extension}`);
return;
}
console.log(file);
SvelteComponents.showDialog("Upload", {
file,
onComplete: () => {
@@ -84,13 +85,15 @@ module.exports = {
`macros-color-${this.tab-1}`
).value;
console.log(this.newGcode[this.tab-1]);
if(this.state.selected =='default'){
const file = this.newGcode[this.tab-1];
SvelteComponents.showDialog("Upload", {
file,
onComplete: () => {
this.last_file_time = macrosName;
this.$broadcast("gcode-reload", file.name);
// this.$broadcast("gcode-reload", file.name);
},
});
}

View File

@@ -52,6 +52,9 @@
progress = event.loaded / event.total;
};
console.log(file);
console.log(file.name);
xhr.open("PUT", `/api/file/${encodeURIComponent(file.name)}`);
xhr.send(file);
}