Skip to content

Commit ad58efe

Browse files
committed
fix: fixed linting issues
Signed-off-by: pallavibakale <pallavibakale09@gmail.com>
1 parent 7436924 commit ad58efe

5 files changed

Lines changed: 42 additions & 42 deletions

File tree

src/components/ContactDetails.vue

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@
9393
<IconAccount :size="20" />
9494
</template>
9595
</NcButton>
96-
<Actions
97-
class="quick-action"
96+
<Actions
97+
class="quick-action"
9898
variant="secondary">
9999
<template #icon>
100100
<IconMail :size="20" />
@@ -109,8 +109,8 @@
109109
{{ emailAddress }}
110110
</ActionLink>
111111
</Actions>
112-
<Actions
113-
class="quick-action"
112+
<Actions
113+
class="quick-action"
114114
variant="secondary">
115115
<template #icon>
116116
<IconCall :size="20" />
@@ -223,8 +223,8 @@
223223
</template>
224224
{{ excludeFromBirthdayLabel }}
225225
</ActionButton>
226-
<ActionButton
227-
v-if="canDeleteCard"
226+
<ActionButton
227+
v-if="canDeleteCard"
228228
@click="deleteContact">
229229
<template #icon>
230230
<IconDelete :size="20" />
@@ -282,8 +282,8 @@
282282
<!-- properties iteration -->
283283
<!-- using contact.key in the key and index as key to avoid conflicts between similar data and exact key -->
284284

285-
<div
286-
v-for="(properties, name) in groupedProperties"
285+
<div
286+
v-for="(properties, name) in groupedProperties"
287287
:key="name">
288288
<ContactDetailsProperty
289289
v-for="(property, index) in properties"
@@ -1118,7 +1118,7 @@ export default defineComponent({
11181118
await this.copyContactToAddressbook(this.pickedAddressbook.id)
11191119
this.closePickAddressbookModal()
11201120
} else if (this.addressbooksOptions.length === 1) {
1121-
this.logger.debug('Cloning contact to', {name: this.addressbooksOptions[0].name})
1121+
this.logger.debug('Cloning contact to', { name: this.addressbooksOptions[0].name })
11221122
await this.copyContactToAddressbook(this.addressbooksOptions[0].id)
11231123
} else {
11241124
this.showPickAddressbookModal = true
@@ -1158,7 +1158,7 @@ export default defineComponent({
11581158
contact: this.contact,
11591159
})
11601160
await this.updateContact()
1161-
if (this.newAddressBook && this.newAddressBook !== this.contact.addressbook.id) {
1161+
if (this.newAddressBook && this.newAddressBook !== this.contact.addressbook.id) {
11621162
this.updateAddressBookAccesses(this.newAddressBook)
11631163
this.moveContactToAddressbook(this.newAddressBook)
11641164
this.newAddressBook = null
@@ -1195,7 +1195,7 @@ export default defineComponent({
11951195
11961196
lastUsedAddressBook.id = newAddressBook
11971197
1198-
browserStorage.setItem('last-used-addressbook', JSON.stringify(lastUsedAddressBook))
1198+
browserStorage.setItem('last-used-addressbook', JSON.stringify(lastUsedAddressBook))
11991199
},
12001200
},
12011201
})
@@ -1217,9 +1217,9 @@ export default defineComponent({
12171217
}
12181218
12191219
section.contact-details {
1220-
display: flex;
1221-
flex-direction: column;
1222-
gap: 10px;
1220+
display: flex;
1221+
flex-direction: column;
1222+
gap: 10px;
12231223
}
12241224
12251225
#qrcode-modal {
@@ -1228,7 +1228,7 @@ section.contact-details {
12281228
padding: 10px;
12291229
background-color: #fff;
12301230
.qrcode {
1231-
max-width: 100%;
1231+
max-width: 100%;
12321232
}
12331233
}
12341234
}
@@ -1244,8 +1244,8 @@ section.contact-details {
12441244
}
12451245
12461246
:deep(.vs__selected) {
1247-
height: calc(var(--default-clickable-area) - var(--default-grid-baseline)) !important;
1248-
margin: 0 !important;
1247+
height: calc(var(--default-clickable-area) - var(--default-grid-baseline)) !important;
1248+
margin: 0 !important;
12491249
}
12501250
12511251
#pick-addressbook-modal {
@@ -1258,9 +1258,9 @@ section.contact-details {
12581258
padding: 10px;
12591259
background-color: #fff;
12601260
.multiselect {
1261-
flex: 1 1 100%;
1262-
width: 100%;
1263-
margin-bottom: 20px;
1261+
flex: 1 1 100%;
1262+
width: 100%;
1263+
margin-bottom: 20px;
12641264
}
12651265
}
12661266
}
@@ -1272,11 +1272,11 @@ section.contact-details {
12721272
12731273
:deep(.button-vue--vue-tertiary:hover),
12741274
:deep(.button-vue--vue-tertiary:active) {
1275-
background-color: var(--color-primary-element-light-hover) !important;
1275+
background-color: var(--color-primary-element-light-hover) !important;
12761276
}
12771277
12781278
.related-resources {
1279-
display: inline-grid;
1279+
display:inline-grid;
12801280
margin-top: 88px;
12811281
flex-direction: column;
12821282
margin-bottom: -30px;
@@ -1293,21 +1293,21 @@ section.contact-details {
12931293
}
12941294
12951295
.last-edit {
1296-
display: inline-flex;
1296+
display: inline-flex;
12971297
}
12981298
// forcing the size only for contacts app to fit the text size of the contacts app
12991299
:deep(.related-resources__header h5) {
13001300
font-size: medium;
1301-
opacity: 0.7;
1301+
opacity: .7;
13021302
color: var(--color-primary-element);
13031303
}
13041304
13051305
.address-book {
1306-
min-width: 260px !important;
1306+
min-width: 260px !important;
13071307
}
13081308
13091309
.empty-content {
1310-
height: 100%;
1310+
height: 100%;
13111311
}
13121312
13131313
.contact-title {
@@ -1317,18 +1317,18 @@ section.contact-details {
13171317
}
13181318
13191319
:deep(.contact-details-wrapper-read-only .input-field__input) {
1320-
box-shadow: none !important;
1320+
box-shadow: none !important;
13211321
}
13221322
13231323
:deep(.vs__selected-options) {
1324-
max-height: 30px;
1324+
max-height: 30px;
13251325
}
13261326
13271327
:deep(.v-select) {
1328-
margin-bottom: 0 !important;
1328+
margin-bottom: 0 !important;
13291329
}
13301330
13311331
.quick-actions {
1332-
display: flex;
1332+
display: flex;
13331333
}
13341334
</style>

src/components/ContactDetails/ContactDetailsProperty.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,9 +404,9 @@ export default {
404404
if (id === this.propName && this.isLastProperty) {
405405
this.$nextTick(() => {
406406
const comp = this.$refs.component
407-
const el = comp?.$el instanceof HTMLElement ? comp.$el : (comp instanceof HTMLElement ? comp : null)
407+
const el = comp?.$el instanceof HTMLElement ? comp.$el : (comp instanceof HTMLElement ? comp : null)
408408
if (!el || !el.querySelectorAll) {
409-
console.warn('No focusable element found for property', this.propName)
409+
console.warn('No focusable element found for property', this.propName)
410410
return
411411
}
412412
const inputs = el.querySelectorAll('input, textarea')

src/mixins/PropertyMixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ export default {
147147

148148
this.localContact.vCard.addPropertyWithValue(`${group}.x-ablabel`, label.name)
149149
setPropertyAlias(name, propGroup)
150-
150+
151151
this.$emit('update')
152152
},
153153

src/models/contact.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import store from '../store/index.js'
1919
* @return {boolean}
2020
*/
2121
function isEmpty(value) {
22-
return (Array.isArray(value) && value.join('') === '') || (!Array.isArray(value) && value === '')
22+
return (Array.isArray(value) && value.join('') === '') || (!Array.isArray(value) && value === '')
2323
}
2424

2525
export const ContactKindProperties = ['KIND', 'X-ADDRESSBOOKSERVER-KIND']
@@ -556,7 +556,7 @@ export default class Contact {
556556
socialLink(type) {
557557
if (this.vCard.hasProperty('x-socialprofile')) {
558558
const x = this.vCard.getAllProperties('x-socialprofile').filter((a) => a.jCal[1].type.toString() === type)
559-
559+
560560
if (x.length > 0) {
561561
return x[0].jCal[3].toString()
562562
}

src/store/contacts.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ function sortData(a, b) {
3737
? nameA.localeCompare(nameB)
3838
: nameB - nameA
3939
// if equal, fallback to the key
40-
return score !== 0
41-
? score
42-
: a.key.localeCompare(b.key)
40+
return score !== 0
41+
? score
42+
: a.key.localeCompare(b.key)
4343
}
4444

4545
function sortByFavoriteAndName(a, b) {
@@ -158,7 +158,7 @@ const mutations = {
158158
// favorite comes before non-favorite
159159
const differentFavStatus = other.favorite !== sortedContact.favorite
160160
const otherShouldComeFirst = differentFavStatus && other.favorite
161-
const sameFavAndSortedFirst = !differentFavStatus && sortData(other, sortedContact) >= 0
161+
const sameFavAndSortedFirst = !differentFavStatus && sortData(other, sortedContact) >= 0
162162

163163
if (otherShouldComeFirst || sameFavAndSortedFirst) {
164164
continue
@@ -194,7 +194,7 @@ const mutations = {
194194
state.contacts[contact.key].updateContact(contact.jCal)
195195

196196
// restore favorite on dav if it was lost during the update
197-
if (state.contacts[contact.key].dav && state.contacts[contact.key].dav.favorite === undefined) {
197+
if (state.contacts[contact.key].dav && state.contacts[contact.key].dav.favorite === undefined) {
198198
state.contacts[contact.key].dav.favorite = existingFavorite
199199
}
200200

@@ -251,7 +251,7 @@ const mutations = {
251251
state.sortedContacts[index].key = newContact.key
252252
state.sortedContacts[index].value = newContact[state.orderKey]
253253
} else {
254-
console.error('Error while replacing the addressbook of following contact', contact)
254+
console.error('Error while replacing the addressbook of following contact', contact)
255255
}
256256
},
257257

@@ -486,7 +486,7 @@ const actions = {
486486
newContact.dav.favorite = savedFavorite
487487
context.commit('updateContact', newContact)
488488
})
489-
.catch((error) => { throw error })
489+
.catch((error) => { throw error })
490490
},
491491
}
492492

0 commit comments

Comments
 (0)