Rusty-slicer/src/progress.js
2024-03-03 15:32:53 +01:00

8 lines
414 B
JavaScript

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);
})