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