Add spinner visibility for worker creation process in dev center

This commit is contained in:
Nariman Jelveh
2025-08-06 18:56:17 -07:00
parent ac35dc55f0
commit e8f6b06723

View File

@@ -6,6 +6,9 @@ let search_query;
window.create_worker = async (name, filePath = null) => {
let worker;
// show spinner
puter.ui.showSpinner();
// Use provided file path or default to the default worker file
const workerFile = filePath;
@@ -87,6 +90,9 @@ $(document).on('click', '.create-a-worker-btn', async function (e) {
await create_worker(name, selectedFile.path);
// Refresh the worker list to show the new worker
await refresh_worker_list();
// hide spinner
puter.ui.hideSpinner();
}
}
})