Skip to content
This repository has been archived by the owner on Feb 2, 2019. It is now read-only.

Commit

Permalink
clearFilter method, clear filter on unload + load after load
Browse files Browse the repository at this point in the history
vers update
  • Loading branch information
robflop committed Oct 11, 2017
1 parent afbd3ec commit b2e6de4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ToL-Mod-Utility",
"version": "1.1.2",
"version": "1.1.3",
"productName": "ToL-Mod-Utility",
"description": "Moderation utility for Throne of Lies player reports.",
"main": "./src/client",
Expand Down
10 changes: 8 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ const app = new Vue({
this.days = this.savedChatLogs.filter(line => /\(Day\) Day \d+/.test(line)).length;
this.nights = this.savedChatLogs.filter(line => /\(Day\) Night \d+/.test(line)).length;

this.clearFilter(); // for loading another match without unloading first

return this.isLoaded = true;
},

unloadMatch() {
this.chatLogsInput = this.matchInfoInput = this.parsedMatchInfo = this.parsedChatLogs = this.savedChatLogs = '';
this.selectedType = this.selectedPlayer = this.selectedDay = this.selectedNight = 'All';
this.days = this.nights = 0;
this.clearFilter();

return this.isLoaded = false;
},
Expand Down Expand Up @@ -128,7 +130,11 @@ const app = new Vue({
});
}

this.parsedChatLogs = chatLogs;
return this.parsedChatLogs = chatLogs;
},

clearFilter() {
return this.selectedType = this.selectedPlayer = this.selectedDay = this.selectedNight = 'All';
}
}
});

0 comments on commit b2e6de4

Please sign in to comment.