Bare app - remove everything except styling, db.json, and packages

This commit is contained in:
Jeffrey Biles
2020-03-29 01:38:36 -07:00
parent 9c1b2a6ecc
commit 11c6ac7bad
10 changed files with 1 additions and 436 deletions

View File

@@ -1,71 +0,0 @@
<template>
<div class="bulk-action-bar">
<span class="checkbox">
<input type="checkbox" :checked="allAreSelected" @click="bulkSelect">
<span v-if="!allAreSelected && numberSelected > 0">-</span> <!-- later on this minus sign will be in the checkbox, as it is in gmail -->
</span>
<span class="buttons">
<button @click="emailSelection.markRead()"
:disabled="Array.from(emailSelection.emails).every(e => e.read)"
v-if="actions.includes('markRead')">
Mark Read
</button>
<button @click="emailSelection.markUnread()"
:disabled="Array.from(emailSelection.emails).every(e => !e.read)"
v-if="actions.includes('markUnread')">
Mark Unread
</button>
<button @click="emailSelection.archive()"
:disabled="numberSelected == 0"
v-if="actions.includes('archive')">
Archive
</button>
<button @click="emailSelection.moveToInbox()"
:disabled="numberSelected == 0"
v-if="actions.includes('moveToInbox')">
Move to Inbox
</button>
</span>
</div>
</template>
<script>
import useEmailSelection from '../composition/useEmailSelection';
import { computed } from 'vue';
export default {
setup({emails}){
let {emailSelection} = useEmailSelection();
let numberSelected = computed(() => {
return emailSelection.emails.size;
})
let allAreSelected = computed(() => {
return emails.length == numberSelected.value;
})
let bulkSelect = function(){
if(allAreSelected.value) {
emailSelection.clear();
} else {
emailSelection.addMultiple(emails)
}
}
return { emailSelection, allAreSelected, bulkSelect, numberSelected }
},
props: {
emails: {
type: Array,
default: []
},
actions: {
type: Array,
default: ['markRead', 'markUnread']
}
}
}
</script>
<style scoped>
</style>