File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 *
2121 */
2222
23+ /**
24+ * This file provides various computed properties related to the currently
25+ * logged-in user.
26+ *
27+ * @mixin
28+ */
29+
2330import serverData from './serverData'
31+
2432export default {
2533 mixins : [
2634 serverData
2735 ] ,
2836 computed : {
37+ /**
38+ * Returns an object describing the currently logged-in user
39+ *
40+ * @returns {Object }
41+ *
42+ */
2943 currentUser ( ) {
3044 return OC . getCurrentUser ( )
3145 } ,
46+ /**
47+ * Returns the ActivityPub ID of the currently logged-in user
48+ *
49+ * @returns {String }
50+ *
51+ */
3252 socialId ( ) {
3353 return '@' + this . cloudId
3454 } ,
55+ /**
56+ * Returns the ActivityPub ID of the currently logged-in user,
57+ * minus the leading '@'
58+ *
59+ * @returns {String }
60+ *
61+ */
3562 cloudId ( ) {
3663 return this . currentUser . uid + '@' + this . hostname
3764 }
Original file line number Diff line number Diff line change 11<template >
22 <div class =" social__wrapper" >
3- <composer />
3+ <composer v-if = " currentUser.uid!=='' " />
44 <timeline-entry :item =" mainPost" />
55 <!-- Do not show replies when composing a reply to a remote post -->
66 <timeline-list v-if =" $route.name==='single-post'" />
2424import Composer from ' ../components/Composer.vue'
2525import TimelineEntry from ' ../components/TimelineEntry.vue'
2626import TimelineList from ' ../components/TimelineList.vue'
27+ import CurrentUserMixin from ' ../mixins/currentUserMixin'
2728
2829export default {
2930 name: ' TimelineSinglePost' ,
@@ -33,6 +34,7 @@ export default {
3334 TimelineList
3435 },
3536 mixins: [
37+ CurrentUserMixin
3638 ],
3739 data () {
3840 return {
@@ -42,7 +44,7 @@ export default {
4244 computed: {
4345 },
4446 mounted : function () {
45- // Tell the Composer component to prepare a reply
47+ // Tell the Composer component to prepare a reply
4648 this .$nextTick (function () {
4749 if (this .$route .name === ' reply-remote' ) {
4850 this .$root .$emit (' composer-reply' , this .mainPost )
You can’t perform that action at this time.
0 commit comments