Started working on job UI implementation
This commit is contained in:
@ -70,4 +70,17 @@ export async function multiSearchAnime(arn: AnimeNotifier, textarea: HTMLTextAre
|
||||
|
||||
results.classList.remove("hidden")
|
||||
showSearchResults(arn, results)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// Start background job
|
||||
export async function startJob(arn: AnimeNotifier, button: HTMLButtonElement) {
|
||||
let jobName = button.dataset.job
|
||||
|
||||
if(!confirm(`Are you sure you want to start the "${jobName}" job?`)) {
|
||||
return
|
||||
}
|
||||
|
||||
await arn.post(`/api/job/${jobName}/start`)
|
||||
arn.reloadContent()
|
||||
}
|
||||
|
Reference in New Issue
Block a user