This commit is contained in:
@@ -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,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") />
|
||||
|
||||
Reference in New Issue
Block a user