diff --git a/src/components/InboxScreen.vue b/src/components/InboxScreen.vue index 2316f9d..418e4f0 100644 --- a/src/components/InboxScreen.vue +++ b/src/components/InboxScreen.vue @@ -1,7 +1,9 @@ diff --git a/src/components/MailTable.vue b/src/components/MailTable.vue index 8c77efb..13f3fcb 100644 --- a/src/components/MailTable.vue +++ b/src/components/MailTable.vue @@ -4,7 +4,7 @@ {{email.from}} diff --git a/src/composition/useEmailSelection.js b/src/composition/useEmailSelection.js index dd816e5..05e27ba 100644 --- a/src/composition/useEmailSelection.js +++ b/src/composition/useEmailSelection.js @@ -5,12 +5,22 @@ export const useEmailSelection = function(){ let emailSelection = reactive({ emails: emails, - toggle: function(id) { + toggle(id) { if(this.emails.has(id)) { this.emails.delete(id) } else { this.emails.add(id); } + }, + markRead(){ + this.emails.forEach(email => { + email.read = true + }) + }, + markUnread(){ + this.emails.forEach(email => { + email.read = false + }) } })