aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2019-03-27 22:12:51 +0200
committerHenry Jameson <me@hjkos.com>2019-03-27 22:12:51 +0200
commitff18e339cf5c243a77e4035a1348c543ebcbf8d1 (patch)
treee950d98855e917658cd8390751fec6edb8206c48
parent0a031aae20bf1dc3bc0b15af0b794798d179aafa (diff)
parent987b5162a7530979e9fa887a24311eb1cd480fc5 (diff)
Merge remote-tracking branch 'upstream/develop' into mastoapi/followers
* upstream/develop: #442 - update placeholder linebreak #442 - clean up Bio placeholder text undo this change since BE returns empty object for relationship, add in a separate MR updates normalizer for proper user handling and adds support for friends tl via mastoapi
-rw-r--r--src/components/registration/registration.js3
-rw-r--r--src/components/registration/registration.vue2
-rw-r--r--src/i18n/en.json2
-rw-r--r--src/services/api/api.service.js4
4 files changed, 7 insertions, 4 deletions
diff --git a/src/components/registration/registration.js b/src/components/registration/registration.js
index ab6cd64d..8dc00420 100644
--- a/src/components/registration/registration.js
+++ b/src/components/registration/registration.js
@@ -35,6 +35,9 @@ const registration = {
},
computed: {
token () { return this.$route.params.token },
+ bioPlaceholder () {
+ return this.$t('registration.bio_placeholder').replace(/\s*\n\s*/g, ' \n')
+ },
...mapState({
registrationOpen: (state) => state.instance.registrationOpen,
signedIn: (state) => !!state.users.currentUser,
diff --git a/src/components/registration/registration.vue b/src/components/registration/registration.vue
index e22b308d..110b27bf 100644
--- a/src/components/registration/registration.vue
+++ b/src/components/registration/registration.vue
@@ -45,7 +45,7 @@
<div class='form-group'>
<label class='form--label' for='bio'>{{$t('registration.bio')}} ({{$t('general.optional')}})</label>
- <textarea :disabled="isPending" v-model='user.bio' class='form-control' id='bio' :placeholder="$t('registration.bio_placeholder')"></textarea>
+ <textarea :disabled="isPending" v-model='user.bio' class='form-control' id='bio' :placeholder="bioPlaceholder"></textarea>
</div>
<div class='form-group' :class="{ 'form-group--error': $v.user.password.$error }">
diff --git a/src/i18n/en.json b/src/i18n/en.json
index ecf9628f..c501c6a7 100644
--- a/src/i18n/en.json
+++ b/src/i18n/en.json
@@ -98,7 +98,7 @@
"new_captcha": "Click the image to get a new captcha",
"username_placeholder": "e.g. lain",
"fullname_placeholder": "e.g. Lain Iwakura",
- "bio_placeholder": "e.g.\nHi, I'm Lain\nI’m an anime girl living in suburban Japan. You may know me from the Wired.",
+ "bio_placeholder": "e.g.\nHi, I'm Lain.\nI’m an anime girl living in suburban Japan. You may know me from the Wired.",
"validations": {
"username_required": "cannot be left blank",
"fullname_required": "cannot be left blank",
diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js
index cf4acdf7..7de3b743 100644
--- a/src/services/api/api.service.js
+++ b/src/services/api/api.service.js
@@ -1,6 +1,5 @@
/* eslint-env browser */
const LOGIN_URL = '/api/account/verify_credentials.json'
-const FRIENDS_TIMELINE_URL = '/api/statuses/friends_timeline.json'
const ALL_FOLLOWING_URL = '/api/qvitter/allfollowing'
const PUBLIC_TIMELINE_URL = '/api/statuses/public_timeline.json'
const PUBLIC_AND_EXTERNAL_TIMELINE_URL = '/api/statuses/public_and_external_timeline.json'
@@ -33,6 +32,7 @@ const SUGGESTIONS_URL = '/api/v1/suggestions'
const MASTODON_USER_FAVORITES_TIMELINE_URL = '/api/v1/favourites'
const MASTODON_FOLLOWING_URL = id => `/api/v1/accounts/${id}/following`
const MASTODON_FOLLOWERS_URL = id => `/api/v1/accounts/${id}/followers`
+const MASTODON_USER_HOME_TIMELINE_URL = '/api/v1/timelines/home'
const MASTODON_STATUS_URL = id => `/api/v1/statuses/${id}`
const MASTODON_STATUS_CONTEXT_URL = id => `/api/v1/statuses/${id}/context`
const MASTODON_USER_URL = '/api/v1/accounts'
@@ -356,7 +356,7 @@ const fetchStatus = ({id, credentials}) => {
const fetchTimeline = ({timeline, credentials, since = false, until = false, userId = false, tag = false, withMuted = false}) => {
const timelineUrls = {
public: PUBLIC_TIMELINE_URL,
- friends: FRIENDS_TIMELINE_URL,
+ friends: MASTODON_USER_HOME_TIMELINE_URL,
mentions: MENTIONS_URL,
dms: DM_TIMELINE_URL,
notifications: QVITTER_USER_NOTIFICATIONS_URL,