File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 33
33
<SettingsImportContacts v-if =" !loadingContacts && isEmptyGroup && !isChartView" />
34
34
<!-- new-contact-button -->
35
35
<Button v-if =" !loadingContacts"
36
- type =" secondary"
37
- :wide =" true"
38
36
:disabled =" !defaultAddressbook"
37
+ type =" secondary"
38
+ wide
39
39
@click =" newContact" >
40
40
<template #icon >
41
41
<IconAdd :size =" 20" />
42
42
</template >
43
- {{ t('contacts','New contact') }}
43
+ {{ isCirclesView ? t('contacts','Add member') : t('contacts','New contact') }}
44
44
</Button >
45
45
</div >
46
46
</RootNavigation >
@@ -95,6 +95,7 @@ import rfcProps from '../models/rfcProps.js'
95
95
96
96
import client from ' ../services/cdav.js'
97
97
import isCirclesEnabled from ' ../services/isCirclesEnabled.js'
98
+ import { emit } from ' @nextcloud/event-bus'
98
99
99
100
export default {
100
101
name: ' Contacts' ,
@@ -175,6 +176,11 @@ export default {
175
176
isChartView () {
176
177
return !! this .selectedChart
177
178
},
179
+
180
+ isCirclesView () {
181
+ return !! this .selectedCircle
182
+ },
183
+
178
184
/**
179
185
* Are we importing contacts ?
180
186
*
@@ -282,6 +288,10 @@ export default {
282
288
283
289
methods: {
284
290
async newContact () {
291
+ if (this .isCirclesView ) {
292
+ emit (' contacts:circles:append' , this .selectedCircle .id )
293
+ return
294
+ }
285
295
const rev = new VCardTime ()
286
296
const contact = new Contact (`
287
297
BEGIN:VCARD
You can’t perform that action at this time.
0 commit comments