mirror of
https://github.com/knadh/listmonk.git
synced 2025-01-04 13:20:17 +08:00
Hide confirmed/unconfirmed from single opt-in lists on the UI. Ref #741
This commit is contained in:
parent
a7ac8ce527
commit
bfce146895
1 changed files with 10 additions and 1 deletions
|
@ -97,7 +97,7 @@
|
||||||
<b-table-column v-slot="props" field="subscriber_counts"
|
<b-table-column v-slot="props" field="subscriber_counts"
|
||||||
header-class="cy-subscribers" width="10%">
|
header-class="cy-subscribers" width="10%">
|
||||||
<div class="fields stats">
|
<div class="fields stats">
|
||||||
<p v-for="(count, status) in props.row.subscriberStatuses" :key="status">
|
<p v-for="(count, status) in filterStatuses(props.row)" :key="status">
|
||||||
<label>{{ $tc(`subscribers.status.${status}`, count) }}</label>
|
<label>{{ $tc(`subscribers.status.${status}`, count) }}</label>
|
||||||
<span :class="status">{{ $utils.formatNumber(count) }}</span>
|
<span :class="status">{{ $utils.formatNumber(count) }}</span>
|
||||||
</p>
|
</p>
|
||||||
|
@ -219,6 +219,15 @@ export default Vue.extend({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
filterStatuses(list) {
|
||||||
|
const out = { ...list.subscriberStatuses };
|
||||||
|
if (list.optin === 'single') {
|
||||||
|
delete out.unconfirmed;
|
||||||
|
delete out.confirmed;
|
||||||
|
}
|
||||||
|
return out;
|
||||||
|
},
|
||||||
|
|
||||||
getLists() {
|
getLists() {
|
||||||
this.$api.getLists({
|
this.$api.getLists({
|
||||||
page: this.queryParams.page,
|
page: this.queryParams.page,
|
||||||
|
|
Loading…
Reference in a new issue