summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2018-12-03 17:32:05 +0100
committerJulius Härtl <jus@bitgrid.net>2018-12-04 15:58:29 +0100
commit5054a65d21da3efbba8bb941fbab3a3f467b8163 (patch)
treefe4408514b061089a28950161e6c3f0e86ed6d73 /src
parentc2282a0ab8ec36189cf5178a9a8915f7716cc6b0 (diff)
Fix avatar/search in composer
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'src')
-rw-r--r--src/App.vue6
-rw-r--r--src/components/Composer.vue4
2 files changed, 6 insertions, 4 deletions
diff --git a/src/App.vue b/src/App.vue
index 5108225b..bc26bd4c 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -9,7 +9,7 @@
<p v-if="!serverData.checks.checks.wellknown">{{ t('social', 'Social needs the .well-known automatic discovery to be properly set up. If Nextcloud is not installed in the root of the domain, it is often the case that Nextcloud can\'t configure this automatically. To use Social, the admin of this Nextcloud instance needs to manually configure the .well-known redirects: ') }}<a class="external_link" href="https://docs.nextcloud.com/server/15/go.php?to=admin-setup-well-known-URL" target="_blank"
rel="noreferrer noopener">{{ t('social', 'Open documentation') }} ↗</a></p>
</div>
- <Search v-if="searchTerm != ''" :term="searchTerm" />
+ <Search v-if="searchTerm !== ''" :term="searchTerm" />
<router-view v-if="searchTerm === ''" :key="$route.fullPath" />
</div>
</div>
@@ -178,7 +178,9 @@ export default {
this.$store.commit('setServerData', JSON.parse(document.getElementById('serverData').dataset.server))
}
- this.search = new OCA.Search(this.search, this.resetSearch)
+ if (!this.serverData.public) {
+ this.search = new OCA.Search(this.search, this.resetSearch)
+ }
},
methods: {
hideInfo() {
diff --git a/src/components/Composer.vue b/src/components/Composer.vue
index d2b9513e..da3ae720 100644
--- a/src/components/Composer.vue
+++ b/src/components/Composer.vue
@@ -349,7 +349,7 @@ export default {
key: user.preferredUsername,
value: user.account,
url: user.url,
- avatar: user.local ? OC.generateUrl(`/avatar/${user.preferredUsername}/32`) : ''// TODO: use real avatar from server
+ avatar: user.local ? OC.generateUrl(`/avatar/${user.preferredUsername}/32`) : OC.generateUrl(`apps/social/api/v1/global/actor/avatar?id=${user.id}`)
})
}
cb(users)
@@ -496,7 +496,7 @@ export default {
})
},
remoteSearch(text) {
- return axios.get(OC.generateUrl('apps/social/api/v1/accounts/search?search=' + text))
+ return axios.get(OC.generateUrl('apps/social/api/v1/global/accounts/search?search=' + text))
}
}
}