mirror of
https://github.com/bellingcat/auto-archiver-extension.git
synced 2026-06-12 21:48:34 +03:00
delete op
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<TaskItem v-for="t in displayTasks" :key="t.id" :initial-task="t" taskType="local" />
|
||||
<TaskItem v-for="t in displayTasks" :key="t.id" :initial-task="t" taskType="local" @remove="deleteTask" />
|
||||
<TaskItem v-for="t in onlineTasks" :key="t.id" :initial-task="t" taskType="online" />
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -140,6 +140,12 @@ export default {
|
||||
addTask: function (task) {
|
||||
this.tasks[task.id] = task;
|
||||
},
|
||||
deleteTask: async function (taskId) {
|
||||
const tasksAfterDelete = await this.callBackground({ action: "deleteTask", taskId });
|
||||
if (tasksAfterDelete === null) return;
|
||||
this.tasks = tasksAfterDelete;
|
||||
M.toast({ html: `archive task deleted`, classes: "green accent-4" });
|
||||
},
|
||||
searchTasks: function () {
|
||||
console.log(`searching tasks? ${!this.isSearchingOnline}`);
|
||||
if (this.isSearchingOnline) {
|
||||
|
||||
@@ -67,6 +67,9 @@ export default {
|
||||
});
|
||||
}.bind(this), 2500);
|
||||
},
|
||||
deleteTask: function () {
|
||||
this.$emit('remove', this.task.id);
|
||||
},
|
||||
taskFinished: function (task) {
|
||||
return task.status == 'SUCCESS' || task.status == 'FAILURE' || task.status == 'REVOKED';
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user