diff options
author | greta <gretadoci@gmail.com> | 2021-12-13 20:31:55 +0300 |
---|---|---|
committer | greta <gretadoci@gmail.com> | 2021-12-20 13:45:50 +0300 |
commit | da131a0e01f9aac26b382a1139ddf6f2e2f87eac (patch) | |
tree | fa24b26167fdd0a8f94c1abec8927912b4aee223 /src | |
parent | 132259b821e2dae4624c8e1851953f2cb61a2305 (diff) |
Fix mark as spam display
Signed-off-by: greta <gretadoci@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/components/Envelope.vue | 6 | ||||
-rw-r--r-- | src/components/MenuEnvelope.vue | 2 | ||||
-rw-r--r-- | src/components/ThreadEnvelope.vue | 16 | ||||
-rw-r--r-- | src/store/actions.js | 2 |
4 files changed, 21 insertions, 5 deletions
diff --git a/src/components/Envelope.vue b/src/components/Envelope.vue index c98c920ca..d3aa20ce1 100644 --- a/src/components/Envelope.vue +++ b/src/components/Envelope.vue @@ -30,9 +30,9 @@ @click.prevent="onToggleImportant" v-html="importantSvg" /> <div - v-if="data.flags.junk" + v-if="data.flags.$junk" class="app-content-list-item-star icon-junk" - :data-starred="data.flags.junk ? 'true' : 'false'" + :data-starred="data.flags.$junk ? 'true' : 'false'" @click.prevent="onToggleJunk" /> <div class="app-content-list-item-icon"> <Avatar :display-name="addresses" :email="avatarEmail" /> @@ -82,7 +82,7 @@ :close-after-click="true" @click.prevent="onToggleJunk"> {{ - data.flags.junk ? t('mail', 'Mark not spam') : t('mail', 'Mark as spam') + data.flags.$junk ? t('mail', 'Mark not spam') : t('mail', 'Mark as spam') }} </ActionButton> <ActionButton icon="icon-checkmark" diff --git a/src/components/MenuEnvelope.vue b/src/components/MenuEnvelope.vue index 720d62a8f..80bf79c98 100644 --- a/src/components/MenuEnvelope.vue +++ b/src/components/MenuEnvelope.vue @@ -47,7 +47,7 @@ :close-after-click="true" @click.prevent="onToggleJunk"> {{ - envelope.flags.junk ? t('mail', 'Mark not spam') : t('mail', 'Mark as spam') + envelope.flags.$junk ? t('mail', 'Mark not spam') : t('mail', 'Mark as spam') }} </ActionButton> <ActionButton diff --git a/src/components/ThreadEnvelope.vue b/src/components/ThreadEnvelope.vue index c136865cd..a1a7e6fda 100644 --- a/src/components/ThreadEnvelope.vue +++ b/src/components/ThreadEnvelope.vue @@ -39,6 +39,11 @@ class="app-content-list-item-star icon-starred" :data-starred="envelope.flags.flagged ? 'true' : 'false'" @click.prevent="onToggleFlagged" /> + <div + v-if="envelope.flags.$junk" + class="app-content-list-item-star icon-junk" + :data-starred="envelope.flags.$junk ? 'true' : 'false'" + @click.prevent="onToggleJunk" /> <router-link :to="route" event="" @@ -279,6 +284,9 @@ export default { onToggleFlagged() { this.$store.dispatch('toggleEnvelopeFlagged', this.envelope) }, + onToggleJunk() { + this.$store.dispatch('toggleEnvelopeJunk', this.envelope) + }, }, } </script> @@ -392,6 +400,14 @@ export default { margin-left: 27px; cursor: pointer; } + .app-content-list-item-star.icon-junk { + display: inline-block; + position: absolute; + margin-top: -2px; + margin-left: 27px; + cursor: pointer; + opacity: .2; + } .left:not(.seen) { font-weight: bold; } diff --git a/src/store/actions.js b/src/store/actions.js index c617b0d3c..c62bd8c4c 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -652,7 +652,7 @@ export default { }, toggleEnvelopeJunk({ commit, getters }, envelope) { // Change immediately and switch back on error - const oldState = envelope.flags.junk + const oldState = envelope.flags.$junk commit('flagEnvelope', { envelope, flag: '$junk', |