Commit b1172824 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

FileManager: implemented handling of inline info diffs

parent 8233ca86
......@@ -18,9 +18,10 @@ define([
}.bind(this));
this.socket.on("watch", function(data) {
if (data.event != "change") return;
this.reload();
// TODO: handle inline diffs
if (data.event == "modify" && data.subject_infos) {
this.vue.content.$emit("patch", data.subject_infos);
} else
this.reload();
}.bind(this));
if (this.autoPathLabel)
......
......@@ -182,6 +182,17 @@ define([
this.items = items;
}.bind(this));
},
patch: function(infos) {
var infoByName = {};
infos.forEach(function(info){
infoByName[info.name]=info
});
this.items.forEach(function(item){
var update = infoByName[item.name];
if (update)
Vue.util.extend(item, update);
});
},
filterStart: function() {
this.filterStart();
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment