diff options
author | dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> | 2019-12-08 10:22:10 +0000 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2019-12-08 17:48:12 +0100 |
commit | 213a1fc421da26a9d3852721aaf1cd3fbdc7b162 (patch) | |
tree | 3c036c4d500cc40c3eb2bbbf89943e15f6a5d24f /src/components | |
parent | 544cc04f1608e8c0555cde50dbccd6e0e964589b (diff) |
Bump eslint-config-nextcloud from 0.0.6 to 0.1.0
Bumps [eslint-config-nextcloud](https://github.com/nextcloud/eslint-config-nextcloud) from 0.0.6 to 0.1.0.
- [Release notes](https://github.com/nextcloud/eslint-config-nextcloud/releases)
- [Commits](https://github.com/nextcloud/eslint-config-nextcloud/compare/v0.0.6...v0.1.0)
Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
Diffstat (limited to 'src/components')
24 files changed, 231 insertions, 231 deletions
diff --git a/src/components/Actions/ActionCopyNtoFN.vue b/src/components/Actions/ActionCopyNtoFN.vue index 278239c6..0d756f7e 100644 --- a/src/components/Actions/ActionCopyNtoFN.vue +++ b/src/components/Actions/ActionCopyNtoFN.vue @@ -32,7 +32,7 @@ import ActionsMixin from '../../mixins/ActionsMixin' export default { name: 'ActionCopyNtoFN', components: { - ActionButton + ActionButton, }, mixins: [ActionsMixin], methods: { @@ -45,7 +45,7 @@ export default { this.component.contact.fullName = n.slice(0, 2).reverse().join(' ') this.component.updateContact() } - } - } + }, + }, } </script> diff --git a/src/components/Actions/ActionToggleYear.vue b/src/components/Actions/ActionToggleYear.vue index 0ad9dacd..9bc3e1b4 100644 --- a/src/components/Actions/ActionToggleYear.vue +++ b/src/components/Actions/ActionToggleYear.vue @@ -34,12 +34,12 @@ import ActionsMixin from '../../mixins/ActionsMixin' export default { name: 'ActionToggleYear', components: { - ActionCheckbox + ActionCheckbox, }, mixins: [ActionsMixin], data() { return { - omitYear: false + omitYear: false, } }, @@ -74,7 +74,7 @@ export default { const dateObject = this.component.localValue.toJSON() this.component.updateValue(dateObject, true) this.omitYear = !this.omitYear - } - } + }, + }, } </script> diff --git a/src/components/ContactDetails.vue b/src/components/ContactDetails.vue index 364d6316..e0980985 100644 --- a/src/components/ContactDetails.vue +++ b/src/components/ContactDetails.vue @@ -218,18 +218,18 @@ export default { ContactProperty, PropertyGroups, PropertyRev, - PropertySelect + PropertySelect, }, props: { loading: { type: Boolean, - default: true + default: true, }, contactKey: { type: String, - default: undefined - } + default: undefined, + }, }, data() { @@ -246,7 +246,7 @@ export default { loadingData: true, loadingUpdate: false, openedMenu: false, - qrcode: '' + qrcode: '', } }, @@ -267,12 +267,12 @@ export default { if (!this.contact.dav) { return { icon: 'icon-error-white header-icon--pulse', - msg: t('contacts', 'This contact is not yet synced. Edit it to save it to the server.') + msg: t('contacts', 'This contact is not yet synced. Edit it to save it to the server.'), } } else if (this.isReadOnly) { return { icon: 'icon-eye-white', - msg: t('contacts', 'This contact is in read-only mode. You do not have permission to edit this contact.') + msg: t('contacts', 'This contact is in read-only mode. You do not have permission to edit this contact.'), } } return false @@ -297,7 +297,7 @@ export default { */ colorAvatar() { try { - let color = this.contact.uid.toRgb() + const color = this.contact.uid.toRgb() return `rgb(${color.r}, ${color.g}, ${color.b})` } catch (e) { return 'grey' @@ -328,7 +328,7 @@ export default { return { readableName: t('contacts', 'Addressbook'), icon: 'icon-address-book', - options: this.addressbooksOptions + options: this.addressbooksOptions, } }, @@ -344,7 +344,7 @@ export default { }, set: function(addressbookId) { this.moveContactToAddressbook(addressbookId) - } + }, }, /** @@ -355,7 +355,7 @@ export default { groupsModel() { return { readableName: t('contacts', 'Groups'), - icon: 'icon-contacts' + icon: 'icon-contacts', } }, @@ -372,7 +372,7 @@ export default { set: function(data) { this.contact.groups = data this.debounceUpdateContact() - } + }, }, /** @@ -386,7 +386,7 @@ export default { .map(addressbook => { return { id: addressbook.id, - name: addressbook.displayName + name: addressbook.displayName, } }) }, @@ -397,7 +397,7 @@ export default { }, contact() { return this.$store.getters.getContact(this.contactKey) - } + }, }, watch: { @@ -405,7 +405,7 @@ export default { if (this.contactKey) { this.selectContact(this.contactKey) } - } + }, }, beforeMount() { @@ -454,11 +454,11 @@ export default { * Generate a qrcode for the contact */ showQRcode() { - let jCal = this.contact.jCal.slice(0) + const jCal = this.contact.jCal.slice(0) // do not encode photo jCal[1] = jCal[1].filter(props => props[0] !== 'photo') - let data = stringify(jCal) + const data = stringify(jCal) if (data.length > 0) { this.qrcode = btoa(qr.imageSync(data, { type: 'svg' })) } @@ -483,7 +483,7 @@ export default { async selectContact(key) { // local version of the contact this.loadingData = true - let contact = this.$store.getters.getContact(key) + const contact = this.$store.getters.getContact(key) if (contact) { // if contact exists AND if exists on server @@ -524,7 +524,7 @@ export default { * @param {string} addressbookId the desired addressbook ID */ async moveContactToAddressbook(addressbookId) { - let addressbook = this.addressbooks.find(search => search.id === addressbookId) + const addressbook = this.addressbooks.find(search => search.id === addressbookId) this.loadingUpdate = true if (addressbook) { try { @@ -532,15 +532,15 @@ export default { // we need to use the store contact, not the local contact // using this.contact and not this.localContact contact: this.contact, - addressbook + addressbook, }) // select the contact again this.$router.push({ name: 'contact', params: { selectedGroup: this.$route.params.selectedGroup, - selectedContact: contact.key - } + selectedContact: contact.key, + }, }) } catch (error) { console.error(error) @@ -572,7 +572,7 @@ export default { */ updateLocalContact(contact) { // create empty contact and copy inner data - let localContact = Object.assign( + const localContact = Object.assign( Object.create(Object.getPrototypeOf(contact)), contact ) @@ -588,7 +588,7 @@ export default { e.preventDefault() this.debounceUpdateContact() } - } - } + }, + }, } </script> diff --git a/src/components/ContactDetails/ContactDetailsAddNewProp.vue b/src/components/ContactDetails/ContactDetailsAddNewProp.vue index 13520ac7..c6b3ac64 100644 --- a/src/components/ContactDetails/ContactDetailsAddNewProp.vue +++ b/src/components/ContactDetails/ContactDetailsAddNewProp.vue @@ -49,14 +49,14 @@ export default { name: 'ContactDetailsAddNewProp', components: { - PropertyTitle + PropertyTitle, }, props: { contact: { type: Contact, - default: null - } + default: null, + }, }, computed: { @@ -92,10 +92,10 @@ export default { .map(key => { return { id: key, - name: this.properties[key].readableName + name: this.properties[key].readableName, } }).sort((a, b) => a.name.localeCompare(b.name)) - } + }, }, methods: { @@ -108,17 +108,17 @@ export default { addProp({ id }) { if (this.properties[id] && this.properties[id].defaultjCal && this.properties[id].defaultjCal[this.contact.version]) { - let defaultjCal = this.properties[id].defaultjCal[this.contact.version] - let property = new ICAL.Property([id, ...defaultjCal]) + const defaultjCal = this.properties[id].defaultjCal[this.contact.version] + const property = new ICAL.Property([id, ...defaultjCal]) this.contact.vCard.addProperty(property) } else { - let defaultData = this.properties[id].defaultValue - let property = this.contact.vCard.addPropertyWithValue(id, defaultData ? defaultData.value : '') + const defaultData = this.properties[id].defaultValue + const property = this.contact.vCard.addPropertyWithValue(id, defaultData ? defaultData.value : '') if (defaultData && defaultData.type) { property.setParameter('type', defaultData.type) } } - } - } + }, + }, } </script> diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue index a8762983..8aa0e125 100644 --- a/src/components/ContactDetails/ContactDetailsAvatar.vue +++ b/src/components/ContactDetails/ContactDetailsAvatar.vue @@ -98,14 +98,14 @@ export default { components: { ActionLink, - ActionButton + ActionButton, }, props: { contact: { type: Object, - required: true - } + required: true, + }, }, data() { @@ -115,7 +115,7 @@ export default { loading: false, root: generateRemoteUrl(`dav/files/${OC.getCurrentUser().uid}`), width: 0, - height: 0 + height: 0, } }, computed: { @@ -124,7 +124,7 @@ export default { return this.contact.addressbook.readOnly } return false - } + }, }, mounted() { // update image size on window resize @@ -142,10 +142,10 @@ export default { if (event.target.files && !this.loading) { this.closeMenu() - let file = event.target.files[0] + const file = event.target.files[0] if (file && file.size && file.size <= 1 * 1024 * 1024) { - let reader = new FileReader() - let self = this + const reader = new FileReader() + const self = this reader.onload = function(e) { // only getting the raw binary base64 @@ -228,7 +228,7 @@ export default { 'image/gif', 'image/x-xbitmap', 'image/bmp', - 'image/svg+xml' + 'image/svg+xml', ]) .build() @@ -238,7 +238,7 @@ export default { try { const { get } = await axios() const response = await get(`${this.root}${file}`, { - responseType: 'arraybuffer' + responseType: 'arraybuffer', }) const type = response.headers['content-type'] const data = Buffer.from(response.data, 'binary').toString('base64') @@ -317,9 +317,9 @@ export default { } } } - } + }, - } + }, } </script> diff --git a/src/components/ContactDetails/ContactDetailsProperty.vue b/src/components/ContactDetails/ContactDetailsProperty.vue index ece501e1..bcbfbe4e 100644 --- a/src/components/ContactDetails/ContactDetailsProperty.vue +++ b/src/components/ContactDetails/ContactDetailsProperty.vue @@ -57,25 +57,25 @@ export default { props: { property: { type: Property, - default: true + default: true, }, sortedProperties: { type: Array, default() { return [] - } + }, }, index: { type: Number, - default: 0 + default: 0, }, contact: { type: Contact, - default: null + default: null, }, localContact: { type: Contact, - default: null + default: null, }, /** * This is needed so that we can update @@ -83,8 +83,8 @@ export default { */ updateContact: { type: Function, - default: () => {} - } + default: () => {}, + }, }, computed: { @@ -222,12 +222,12 @@ export default { if (this.propLabel) { return { id: this.propLabel.name, - name: this.propLabel.getFirstValue() + name: this.propLabel.getFirstValue(), } } if (this.propModel && this.propModel.options && this.type) { - let selectedType = this.type + const selectedType = this.type // vcard 3.0 save pref alongside TYPE .filter(type => type !== 'pref') // we only use uppercase strings @@ -236,17 +236,17 @@ export default { // Compare array and score them by how many matches they have to the selected type // sorting directly is cleaner but slower // https://jsperf.com/array-map-and-intersection-perf - let matchingTypes = this.propModel.options + const matchingTypes = this.propModel.options .map(type => { return { type, // "WORK,HOME" => ['WORK', 'HOME'] - score: type.id.split(',').filter(value => selectedType.indexOf(value) !== -1).length + score: type.id.split(',').filter(value => selectedType.indexOf(value) !== -1).length, } }) // Sort by score, filtering out the null score and selecting the first match - let matchingType = matchingTypes + const matchingType = matchingTypes .sort((a, b) => b.score - a.score) .filter(type => type.score > 0)[0] @@ -256,13 +256,13 @@ export default { } if (this.type) { // vcard 3.0 save pref alongside TYPE - let selectedType = this.type + const selectedType = this.type .filter(type => type !== 'pref') .join(',') if (selectedType.trim() !== '') { return { id: selectedType, - name: selectedType + name: selectedType, } } } @@ -291,7 +291,7 @@ export default { } } this.updateContact() - } + }, }, @@ -316,13 +316,13 @@ export default { this.property.setValue(data) } this.updateContact() - } + }, }, // property meta type type: { get() { - let type = this.property.getParameter('type') + const type = this.property.getParameter('type') // ensure we have an array if (type) { return Array.isArray(type) ? type : [type] @@ -331,7 +331,7 @@ export default { }, set(data) { this.property.setParameter('type', data) - } + }, }, // property meta pref @@ -341,8 +341,8 @@ export default { }, set(data) { this.property.setParameter('pref', data) - } - } + }, + }, }, methods: { @@ -352,7 +352,7 @@ export default { deleteProp() { this.localContact.vCard.removeProperty(this.property) this.updateContact() - } - } + }, + }, } </script> diff --git a/src/components/ContactsList.vue b/src/components/ContactsList.vue index a4dd589a..a8a20312 100644 --- a/src/components/ContactsList.vue +++ b/src/components/ContactsList.vue @@ -52,31 +52,31 @@ export default { components: { ContactsListItem, - RecycleScroller + RecycleScroller, }, props: { list: { type: Array, - required: true + required: true, }, contacts: { type: Object, - required: true + required: true, }, loading: { type: Boolean, - default: true + default: true, }, searchQuery: { type: String, - default: '' - } + default: '', + }, }, data() { return { - itemHeight: 68 + itemHeight: 68, } }, @@ -89,7 +89,7 @@ export default { }, filteredList() { return this.list.filter(contact => this.matchSearch(this.contacts[contact.key])) - } + }, }, watch: { @@ -107,7 +107,7 @@ export default { this.scrollToContact(this.selectedContact) }) } - } + }, }, methods: { @@ -159,7 +159,7 @@ export default { return contact.searchData.toString().toLowerCase().search(this.searchQuery.trim().toLowerCase()) !== -1 } return true - } - } + }, + }, } </script> diff --git a/src/components/ContactsList/ContactsListItem.vue b/src/components/ContactsList/ContactsListItem.vue index af6846e6..40a0ef87 100644 --- a/src/components/ContactsList/ContactsListItem.vue +++ b/src/components/ContactsList/ContactsListItem.vue @@ -64,23 +64,23 @@ export default { filters: { firstLetter(value) { return value.charAt(0) - } + }, }, props: { index: { type: Number, - required: true + required: true, }, contact: { type: Object, - required: true - } + required: true, + }, }, data() { return { deleteInterval: null, deleteTimeout: null, - countdown: 7 + countdown: 7, } }, computed: { @@ -106,7 +106,7 @@ export default { */ colorAvatar() { try { - let color = this.contact.uid.toRgb() + const color = this.contact.uid.toRgb() return `rgb(${color.r}, ${color.g}, ${color.b})` } catch (e) { return 'grey' @@ -117,7 +117,7 @@ export default { return `url(${this.contact.photoUrl})` } return `url(${this.contact.url}?photo)` - } + }, }, methods: { /** @@ -159,7 +159,7 @@ export default { selectContact() { // change url with router this.$router.push({ name: 'contact', params: { selectedGroup: this.selectedGroup, selectedContact: this.contact.key } }) - } - } + }, + }, } </script> diff --git a/src/components/ImportScreen.vue b/src/components/ImportScreen.vue index 6da8a09a..e6e665bc 100644 --- a/src/components/ImportScreen.vue +++ b/src/components/ImportScreen.vue @@ -76,7 +76,7 @@ export default { return this.total <= 0 ? 0 : Math.floor(this.progress / this.total * 100) - } - } + }, + }, } </script> diff --git a/src/components/Properties/PropertyActions.vue b/src/components/Properties/PropertyActions.vue index 19ce5f02..2232e2ca 100644 --- a/src/components/Properties/PropertyActions.vue +++ b/src/components/Properties/PropertyActions.vue @@ -39,24 +39,24 @@ export default { name: 'PropertyActions', components: { - ActionButton + ActionButton, }, props: { actions: { type: Array, - default: () => [] + default: () => [], }, propertyComponent: { type: Object, - required: true - } + required: true, + }, }, methods: { deleteProperty() { this.$emit('delete') - } - } + }, + }, } </script> diff --git a/src/components/Properties/PropertyDateTime.vue b/src/components/Properties/PropertyDateTime.vue index a9b2cce2..31c6bab5 100644 --- a/src/components/Properties/PropertyDateTime.vue +++ b/src/components/Properties/PropertyDateTime.vue @@ -87,7 +87,7 @@ export default { components: { DatetimePicker, PropertyTitle, - PropertyActions + PropertyActions, }, mixins: [PropertyMixin], @@ -96,8 +96,8 @@ export default { value: { type: [VCardTime, String], default: '', - required: true - } + required: true, + }, }, data() { @@ -111,26 +111,26 @@ export default { // locale and lang data locale: 'en', - firstDay: window.firstDay === 0 ? 7 : window.firstDay, // provided by nextcloud + firstDay: window.firstDay === 0 ? 7 : window.firstDay, // provided by nextcloud lang: { - days: window.dayNamesShort, // provided by nextcloud - months: window.monthNamesShort, // provided by nextcloud + days: window.dayNamesShort, // provided by nextcloud + months: window.monthNamesShort, // provided by nextcloud placeholder: { - date: t('contacts', 'Select Date') - } + date: t('contacts', 'Select Date'), + }, }, dateFormat: { stringify: (date) => { return date ? this.formatDateTime() : null - } - } + }, + }, } }, computed: { gridLength() { - let hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0 - let isLast = this.isLastProperty ? 1 : 0 + const hasTitle = this.isFirstProperty && this.propModel.icon ? 1 : 0 + const isLast = this.isLastProperty ? 1 : 0 // length is always one & add one space at the end return hasTitle + 1 + isLast }, @@ -142,7 +142,7 @@ export default { return new VCardTime.fromDateAndOrTimeString(this.localValue) } return this.localValue - } + }, }, async mounted() { @@ -180,7 +180,7 @@ export default { const objMap = ['year', 'month', 'day', 'hour', 'minute', 'second'] const rawArray = moment(date).toArray() - let dateObject = rawArray.reduce((acc, cur, index) => { + const dateObject = rawArray.reduce((acc, cur, index) => { acc[objMap[index]] = cur return acc }, {}) @@ -250,7 +250,7 @@ export default { // this is the only possibility for us to ensure // no data is lost. e.g. if no second are set // the second will be null and not 0 - let datetimeData = this.vcardTimeLocalValue.toJSON() + const datetimeData = this.vcardTimeLocalValue.toJSON() let datetime = '' const ignoreYear = this.property.getParameter('x-apple-omit-year') @@ -286,10 +286,10 @@ export default { .locale(this.locale) .format( this.inputType === 'datetime' - ? 'llll' // date & time display + ? 'llll' // date & time displa |