logs: Added logs-table that looks like old logs site.
the build was successful

This commit is contained in:
2018-10-28 14:21:17 +01:00
parent 850114af2d
commit ea89975b14
7 changed files with 75 additions and 3 deletions
+1 -2
View File
@@ -21,14 +21,13 @@ module.exports = class {
if (type === "search") {
this.state.filter = Object.assign({}, this.state.filter, {search: filter})
} else {
this.state.filter = Object.assign({}, this.state.filter, {[type]: (this.state.filter[type] || []).concat(filter)})
this.state.filter = Object.assign({}, this.state.filter, {[type]: (this.state.filter[type] || []).filter(f => f !== filter).concat(filter)})
}
this.refresh()
}
removeFilter(type, filter) {
if (type === "search") {
this.state.filter = Object.assign({}, this.state.filter, {search: null})
this.refresh()
+1 -1
View File
@@ -1,7 +1,7 @@
<background src="/assets/images/bg.png" opacity=0.25 />
<logs-menu key="menu" on-select("open") on-removefilter("removeFilter") selected=(input.selected || {}) user=input.user filter=state.filter characters=input.characters />
<main>
<logs-list logs=state.logs />
<logs-table logs=state.logs on-addfilter("addFilter") />
</main>
<add-log-modal enabled=(state.modal === "log.add") on-close("close") />
<add-filter-modal enabled=(state.modal === "filter.add") characters=input.characters filter=state.filter on-add("addFilter") on-close("close") />