Skip to content

Commit

Permalink
Improve UI to show if threads are filtered
Browse files Browse the repository at this point in the history
  • Loading branch information
JumanaFM committed Mar 31, 2022
1 parent 87c1ccb commit 684bef2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/style/plugin.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
top: 0;
right: 0;
line-height: normal;
font-size: 16px;
font-size: 12px;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
background: #fff;
z-index: 99999;
Expand Down
13 changes: 12 additions & 1 deletion src/components/list/ListView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div v-if="!isCollapsed">
<div class="list-header">
<span class="count">
{{ threads.length }} of {{ totalLabel }}
<span v-bind:class="{ 'filterdThreads': currentThreadsCount !== totalCount}">{{ currentThreadsCount }}</span> of {{ totalLabel }}
</span>
<span class="toggle-highlights" v-tooltip="showHighlights ? 'hide highlights' : 'show highlights'" @click="toggleHighlights">
<font-awesome-icon v-if="showHighlights" icon="eye" class="icon"></font-awesome-icon>
Expand Down Expand Up @@ -146,6 +146,9 @@ export default {
this.sortBy = this.currentConfigs.sortByConfig
},
computed: {
currentThreadsCount: function () {
return this.threads.length
},
totalLabel: function () {
if (this.totalCount === 1) {
return '1 thread'
Expand Down Expand Up @@ -216,3 +219,11 @@ export default {
}
}
</script>
<style>
.filterdThreads {
background: yellow;
font-weight: bold;
font-style: italic;
}
</style>

0 comments on commit 684bef2

Please sign in to comment.