opml file import/export handlers
This commit is contained in:
parent
a203792b1d
commit
6753a113ad
5 changed files with 50 additions and 0 deletions
|
|
@ -74,5 +74,11 @@
|
|||
return api('put', '/api/settings', data)
|
||||
},
|
||||
},
|
||||
upload_opml: function(form) {
|
||||
return fetch('/opml/import', {
|
||||
method: 'post',
|
||||
body: new FormData(form),
|
||||
})
|
||||
},
|
||||
}
|
||||
})()
|
||||
|
|
|
|||
|
|
@ -240,5 +240,9 @@ var vm = new Vue({
|
|||
}
|
||||
api.items.update(item.id, {status: item.status})
|
||||
},
|
||||
importOPML: function(event) {
|
||||
var form = document.querySelector('#opml-import-form')
|
||||
api.upload_opml(form)
|
||||
},
|
||||
}
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue