logging svelte and js
This commit is contained in:
@@ -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);
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user