Skip to content

Commit

Permalink
obtain config data from server
Browse files Browse the repository at this point in the history
  • Loading branch information
d0u9 committed Oct 23, 2017
1 parent 7aaa559 commit af567b9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions youtube_dl_webui/static/js/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,26 @@ var videoDownload = (function (Vue, extendAM){
this.modalType = 'about';
},
preference: function() {
var _self = this;
var url = _self.headPath + 'config';

this.showModal = true;
this.modalType = 'updatePreference';
Vue.http.get(url).then(function(res) {
var responseJSON = JSON.parse(res.data);
if (responseJSON.status === 'error') {
return false;
} else {
config = responseJSON['config'];
for (let cls in config) {
items = config[cls];
for (let id in items) {
console.log(cls);
console.log(items[id]);
}
}
}
});
},
selected: function(index){
var _self = this;
Expand Down

0 comments on commit af567b9

Please sign in to comment.