logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe
commit: bfbbb527677ba4648b1be376bb02b0bd3c3e29ba
parent: daa70909ab707b2dac8a42bc15650165e774b565
Author: Roger Braun <roger@rogerbraun.net>
Date:   Fri, 10 Mar 2017 11:12:23 +0100

Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma-fe into develop

Diffstat:

Msrc/components/mentions/mentions.js13-------------
Msrc/components/notifications/notifications.scss3++-
Msrc/components/status/status.vue22+++++++++++++++++++---
Msrc/services/api/api.service.js8+-------
Msrc/services/backend_interactor_service/backend_interactor_service.js5-----
5 files changed, 22 insertions(+), 29 deletions(-)

diff --git a/src/components/mentions/mentions.js b/src/components/mentions/mentions.js @@ -2,25 +2,12 @@ import Timeline from '../timeline/timeline.vue' const Mentions = { computed: { - username () { - return this.$route.params.username - }, timeline () { return this.$store.state.statuses.timelines.mentions } }, components: { Timeline - }, - created () { - this.$store.state.api.backendInteractor.fetchMentions({username: this.username}) - .then((mentions) => { - this.$store.dispatch('addNewStatuses', { - statuses: mentions, - timeline: 'mentions', - showImmediately: true - }) - }) } } diff --git a/src/components/notifications/notifications.scss b/src/components/notifications/notifications.scss @@ -73,7 +73,8 @@ } &:last-child { - border: none + border-bottom: none; + border-radius: 0 0 10px 10px; } } diff --git a/src/components/status/status.vue b/src/components/status/status.vue @@ -73,18 +73,20 @@ <div class='status-actions'> <div> <a href="#" v-on:click.prevent="toggleReplying"> - <i class='fa icon-reply'></i> + <i class="fa icon-reply" :class="{'icon-reply-active': replying}"></i> </a> </div> <retweet-button :status=status></retweet-button> <favorite-button :status=status></favorite-button> <delete-button :status=status></delete-button> </div> - - <post-status-form v-if="replying" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"></post-status-form> </div> </div> </div> + <div class="status base00-background container" v-if="replying"> + <div class="reply-left"/> + <post-status-form class="reply-body" :reply-to="status.id" :attentions="status.attentions" :repliedUser="status.user" v-on:posted="toggleReplying"/> + </div> </template> </div> </template> @@ -141,6 +143,10 @@ color: $blue; } + .icon-reply-active { + color: $blue; + } + .status .avatar { width: 48px; } @@ -172,4 +178,14 @@ margin-bottom: 1em; margin-top: 0.2em; } + + .reply-left { + flex: 0; + min-width: 48px; + } + + .reply-body { + flex: 1; + } + </style> diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js @@ -62,12 +62,6 @@ const fetchAllFollowing = ({username, credentials}) => { .then((data) => data.json()) } -const fetchMentions = ({username, sinceId = 0, credentials}) => { - let url = `${MENTIONS_URL}?since_id=${sinceId}&screen_name=${username}` - return fetch(url, { headers: authHeaders(credentials) }) - .then((data) => data.json()) -} - const fetchConversation = ({id, credentials}) => { let url = `${CONVERSATION_URL}/${id}.json?count=100` return fetch(url, { headers: authHeaders(credentials) }) @@ -100,6 +94,7 @@ const fetchTimeline = ({timeline, credentials, since = false, until = false}) => const timelineUrls = { public: PUBLIC_TIMELINE_URL, friends: FRIENDS_TIMELINE_URL, + mentions: MENTIONS_URL, 'publicAndExternal': PUBLIC_AND_EXTERNAL_TIMELINE_URL } @@ -192,7 +187,6 @@ const apiService = { fetchTimeline, fetchConversation, fetchStatus, - fetchMentions, fetchFriends, followUser, unfollowUser, diff --git a/src/services/backend_interactor_service/backend_interactor_service.js b/src/services/backend_interactor_service/backend_interactor_service.js @@ -10,10 +10,6 @@ const backendInteractorService = (credentials) => { return apiService.fetchConversation({id, credentials}) } - const fetchMentions = ({sinceId, username}) => { - return apiService.fetchMentions({sinceId, username, credentials}) - } - const fetchFriends = () => { return apiService.fetchFriends({credentials}) } @@ -43,7 +39,6 @@ const backendInteractorService = (credentials) => { const backendInteractorServiceInstance = { fetchStatus, fetchConversation, - fetchMentions, fetchFriends, followUser, unfollowUser,