Move to Inbox bulk action button

This commit is contained in:
Jeffrey Biles
2020-04-22 20:14:38 -07:00
parent 74fc736388
commit 1d24b17269
2 changed files with 13 additions and 2 deletions

View File

@@ -16,10 +16,16 @@
:disabled="Array.from(emailSelection.emails).every(e => !e.read)"> :disabled="Array.from(emailSelection.emails).every(e => !e.read)">
Mark Unread Mark Unread
</button> </button>
<button @click="emailSelection.archive()" <button v-if="selectedScreen == 'inbox'"
@click="emailSelection.archive()"
:disabled="numberSelected == 0"> :disabled="numberSelected == 0">
Archive Archive
</button> </button>
<button v-else
@click="emailSelection.moveToInbox()"
:disabled="numberSelected == 0">
Move to Inbox
</button>
</span> </span>
</div> </div>
</template> </template>
@@ -62,6 +68,10 @@
emails: { emails: {
type: Array, type: Array,
required: true required: true
},
selectedScreen: {
type: String,
required: true
} }
} }
} }

View File

@@ -10,7 +10,8 @@
<h1>VMail Inbox</h1> <h1>VMail Inbox</h1>
<BulkActionBar :emails="filteredEmails" /> <BulkActionBar :emails="filteredEmails"
:selectedScreen="selectedScreen" />
<MailTable :emails="filteredEmails" /> <MailTable :emails="filteredEmails" />
</template> </template>