diff options
Diffstat (limited to 'src')
34 files changed, 286 insertions, 218 deletions
diff --git a/src/admin-settings.js b/src/admin-settings.js index d9635b2a..2a7ebf85 100644 --- a/src/admin-settings.js +++ b/src/admin-settings.js @@ -25,6 +25,9 @@ import AdminSettings from './components/AdminSettings' document.addEventListener('DOMContentLoaded', main) +/** + * + */ function main() { Vue.prototype.t = t diff --git a/src/components/AppContent/CircleContent.vue b/src/components/AppContent/CircleContent.vue index cbe59bcc..0d668cea 100644 --- a/src/components/AppContent/CircleContent.vue +++ b/src/components/AppContent/CircleContent.vue @@ -108,7 +108,8 @@ export default { /** * Is the current circle empty - * @returns {boolean} + * + * @return {boolean} */ isEmptyCircle() { return this.members.length === 0 diff --git a/src/components/AppContent/ContactsContent.vue b/src/components/AppContent/ContactsContent.vue index 2f1f23a9..7cd2ef3d 100644 --- a/src/components/AppContent/ContactsContent.vue +++ b/src/components/AppContent/ContactsContent.vue @@ -123,14 +123,16 @@ export default { /** * Is this a real group ? * Aka not a dynamically generated one like `All contacts` - * @returns {boolean} + * + * @return {boolean} */ isRealGroup() { return this.groups.findIndex(group => group.name === this.selectedGroup) > -1 }, /** * Is the current group empty - * @returns {boolean} + * + * @return {boolean} */ isEmptyGroup() { return this.contactsList.length === 0 @@ -144,6 +146,7 @@ export default { methods: { /** * Forward the addContactsToGroup event to the parent + * * @param {string} groupName the group name */ addContactsToGroup(groupName) { @@ -154,7 +157,7 @@ export default { * Forward the newContact event to the parent */ newContact() { - this.$emit('newContact') + this.$emit('new-contact') }, /** @@ -165,7 +168,7 @@ export default { this.$router.push({ name: 'group', params: { - selectedGroup: this.selectedGroup + selectedGroup: this.selectedGroup, }, }) }, diff --git a/src/components/AppNavigation/GroupNavigationItem.vue b/src/components/AppNavigation/GroupNavigationItem.vue index 5b925466..389c7807 100644 --- a/src/components/AppNavigation/GroupNavigationItem.vue +++ b/src/components/AppNavigation/GroupNavigationItem.vue @@ -83,7 +83,7 @@ export default { /** * Download group of contacts * - * @param {Object} group of contacts to be downloaded + * @param {object} group of contacts to be downloaded */ downloadGroup(group) { // get grouped contacts diff --git a/src/components/AppNavigation/Settings/SettingsAddressbook.vue b/src/components/AppNavigation/Settings/SettingsAddressbook.vue index 97f5a2af..b2f4400f 100644 --- a/src/components/AppNavigation/Settings/SettingsAddressbook.vue +++ b/src/components/AppNavigation/Settings/SettingsAddressbook.vue @@ -22,7 +22,7 @@ --> <template> <div class="settings-addressbook-list"> - <div class="icon-group settings-line__icon"></div> + <div class="icon-group settings-line__icon" /> <li :class="{'addressbook--disabled': !addressbook.enabled}" class="addressbook"> <!-- addressbook name --> <span class="addressbook__name" :title="addressbook.displayName"> diff --git a/src/components/AppNavigation/Settings/SettingsAddressbookShare.vue b/src/components/AppNavigation/Settings/SettingsAddressbookShare.vue index 54efd8ba..c0e22b8d 100644 --- a/src/components/AppNavigation/Settings/SettingsAddressbookShare.vue +++ b/src/components/AppNavigation/Settings/SettingsAddressbookShare.vue @@ -93,7 +93,7 @@ export default { /** * Share addressbook * - * @param {Object} data destructuring object + * @param {object} data destructuring object * @param {string} data.user the userId * @param {string} data.displayName the displayName * @param {string} data.uri the sharing principalScheme uri diff --git a/src/components/AppNavigation/Settings/SettingsNewAddressbook.vue b/src/components/AppNavigation/Settings/SettingsNewAddressbook.vue index 797b29f2..e6898392 100644 --- a/src/components/AppNavigation/Settings/SettingsNewAddressbook.vue +++ b/src/components/AppNavigation/Settings/SettingsNewAddressbook.vue @@ -22,7 +22,7 @@ <template> <div class="new-addressbook-entry"> - <div class="icon-add settings-line__icon"></div> + <div class="icon-add settings-line__icon" /> <form id="new-addressbook-form" :disabled="loading" :class="{'icon-loading-small': loading}" diff --git a/src/components/AppNavigation/Settings/SettingsSortContacts.vue b/src/components/AppNavigation/Settings/SettingsSortContacts.vue index e350aa9a..9607e029 100644 --- a/src/components/AppNavigation/Settings/SettingsSortContacts.vue +++ b/src/components/AppNavigation/Settings/SettingsSortContacts.vue @@ -22,7 +22,7 @@ <template> <div class="sort-contacts"> - <div class="icon-category-organization settings-line__icon"></div> + <div class="icon-category-organization settings-line__icon" /> <Multiselect id="sort-by" :value="orderKeyOption" diff --git a/src/components/CircleDetails.vue b/src/components/CircleDetails.vue index d45208e1..85cc5110 100644 --- a/src/components/CircleDetails.vue +++ b/src/components/CircleDetails.vue @@ -184,6 +184,7 @@ export default { methods: { /** * Autocomplete @mentions on the description + * * @param {string} search the search term * @param {Function} callback callback to be called with results array */ diff --git a/src/components/CircleDetails/CircleConfigs.vue b/src/components/CircleDetails/CircleConfigs.vue index 762774b2..e99f51f9 100644 --- a/src/components/CircleDetails/CircleConfigs.vue +++ b/src/components/CircleDetails/CircleConfigs.vue @@ -81,6 +81,7 @@ export default { /** * On toggle, add or remove the config bitwise + * * @param {CircleConfig} config the circle config to manage * @param {boolean} checked checked or not */ diff --git a/src/components/ContactDetails.vue b/src/components/ContactDetails.vue index 489e01f2..5b8bf3b5 100644 --- a/src/components/ContactDetails.vue +++ b/src/components/ContactDetails.vue @@ -320,7 +320,7 @@ export default { /** * Warning messages * - * @returns {Object|boolean} + * @return {object | boolean} */ warning() { if (!this.contact.dav) { @@ -340,7 +340,7 @@ export default { /** * Conflict message * - * @returns {string|boolean} + * @return {string|boolean} */ conflict() { if (this.contact.conflict) { @@ -352,7 +352,7 @@ export default { /** * Contact properties copied and sorted by rfcProps.fieldOrder * - * @returns {Array} + * @return {Array} */ sortedProperties() { return this.localContact.properties @@ -367,7 +367,7 @@ export default { /** * Contact properties filtered and grouped by rfcProps.fieldOrder * - * @returns {Object} + * @return {object} */ groupedProperties() { return this.sortedProperties @@ -390,7 +390,7 @@ export default { /** * Fake model to use the propertySelect component * - * @returns {Object} + * @return {object} */ addressbookModel() { return { @@ -404,7 +404,7 @@ export default { * Usable addressbook object linked to the local contact * * @param {string} [addressbookId] set the addressbook id - * @returns {string} + * @return {string} */ addressbook: { get() { @@ -418,7 +418,7 @@ export default { /** * Fake model to use the propertyGroups component * - * @returns {Object} + * @return {object} */ groupsModel() { return { @@ -431,7 +431,7 @@ export default { * Usable groups object linked to the local contact * * @param {string[]} data An array of groups - * @returns {Array} + * @return {Array} */ groups: { get() { @@ -447,7 +447,7 @@ export default { * Store getters filtered and mapped to usable object * This is the list of addressbooks that are available to write * - * @returns {Array} + * @return {Array} */ addressbooksOptions() { return this.addressbooks @@ -743,7 +743,7 @@ export default { * Should display the property * * @param {Property} property the property to check - * @returns {boolean} + * @return {boolean} */ canDisplay(property) { // Make sure we have some model for the property and check for ITEM.PROP custom label format diff --git a/src/components/ContactDetails/ContactDetailsAddNewProp.vue b/src/components/ContactDetails/ContactDetailsAddNewProp.vue index a4fe6b37..7774b192 100644 --- a/src/components/ContactDetails/ContactDetailsAddNewProp.vue +++ b/src/components/ContactDetails/ContactDetailsAddNewProp.vue @@ -65,7 +65,8 @@ export default { /** * Rfc props - * @returns {Object} + * + * @return {object} */ properties() { return rfcProps.properties @@ -74,7 +75,7 @@ export default { /** * List of properties that the contact already have * - * @returns {string[]} + * @return {string[]} */ usedProperties() { return this.contact.jCal[1].map(prop => prop[0]) @@ -84,7 +85,7 @@ export default { * List of every properties you are allowed to add * on this contact * - * @returns {Object[]} + * @return {object[]} */ availableProperties() { return Object.keys(this.properties) @@ -104,7 +105,7 @@ export default { /** * Add a new prop to the contact * - * @param {Object} data destructuring object + * @param {object} data destructuring object * @param {string} data.id the id of the property. e.g fn */ addProp({ id }) { diff --git a/src/components/ContactDetails/ContactDetailsAvatar.vue b/src/components/ContactDetails/ContactDetailsAvatar.vue index 1be908bb..1700c8dd 100644 --- a/src/components/ContactDetails/ContactDetailsAvatar.vue +++ b/src/components/ContactDetails/ContactDetailsAvatar.vue @@ -217,7 +217,7 @@ export default { /** * Handler to store a new photo on the current contact * - * @param {Object} event the event object containing the image + * @param {object} event the event object containing the image */ processFile(event) { if (event.target.files && !this.loading) { @@ -292,7 +292,7 @@ export default { * Return the word with (only) the first letter capitalized * * @param {string} word the word to handle - * @returns {string} the word with the first letter capitalized + * @return {string} the word with the first letter capitalized */ capitalize(word) { return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase() @@ -301,7 +301,7 @@ export default { * Return the mimetype based on the first magix byte * * @param {string} signature the first 4 bytes - * @returns {string} the mimetype + * @return {string} the mimetype */ getMimetype(signature) { switch (signature) { @@ -324,8 +324,8 @@ export default { /** * Update the contact photo * - * @param {String} data the photo as base64 binary string - * @param {String} type mimetype + * @param {string} data the photo as base64 binary string + * @param {string} type mimetype */ setPhoto(data, type) { // Init with empty data @@ -414,7 +414,7 @@ export default { /** * Downloads the Avatar from social media * - * @param {String} network the social network to use (or 'any' for first match) + * @param {string} network the social network to use (or 'any' for first match) */ async getSocialAvatar(network) { diff --git a/src/components/ContactDetails/ContactDetailsProperty.vue b/src/components/ContactDetails/ContactDetailsProperty.vue index 7b8891b3..15e1114a 100644 --- a/src/components/ContactDetails/ContactDetailsProperty.vue +++ b/src/components/ContactDetails/ContactDetailsProperty.vue @@ -129,7 +129,7 @@ export default { /** * Return the type of the prop e.g. FN * - * @returns {string} + * @return {string} */ propName() { // ! is this a ITEMXX.XXX property?? @@ -144,7 +144,7 @@ export default { * Return the type or property * * @see src/models/rfcProps - * @returns {string} + * @return {string} */ propType() { // if we have a force type set, use it! @@ -159,7 +159,7 @@ export default { * RFC template matching this property * * @see src/models/rfcProps - * @returns {Object} + * @return {object} */ propModel() { return this.properties[this.propName] @@ -170,7 +170,7 @@ export default { * but make sure to include the selected one * in the final list * - * @returns {Object[]} + * @return {object[]} */ sortedModelOptions() { if (this.propModel.options) { @@ -188,7 +188,7 @@ export default { * Return the id and type of a property group * e.g ITEMXX.tel => ['ITEMXX', 'tel'] * - * @returns {Array} + * @return {Array} */ propGroup() { return this.property.name.split('.') @@ -197,7 +197,7 @@ export default { /** * Return the associated X-ABLABEL if any * - * @returns {Property} + * @return {Property} */ propLabel() { return this.localContact.vCard.getFirstProperty(`${this.propGroup[0]}.x-ablabel`) @@ -208,7 +208,7 @@ export default { * or return the default selected as a new object if * none exists * - * @returns Object|null + * @return Object|null */ selectType: { get() { diff --git a/src/components/ContactsList.vue b/src/components/ContactsList.vue index b63e25bb..c604023a 100644 --- a/src/components/ContactsList.vue +++ b/src/components/ContactsList.vue @@ -112,7 +112,7 @@ export default { /** * Scroll to the desired contact if in the list and not visible * - * @param {String} key the contact unique key + * @param {string} key the contact unique key */ scrollToContact(key) { const item = this.$el.querySelector('#' + btoa(key).slice(0, -2)) @@ -139,7 +139,7 @@ export default { * Is this matching the current search ? * * @param {Contact} contact the contact to search - * @returns {boolean} + * @return {boolean} */ matchSearch(contact) { if (this.searchQuery.trim() !== '') { diff --git a/src/components/EntityPicker/EntityPicker.vue b/src/components/EntityPicker/EntityPicker.vue index 888ed668..d2725775 100644 --- a/src/components/EntityPicker/EntityPicker.vue +++ b/src/components/EntityPicker/EntityPicker.vue @@ -215,7 +215,8 @@ export default { /** * Are we handling a single entity type ? - * @returns {boolean} + * + * @return {boolean} */ isSingleType() { return !(this.dataTypes.length > 1) @@ -223,7 +224,8 @@ export default { /** * Is the current selection empty - * @returns {boolean} + * + * @return {boolean} */ isEmptySelection() { return Object.keys(this.selectionSet).length === 0 @@ -232,7 +234,8 @@ export default { /** * Formatted search input placeholder based on * available types - * @returns {string} + * + * @return {string} */ searchPlaceholderTypes() { const types = this.dataTypes @@ -244,7 +247,8 @@ export default { /** * Available data based on current search if query * is valid, returns default full data et otherwise - * @returns {Object[]} + * + * @return {object[]} */ searchSet() { // If internal search is enabled and we have a search query, filter data set @@ -258,7 +262,8 @@ export default { /** * Returns available entities grouped by type(s) if any - * @returns {Object[]} + * + * @return {object[]} */ availableEntities() { // If only one type, return the full set directly @@ -305,6 +310,7 @@ export default { onSubmit() { /** * Emitted when user submit the form + * * @type {Array} the selected entities */ this.$emit('submit', Object.values(this.selectionSet)) @@ -313,6 +319,7 @@ export default { onSearch: debounce(function() { /** * Emitted when search change + * * @type {string} the search query */ this.$emit('search', this.searchQuery) @@ -320,7 +327,8 @@ export default { /** * Remove entity from selection - * @param {Object} entity the entity to remove + * + * @param {object} entity the entity to remove */ onDelete(entity) { this.$delete(this.selectionSet, entity.id, entity) @@ -329,7 +337,8 @@ export default { /** * Add/remove entity from selection - * @param {Object} entity the entity to add + * + * @param {object} entity the entity to add */ onClick(entity) { if (entity.id in this.selectionSet) { @@ -344,7 +353,8 @@ export default { /** * Toggle entity from selection - * @param {Object} entity the entity to add/remove + * + * @param {object} entity the entity to add/remove */ onToggle(entity) { if (entity.id in this.selectionSet) { diff --git a/src/components/EntityPicker/NewCircleIntro.vue b/src/components/EntityPicker/NewCircleIntro.vue index aaba64d4..6005217d 100644 --- a/src/components/EntityPicker/NewCircleIntro.vue +++ b/src/components/EntityPicker/NewCircleIntro.vue @@ -142,6 +142,7 @@ export default { onSubmit() { /** * Emitted when user submit the form + * * @type {Array} the selected entities */ this.$emit('submit', this.circleName, this.isPersonal, this.isLocal) diff --git a/src/components/MemberList.vue b/src/components/MemberList.vue index 8ee4a6cb..5ed7b899 100644 --- a/src/components/MemberList.vue +++ b/src/components/MemberList.vue @@ -131,7 +131,8 @@ export default { computed: { /** * Return the current circle - * @returns {Circle} + * + * @return {Circle} */ circle() { return this.$store.getters.getCircle(this.selectedCircle) @@ -192,6 +193,7 @@ export default { * Show picker and fetch for recommendations * Cache the circleId in case the url change or something * and make sure we add them to the desired circle. + * * @param {string} circleId the circle id to add members to */ async onShowPicker(circleId) { @@ -216,6 +218,7 @@ export default { /** * On EntityPicker search. * Returns recommendations if empty + * * @param {string} term the searched term */ async onSearch(term) { @@ -239,6 +242,7 @@ export default { /** * On picker submit + * * @param {Array} selection the selection to add to the circle */ async onPickerPick(selection) { diff --git a/src/components/MembersList/MembersListItem.vue b/src/components/MembersList/MembersListItem.vue index 877b4078..329f2d84 100644 --- a/src/components/MembersList/MembersListItem.vue +++ b/src/components/MembersList/MembersListItem.vue @@ -139,7 +139,8 @@ export default { computed: { /** * Return the current circle - * @returns {Circle} + * + * @return {Circle} */ circle() { return this.$store.getters.getCircle(this.selectedCircle) @@ -147,7 +148,8 @@ export default { /** * Current member level translated name - * @returns {string} + * + * @return {string} */ levelName() { if (this.source.level === MemberLevels.NONE) { @@ -160,7 +162,8 @@ export default { /** * Current user member level - * @returns {number} + * + * @return {number} */ currentUserLevel() { |