Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2022-05-20 15:43:30 +0300
committerJoas Schilling <coding@schilljs.com>2022-05-20 15:43:30 +0300
commit494e6b0835cb7cacc890d9ae8ad3b855dc69de39 (patch)
tree2aebe46d4743470445b6dc42ba93573c8bab8464 /src/components/RightSidebar/Participants/ParticipantsSearchResults
parent89184f046cd0c1906fd1d29eb77d22381beaca3f (diff)
Allow apps to register participant search actions
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'src/components/RightSidebar/Participants/ParticipantsSearchResults')
-rw-r--r--src/components/RightSidebar/Participants/ParticipantsSearchResults/ParticipantsSearchResults.vue27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/components/RightSidebar/Participants/ParticipantsSearchResults/ParticipantsSearchResults.vue b/src/components/RightSidebar/Participants/ParticipantsSearchResults/ParticipantsSearchResults.vue
index 371f68b0a..265a7188a 100644
--- a/src/components/RightSidebar/Participants/ParticipantsSearchResults/ParticipantsSearchResults.vue
+++ b/src/components/RightSidebar/Participants/ParticipantsSearchResults/ParticipantsSearchResults.vue
@@ -46,6 +46,18 @@
@click="handleClickParticipant" />
</template>
+ <template v-if="integrations.length !== 0">
+ <AppNavigationCaption :title="t('spreed', 'Integrations')" />
+
+ <ul>
+ <li v-for="(integration, index) in integrations"
+ :key="'integration' + index"
+ @click="runIntegration(integration)">
+ {{ integration.label }}
+ </li>
+ </ul>
+ </template>
+
<template v-if="addableRemotes.length !== 0">
<AppNavigationCaption :title="t('spreed', 'Add federated users')" />
<ParticipantsList :items="addableRemotes"
@@ -135,6 +147,11 @@ export default {
type: Boolean,
default: false,
},
+
+ searchText: {
+ type: String,
+ default: '',
+ },
},
computed: {
@@ -144,6 +161,10 @@ export default {
|| (this.isCirclesEnabled && !this.addableCircles.length)
},
+ integrations() {
+ return this.$store.getters.participantSearchActions.filter((integration) => integration.show(this.searchText))
+ },
+
sourcesWithoutResultsList() {
if (!this.addableUsers.length) {
if (!this.addableGroups.length) {
@@ -237,6 +258,12 @@ export default {
handleClickHint() {
this.$emit('click-search-hint')
},
+
+ runIntegration(integration) {
+ integration.callback(this.searchText).then((participant) => {
+ this.$emit('click', participant)
+ })
+ },
},
}
</script>