Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions src/components/AppNavigation/GroupNavigationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ export default {
},

methods: {
/**
* @param groups
* @param groupId
*/
isInGroup(groups, groupId) {
return groups.includes(groupId)
},
Expand Down Expand Up @@ -236,7 +232,7 @@ export default {
* Open mailto: for contacts in a group
*
* @param {object} group of contacts to be emailed
* @param {string} mode
* @param {string} mode 'to', 'cc' or 'bcc' header
*/
emailGroup(group, mode = 'to') {
const emails = []
Expand Down
2 changes: 2 additions & 0 deletions src/components/CircleDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@
<p>{{ t('contacts', 'Anything shared with this team will show up here') }}</p>
<div v-for="provider in resourceProviders" :key="provider.id">
<ContentHeading>
<!-- eslint-disable-next-line vue/no-v-html -->

Check warning on line 100 in src/components/CircleDetails.vue

View check run for this annotation

Codecov / codecov/patch

src/components/CircleDetails.vue#L100

Added line #L100 was not covered by tests
<span v-show="false" class="provider__icon" v-html="provider.icon" /> {{ provider.name }}
</ContentHeading>

Expand All @@ -110,6 +111,7 @@
<span v-if="resource.iconEmoji" class="resource__icon">
{{ resource.iconEmoji }}
</span>
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-else-if="resource.iconSvg" class="resource__icon" v-html="resource.iconSvg" />
<span v-else-if="resource.iconURL" class="resource__icon">
<img :src="resource.iconURL" alt="">
Expand Down
2 changes: 1 addition & 1 deletion src/components/CircleDetails/CircleConfigs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import { NcCheckboxRadioSwitch as CheckboxRadioSwitch } from '@nextcloud/vue'
import ContentHeading from './ContentHeading.vue'

import { PUBLIC_CIRCLE_CONFIG } from '../../models/constants.ts'
import { PUBLIC_CIRCLE_CONFIG, CircleConfig } from '../../models/constants.ts'
import Circle from '../../models/circle.ts'
import { CircleEdit, editCircle } from '../../services/circles.ts'
import { showError } from '@nextcloud/dialogs'
Expand Down
12 changes: 7 additions & 5 deletions src/components/ContactDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<!-- org, title -->
<template #subtitle>
<template v-if="isReadOnly">
<!-- eslint-disable-next-line vue/no-v-html -->
<span v-html="formattedSubtitle" />
</template>
<template v-else>
Expand Down Expand Up @@ -88,14 +89,14 @@
<IconAccount :size="20" />
</template>
</ActionButton>
<ActionLink v-for="emailAddress in emailAddressList"
:key="emailAddress"
<ActionLink v-for="address in emailAddressList"
:key="address"
class="quick-action"
:href="'mailto:' + emailAddress">
:href="'mailto:' + address">
<template #icon>
<IconMail :size="20" />
</template>
{{ emailAddress }}
{{ address }}
</ActionLink>
<ActionLink v-for="phoneNumber in phoneNumberList"
:key="phoneNumber"
Expand Down Expand Up @@ -402,6 +403,7 @@
import rfcProps from '../models/rfcProps.js'
import validate from '../services/validate.js'

import Contact from '../models/contact.js'

Check warning on line 406 in src/components/ContactDetails.vue

View check run for this annotation

Codecov / codecov/patch

src/components/ContactDetails.vue#L406

Added line #L406 was not covered by tests
import AddNewProp from './ContactDetails/ContactDetailsAddNewProp.vue'
import ContactAvatar from './ContactDetails/ContactDetailsAvatar.vue'
import ContactDetailsProperty from './ContactDetails/ContactDetailsProperty.vue'
Expand Down Expand Up @@ -1035,7 +1037,7 @@
/**
* Should display the property
*
* @param {Property} property the property to check
* @param {object} property the property to check
* @return {boolean}
*/
canDisplay(property) {
Expand Down
1 change: 1 addition & 0 deletions src/components/ContactsList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import { NcAppContentList as AppContentList } from '@nextcloud/vue'
import ContactsListItem from './ContactsList/ContactsListItem.vue'
import VirtualList from 'vue-virtual-scroll-list'
import Contact from '../models/contact.js'

export default {
name: 'ContactsList',
Expand Down
9 changes: 3 additions & 6 deletions src/components/MemberList/MemberList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
import { t } from '@nextcloud/l10n'
import { getRecommendations, getSuggestions } from '../../services/collaborationAutocompletion.js'
import { SHARES_TYPES_MEMBER_MAP, CIRCLES_MEMBER_GROUPING } from '../../models/constants'
import Circle from '../../models/circle.js'
import { defineComponent } from 'vue'

export default defineComponent({
Expand Down Expand Up @@ -125,12 +126,8 @@
},

computed: {
/**
* Return the current circle
*
* @return {Circle}
*/
circle() {

circle(): Circle {

Check warning on line 130 in src/components/MemberList/MemberList.vue

View check run for this annotation

Codecov / codecov/patch

src/components/MemberList/MemberList.vue#L129-L130

Added lines #L129 - L130 were not covered by tests
return this.$store.getters.getCircle(this.selectedCircle)
},

Expand Down
3 changes: 2 additions & 1 deletion src/components/MemberList/MemberListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ import IconExitToApp from 'vue-material-design-icons/ExitToApp.vue'
import IconShieldCheck from 'vue-material-design-icons/ShieldCheck.vue'

import { changeMemberLevel } from '../../services/circles.ts'
import Circle from '../../models/circle.ts'
import { showError } from '@nextcloud/dialogs'
import RouterMixin from '../../mixins/RouterMixin.js'

Expand Down Expand Up @@ -251,7 +252,7 @@ export default {
/**
* Return the promote/demote member action label
*
* @param {MemberLevel} level the member level
* @param {number} level the member level
* @return {string}
*/
levelChangeLabel(level) {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Properties/PropertyMultipleText.vue
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@

<!-- no order enforced: just iterate on all the values -->
<template v-else>
<div v-for="(value, index) in filteredValue"
<div v-for="(valueItem, index) in filteredValue"
:key="index"
class="property__row">
<template v-if="(isReadOnly && filteredValue[index]) || !isReadOnly">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Properties/PropertyTitle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default {
},
bus: {
type: Object,
required: false,
default: () => ({}),
},
},
computed: {
Expand Down
8 changes: 4 additions & 4 deletions src/models/circle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class Circle {
/**
* Creates an instance of Circle
*
* @param data
* @param {object} data Circle data object
*/
constructor(data: object) {
this.updateData(data)
Expand All @@ -30,7 +30,7 @@ export default class Circle {
/**
* Update inner circle data, owner and initiator
*
* @param data
* @param {object} data Updated circle data
*/
updateData(data: any) {
if (typeof data !== 'object') {
Expand Down Expand Up @@ -155,7 +155,7 @@ export default class Circle {
/**
* Add a member to this circle
*
* @param member
* @param {Member} member The member to add to the circle
*/
addMember(member: Member) {
if (member.constructor.name !== Member.name) {
Expand All @@ -172,7 +172,7 @@ export default class Circle {
/**
* Remove a member from this circle
*
* @param member
* @param {Member} member The member to remove from the circle
*/
deleteMember(member: Member) {
if (member.constructor.name !== Member.name) {
Expand Down
2 changes: 1 addition & 1 deletion src/models/contact.js
Original file line number Diff line number Diff line change
Expand Up @@ -560,7 +560,7 @@ export default class Contact {
*
* @readonly
* @memberof Contact
* @return {Property[]} http://mozilla-comm.github.io/ical.js/api/ICAL.Property.html
* @return {object[]} http://mozilla-comm.github.io/ical.js/api/ICAL.Property.html
*/
get properties() {
return this.vCard.getAllProperties()
Expand Down
4 changes: 2 additions & 2 deletions src/models/member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default class Member {
/**
* Creates an instance of Member
*
* @param data
* @param circle
* @param {any} data The member data
* @param {Circle} circle The circle this member belongs to
*/
constructor(data: any, circle: Circle) {
if (typeof data !== 'object') {
Expand Down
6 changes: 4 additions & 2 deletions src/oca/mountContactDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ import store from '../store/index.js'
import logger from '../services/logger.js'

/**
* @param {HTMLElement} el
* @param {string} contactEmailAddress
* Mount the contact details component
*
* @param {HTMLElement} el The element to mount the component to
* @param {string} contactEmailAddress The email address of the contact
* @return {Promise<object>}
*/
export function mountContactDetails(el, contactEmailAddress) {
Expand Down
1 change: 1 addition & 0 deletions src/services/appendContactToGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import axios from '@nextcloud/axios'
import Contact from '../models/contact.js'

/**
* Append a group to a contact
Expand Down
6 changes: 3 additions & 3 deletions src/services/circles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
/**
* Get a specific circle
*
* @param {string} circleId
* @param {string} circleId The ID of the circle to fetch
* @return {object}
*/
export const getCircle = async function(circleId: string) {
Expand All @@ -49,8 +49,8 @@
* Create a new circle
*
* @param {string} name the circle name
* @param personal
* @param local
* @param {boolean} personal Whether the circle is personal
* @param {boolean} local Whether the circle is local
* @return {object}
*/
export const createCircle = async function(name: string, personal: boolean, local: boolean) {
Expand Down Expand Up @@ -79,8 +79,8 @@
*
* @param {string} circleId the circle id
* @param {CircleEditType} type the edit type
* @param {any} data the data

Check warning on line 82 in src/services/circles.ts

View workflow job for this annotation

GitHub Actions / NPM lint

Expected @param names to be "circleId, type, value". Got "circleId, type, data, value"
* @param value

Check warning on line 83 in src/services/circles.ts

View workflow job for this annotation

GitHub Actions / NPM lint

Missing JSDoc @param "value" description
* @return {object}
*/
export const editCircle = async function(circleId: string, type: CircleEditType, value: any) {
Expand Down
3 changes: 2 additions & 1 deletion src/services/removeContactFromGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import axios from '@nextcloud/axios'
import Contact from '../models/contact.js'

/**
* Append a group to a contact
* Remove a group from a contact
*
* @param {Contact} contact the contact model
* @param {string} groupName the group name
Expand Down
3 changes: 2 additions & 1 deletion src/services/renameContactFromGroup.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
import axios from '@nextcloud/axios'
import Contact from '../models/contact.js'

/**
* Append a group to a contact
* Rename a group for a contact
*
* @param {Contact} contact the contact model
* @param {string} oldGroupName name that gets removed
Expand Down
4 changes: 3 additions & 1 deletion src/services/validate.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import Contact from '../models/contact.js'
import checks from './checks/index.js'

/**
* @param contact
* Validate a contact by running it through various checks
*
* @param {Contact} contact The contact to validate
*/
export default function(contact) {
let result = false
Expand Down
4 changes: 2 additions & 2 deletions src/utils/matchTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
/**
* Match a list of types against the available types
*
* @param {Array<string>} selectedTypes
* @param {Array<{id: string, name: string}>} options
* @param {Array<string>} selectedTypes Types to match against options
* @param {Array<{id: string, name: string}>} options Available type options
*/
export function matchTypes(selectedTypes: Array<string>, options: Array<{id: string, name: string}>) {
const items = options.map(option => {
Expand Down
2 changes: 1 addition & 1 deletion src/views/ReadOnlyContactDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<div class="contact-title">
<h6>{{ contact.fullName }}</h6>
<!-- Subtitle -->
<span v-html="formattedSubtitle" />
<span>{{ formattedSubtitle }}</span>
</div>
<div class="contact-details-wrapper">
<div v-for="(properties, name) in groupedProperties"
Expand Down
Loading