Added difference ignore button

This commit is contained in:
2018-03-09 14:48:00 +01:00
parent 1e63498fa3
commit cb9e277718
10 changed files with 84 additions and 18 deletions

20
scripts/Actions/Editor.ts Normal file
View File

@ -0,0 +1,20 @@
import { AnimeNotifier } from "../AnimeNotifier"
// newAnimeDiffIgnore
export function newAnimeDiffIgnore(arn: AnimeNotifier, button: HTMLButtonElement) {
if(!confirm("Are you sure you want to permanently ignore this difference?")) {
return
}
let id = button.dataset.id
let hash = button.dataset.hash
arn.post(`/api/new/ignoreanimedifference`, {
id,
hash
})
.then(() => {
arn.reloadContent()
})
.catch(err => arn.statusMessage.showError(err))
}