summaryrefslogtreecommitdiffstats
path: root/src/components/CallView
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/CallView')
-rw-r--r--src/components/CallView/shared/EmptyCallView.vue24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/components/CallView/shared/EmptyCallView.vue b/src/components/CallView/shared/EmptyCallView.vue
index 662773910..81e2028a8 100644
--- a/src/components/CallView/shared/EmptyCallView.vue
+++ b/src/components/CallView/shared/EmptyCallView.vue
@@ -29,19 +29,17 @@
</p>
<NcButton v-if="showLink"
type="primary"
- @click.stop.prevent="copyLinkToConversation">
+ @click.stop.prevent="handleCopyLink">
{{ t('spreed', 'Copy link') }}
</NcButton>
</div>
</template>
<script>
-import { showError, showSuccess } from '@nextcloud/dialogs'
-import { generateUrl } from '@nextcloud/router'
-
import NcButton from '@nextcloud/vue/dist/Components/NcButton.js'
import { CONVERSATION, PARTICIPANT } from '../../../constants.js'
+import { copyLinkToConversation } from '../../../services/urlService.js'
export default {
@@ -161,24 +159,13 @@ export default {
showLink() {
return this.isPublicConversation && !this.isPasswordRequestConversation && !this.isFileConversation
},
-
- linkToConversation() {
- return window.location.protocol + '//' + window.location.host + generateUrl('/call/' + this.token)
- },
-
},
methods: {
- async copyLinkToConversation() {
- try {
- await navigator.clipboard.writeText(this.linkToConversation)
- showSuccess(t('spreed', 'Conversation link copied to clipboard'))
- } catch (error) {
- showError(t('spreed', 'The link could not be copied'))
- }
+ async handleCopyLink() {
+ await copyLinkToConversation(this.token)
},
},
-
}
</script>
@@ -201,12 +188,13 @@ export default {
width: 64px;
margin: 0 auto 15px;
}
+
button {
margin: 4px auto;
}
h2, p {
- color: #ffffff;
+ color: #FFFFFF;
}
&--sidebar {