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}`); alert(`Unsupported file type: ${extension}`);
return; return;
} }
console.log(file);
SvelteComponents.showDialog("Upload", { SvelteComponents.showDialog("Upload", {
file, file,
onComplete: () => { onComplete: () => {
@@ -84,13 +85,15 @@ module.exports = {
`macros-color-${this.tab-1}` `macros-color-${this.tab-1}`
).value; ).value;
console.log(this.newGcode[this.tab-1]);
if(this.state.selected =='default'){ if(this.state.selected =='default'){
const file = this.newGcode[this.tab-1]; const file = this.newGcode[this.tab-1];
SvelteComponents.showDialog("Upload", { SvelteComponents.showDialog("Upload", {
file, file,
onComplete: () => { onComplete: () => {
this.last_file_time = macrosName; 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; progress = event.loaded / event.total;
}; };
console.log(file);
console.log(file.name);
xhr.open("PUT", `/api/file/${encodeURIComponent(file.name)}`); xhr.open("PUT", `/api/file/${encodeURIComponent(file.name)}`);
xhr.send(file); xhr.send(file);
} }