fix for filter_entries used on selection

This commit is contained in:
Milos Stojanovic
2021-01-13 10:21:49 +01:00
parent caa9c1ef8d
commit fa066e7bfb

View File

@@ -146,12 +146,12 @@
</template>
</b-table>
<section class="is-flex is-justify-between">
<section id="bottom-info" class="is-flex is-justify-between">
<div>
<span>{{ lang('Selected', checked.length, totalCount) }}</span>
</div>
<div v-if="(showAllEntries || hasFilteredEntries) ">
<input type="checkbox" id="checkbox" v-model="showAllEntries" @click="loadFiles">
<input type="checkbox" id="checkbox" @click="toggleHidden">
<label for="checkbox"> {{ lang('Show hidden') }}</label>
</div>
</section>
@@ -224,9 +224,8 @@ export default {
to: to.query.cd
})
.then(ret => {
ret.files = this.filterEntries(ret.files)
this.$store.commit('setCwd', {
content: ret.files,
content: this.filterEntries(ret.files),
location: ret.location,
})
this.isLoading = false
@@ -243,6 +242,11 @@ export default {
}
},
methods: {
toggleHidden() {
this.showAllEntries = !this.showAllEntries
this.loadFiles()
this.checked = []
},
filterEntries(files){
var filter_entries = this.$store.state.config.filter_entries
this.hasFilteredEntries = false
@@ -281,9 +285,8 @@ export default {
to: '',
})
.then(ret => {
ret.files = this.filterEntries(ret.files)
this.$store.commit('setCwd', {
content: ret.files,
content: this.filterEntries(ret.files),
location: ret.location,
})
})
@@ -626,6 +629,9 @@ export default {
#multi-actions a {
margin: 0 15px 15px 0;
}
#bottom-info {
padding: 15px 0;
}
.file-row a {
color: #373737;
}