Rusty-slicer/src/progress.js

8 lines
414 B
JavaScript
Raw Normal View History

2024-03-03 14:32:53 +00:00
const { listen } = window.__TAURI__.event
// listen for progress update from rust backend
const unlistenprogress = await listen('progress_state_changed', (event) => {
document.getElementById("progress_label").innerHTML = "Slicing : "+event.payload.message+"%";
document.getElementById("progress_bar").value = event.payload.message;
console.log("changing progress bar state to : ", event.payload.message);
})