Skip to content

Commit

Permalink
fixup! Add quick actions for contacts
Browse files Browse the repository at this point in the history
Signed-off-by: greta <[email protected]>
  • Loading branch information
GretaD committed Jul 25, 2023
1 parent 6b703db commit 03cbd6f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/PageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function index(): TemplateResponse {
$talkVersion = $this->appManager->getAppVersion('spreed');
$isTalkEnabled = $this->appManager->isEnabledForUser('spreed') === true;

$isTalkVersionCompatible = $this->compareVersion->isCompatible($talkVersion ? $talkVersion : '0.0.0', 15);
$isTalkVersionCompatible = $this->compareVersion->isCompatible($talkVersion ? $talkVersion : '0.0.0', 2);

$this->initialStateService->provideInitialState(Application::APP_ID, 'isGroupSharingEnabled', $isGroupSharingEnabled);
$this->initialStateService->provideInitialState(Application::APP_ID, 'locales', $locales);
Expand Down
7 changes: 5 additions & 2 deletions src/components/ContactDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
</template>
<ActionLink v-for="emailAddress in emailAddressList"
:key="emailAddress"
:href="'email:' + emailAddress">
:href="'mailto:' + emailAddress">
<template #icon>
<IconMail :size="20" />
</template>
Expand All @@ -248,7 +248,7 @@
{{ phoneNumber }}
</ActionLink>
</Actions>
<NcButton v-if="isTalkEnabled"
<NcButton v-if="isTalkEnabled && isInSystemAddressBook"
class="icon-talk"
:href="callUrl" />

Expand Down Expand Up @@ -664,6 +664,9 @@ export default {
callUrl() {

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

View check run for this annotation

Codecov / codecov/patch

src/components/ContactDetails.vue#L663-L664

Added lines #L663 - L664 were not covered by tests
return generateUrl('/apps/spreed/?callUser={uid}', { uid: this.contact.uid })
},
isInSystemAddressBook() {
return this.contact.addressbook.id === 'z-server-generated--system'

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

View check run for this annotation

Codecov / codecov/patch

src/components/ContactDetails.vue#L667-L668

Added lines #L667 - L668 were not covered by tests
},
},
watch: {
Expand Down
2 changes: 1 addition & 1 deletion src/models/rfcProps.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ const properties = {
{ id: 'YOUTUBE', name: 'YouTube', placeholder: 'https://youtube.com/…' },
{ id: 'MASTODON', name: 'Mastodon', placeholder: 'https://mastodon.social/…' },
{ id: 'DIASPORA', name: 'Diaspora', placeholder: 'https://joindiaspora.com/…' },
{ id: 'NEXTCLOUD', name: 'Nextcloud', placeholder: 'https://nextcloud.example.com/…' },
{ id: 'NEXTCLOUD', name: 'Nextcloud', placeholder: 'Link to profile page (https://nextcloud.example.com/…)' },
{ id: 'OTHER', name: 'Other', placeholder: 'https://example.com/…' },
],
primary: true,
Expand Down

0 comments on commit 03cbd6f

Please sign in to comment.