From f81d1b0eea497e392b81f5217d023a66e01ea9b3 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 23 Jun 2017 17:43:34 +0300 Subject: [PATCH 01/14] Fix long names overflowing and messing everything (now just overflowing parts not drawn), fix non-square avatars not drawn as squares. --- .../user_card_content/user_card_content.vue | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index ff1b108c57..37435ec27c 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -5,8 +5,10 @@
-
{{user.name}}
-
@{{user.screen_name}}
+
+
{{user.name}}
+
@{{user.screen_name}}
+
@@ -135,33 +137,37 @@ align-content: flex-start; justify-content: center; max-height: 60px; + overflow: hidden; } img { - border: 2px solid; - border-radius: 5px; - flex: 1 0 100%; - max-width: 48px; - max-height: 48px; + border: 2px solid; + border-radius: 5px; + flex: 1 0 100%; + width: 48px; + height: 48px; + object-fit: cover; } text-shadow: 0px 1px 1.5px rgba(0, 0, 0, 1.0); - .user-name{ - margin-top: 0.0em; + .name-and-screen-name { + display: block; + margin-top: 0.0em; margin-left: 0.6em; - flex: 0 0 auto; - align-self: flex-start; + text-align: left; + text-overflow: ellipsis; + white-space: nowrap; + } + + .user-name{ } .user-screen-name { - margin-top: 0.0em; - margin-left: 0.6em; font-weight: lighter; font-size: 15px; padding-right: 0.1em; flex: 0 0 auto; - align-self: flex-start; } .user-interactions { From b1d9cbaebdbdd27e521989d9eaef0f6a49426280 Mon Sep 17 00:00:00 2001 From: Roger Braun Date: Mon, 31 Jul 2017 16:35:07 +0200 Subject: [PATCH 02/14] Add fetch polyfill. --- package.json | 3 ++- src/services/api/api.service.js | 1 + yarn.lock | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d04c3e221f..63fd490d27 100644 --- a/package.json +++ b/package.json @@ -27,7 +27,8 @@ "vue-router": "^2.5.3", "vue-template-compiler": "^2.3.4", "vue-timeago": "^3.1.2", - "vuex": "^2.3.1" + "vuex": "^2.3.1", + "whatwg-fetch": "^2.0.3" }, "devDependencies": { "autoprefixer": "^6.4.0", diff --git a/src/services/api/api.service.js b/src/services/api/api.service.js index e848d076be..9b51f19d49 100644 --- a/src/services/api/api.service.js +++ b/src/services/api/api.service.js @@ -24,6 +24,7 @@ const QVITTER_USER_TIMELINE_URL = '/api/qvitter/statuses/user_timeline.json' // const USER_URL = '/api/users/show.json' import { each, map } from 'lodash' +import 'whatwg-fetch' const oldfetch = window.fetch diff --git a/yarn.lock b/yarn.lock index b0c3e63e4a..965f6f31aa 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5816,6 +5816,10 @@ webpack@^1.13.2: watchpack "^0.2.1" webpack-core "~0.6.9" +whatwg-fetch@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84" + whet.extend@~0.9.9: version "0.9.9" resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1" From acf3fd5d91b41cfed08d70c63eab7feb79769a10 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Wed, 2 Aug 2017 22:09:40 +0300 Subject: [PATCH 03/14] Add new user-settings component/route, add options to change name, bio, avatar, banner and bg. Add those options to api service and backend interactor service. --- src/App.scss | 5 + .../user_card_content/user_card_content.vue | 8 + src/components/user_panel/user_panel.vue | 1 + src/components/user_settings/user_settings.js | 145 ++++++++++++++++++ .../user_settings/user_settings.vue | 90 +++++++++++ src/main.js | 4 +- src/services/api/api.service.js | 68 ++++++++ .../backend_interactor_service.js | 7 + 8 files changed, 327 insertions(+), 1 deletion(-) create mode 100644 src/components/user_settings/user_settings.js create mode 100644 src/components/user_settings/user_settings.vue diff --git a/src/App.scss b/src/App.scss index 15c908d938..23f7304fe5 100644 --- a/src/App.scss +++ b/src/App.scss @@ -42,6 +42,11 @@ button{ &:hover { box-shadow: 0px 0px 4px rgba(255, 255, 255, 0.3); } + + &:disabled { + cursor: not-allowed; + opacity: 0.5; + } } .container { diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index ff1b108c57..1c044f9ae4 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -2,6 +2,9 @@
+
+

+ {{ notification.action.user.name }} + +

+
+ @{{ notification.action.user.screen_name }} followed you +
+
diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 084800fa5d..de5d7d2314 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -105,6 +105,10 @@ export const statusType = (status) => { return 'deletion' } + if (status.text.match(/started following/)) { + return 'follow' + } + return 'unknown' } @@ -253,6 +257,9 @@ const addNewStatuses = (state, { statuses, showImmediately = false, timeline, us favoriteStatus(favorite) } }, + 'follow': (status) => { + addNotification({ type: 'follow', status: status, action: status }) + }, 'deletion': (deletion) => { const uri = deletion.uri updateMaxId(deletion) From 6d7d173e4da4b7d8ffee33e21d8c072efe2f7be9 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Wed, 16 Aug 2017 00:46:55 +0300 Subject: [PATCH 05/14] Make linter happy. --- src/components/user_settings/user_settings.js | 9 ++++++--- src/components/user_settings/user_settings.vue | 4 ---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index c22411dd94..2f38471117 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -1,5 +1,4 @@ import StyleSwitcher from '../style_switcher/style_switcher.vue' -import { filter, trim } from 'lodash' const UserSettings = { data () { @@ -27,7 +26,7 @@ const UserSettings = { const name = this.newname const description = this.newbio this.$store.state.api.backendInteractor.updateProfile({params: {name, description}}).then((user) => { - if(!user.error) { + if (!user.error) { this.$store.commit('addNewUsers', [user]) this.$store.commit('setCurrentUser', user) } @@ -95,8 +94,10 @@ const UserSettings = { submitBanner () { if (!this.previewbanner) { return } - let banner = this.previewbanner + let banner = this.previewbanner + // eslint-disable-next-line no-undef let imginfo = new Image() + /* eslint-disable camelcase */ let offset_top, offset_left, width, height imginfo.src = banner width = imginfo.width @@ -114,10 +115,12 @@ const UserSettings = { } this.uploadingbanner = false }) + /* eslint-enable camelcase */ }, submitBg () { if (!this.previewbg) { return } let img = this.previewbg + // eslint-disable-next-line no-undef let imginfo = new Image() let cropX, cropY, cropW, cropH imginfo.src = img diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index b7521a32b6..49d2c8c91b 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -78,10 +78,6 @@ border-radius: 5px; } - .bg { - max-width: 400px; - border-radius: 5px; - } .uploading { font-size: 1.5em; margin: 0.25em; From 2084c92dfff6d7f2c2eb78cad567b7f0a283700b Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Wed, 16 Aug 2017 16:40:09 +0300 Subject: [PATCH 06/14] Force user profile timeline update when the user id changes (like when another user has been searched/found). --- src/components/user_profile/user_profile.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/user_profile/user_profile.js b/src/components/user_profile/user_profile.js index 5f9d4d081b..48a8a073c6 100644 --- a/src/components/user_profile/user_profile.js +++ b/src/components/user_profile/user_profile.js @@ -22,6 +22,12 @@ const UserProfile = { } } }, + watch: { + userId () { + this.$store.commit('clearTimeline', { timeline: 'user' }) + this.$store.dispatch('startFetching', ['user', this.userId]) + } + }, components: { UserCardContent, Timeline From 1526b4560c9dd6f2fff5fcb24890a398c8701343 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 18 Aug 2017 11:51:17 +0300 Subject: [PATCH 07/14] Clean up to have much less redundant code. --- src/components/user_settings/user_settings.js | 68 ++++++------------- .../user_settings/user_settings.vue | 24 +++---- 2 files changed, 34 insertions(+), 58 deletions(-) diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index 2f38471117..fd20a6ad82 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -5,12 +5,8 @@ const UserSettings = { return { newname: this.$store.state.users.currentUser.name, newbio: this.$store.state.users.currentUser.description, - previewavatar: null, - previewbanner: null, - previewbg: null, - uploadingavatar: false, - uploadingbanner: false, - uploadingbg: false + uploading: [ false, false, false ], + previews: [ null, null, null ] } }, components: { @@ -32,40 +28,22 @@ const UserSettings = { } }) }, - uploadAvatar ({target}) { - const file = target.files[0] + uploadFile (slot, e) { + const file = e.target.files[0] + if (!file) { return } // eslint-disable-next-line no-undef const reader = new FileReader() reader.onload = ({target}) => { const img = target.result - this.previewavatar = img - } - reader.readAsDataURL(file) - }, - uploadBanner ({target}) { - const file = target.files[0] - // eslint-disable-next-line no-undef - const reader = new FileReader() - reader.onload = ({target}) => { - const img = target.result - this.previewbanner = img - } - reader.readAsDataURL(file) - }, - uploadBg ({target}) { - const file = target.files[0] - // eslint-disable-next-line no-undef - const reader = new FileReader() - reader.onload = ({target}) => { - const img = target.result - this.previewbg = img + this.previews[slot] = img + this.$forceUpdate() // just changing the array with the index doesn't update the view } reader.readAsDataURL(file) }, submitAvatar () { - if (!this.previewavatar) { return } + if (!this.previews[0]) { return } - let img = this.previewavatar + let img = this.previews[0] // eslint-disable-next-line no-undef let imginfo = new Image() let cropX, cropY, cropW, cropH @@ -81,20 +59,20 @@ const UserSettings = { cropX = Math.floor((imginfo.width - imginfo.height) / 2) cropW = imginfo.height } - this.uploadingavatar = true + this.uploading[0] = true this.$store.state.api.backendInteractor.updateAvatar({params: {img, cropX, cropY, cropW, cropH}}).then((user) => { if (!user.error) { this.$store.commit('addNewUsers', [user]) this.$store.commit('setCurrentUser', user) - this.previewavatar = null + this.previews[0] = null } - this.uploadingavatar = false + this.uploading[0] = false }) }, submitBanner () { - if (!this.previewbanner) { return } + if (!this.previews[1]) { return } - let banner = this.previewbanner + let banner = this.previews[1] // eslint-disable-next-line no-undef let imginfo = new Image() /* eslint-disable camelcase */ @@ -104,22 +82,22 @@ const UserSettings = { height = imginfo.height offset_top = 0 offset_left = 0 - this.uploadingbanner = true + this.uploading[1] = true this.$store.state.api.backendInteractor.updateBanner({params: {banner, offset_top, offset_left, width, height}}).then((data) => { if (!data.error) { let clone = JSON.parse(JSON.stringify(this.$store.state.users.currentUser)) clone.cover_photo = data.url this.$store.commit('addNewUsers', [clone]) this.$store.commit('setCurrentUser', clone) - this.previewbanner = null + this.previews[1] = null } - this.uploadingbanner = false + this.uploading[1] = false }) /* eslint-enable camelcase */ }, submitBg () { - if (!this.previewbg) { return } - let img = this.previewbg + if (!this.previews[2]) { return } + let img = this.previews[2] // eslint-disable-next-line no-undef let imginfo = new Image() let cropX, cropY, cropW, cropH @@ -128,20 +106,18 @@ const UserSettings = { cropY = 0 cropW = imginfo.width cropH = imginfo.width - this.uploadingbg = true + this.uploading[2] = true this.$store.state.api.backendInteractor.updateBg({params: {img, cropX, cropY, cropW, cropH}}).then((data) => { if (!data.error) { let clone = JSON.parse(JSON.stringify(this.$store.state.users.currentUser)) clone.background_image = data.url this.$store.commit('addNewUsers', [clone]) this.$store.commit('setCurrentUser', clone) - this.previewbg = null + this.previews[2] = null } - this.uploadingbg = false + this.uploading[2] = false }) } - }, - watch: { } } diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue index 49d2c8c91b..11da79e4cf 100644 --- a/src/components/user_settings/user_settings.vue +++ b/src/components/user_settings/user_settings.vue @@ -17,37 +17,37 @@

Your current avatar:

Set new avatar:

- +
- +
- - + +

Profile Banner

Your current profile banner:

Set new profile banner:

- +
- +
- - + +

Profile Background

Set new profile background:

- +
- +
- - + +
From 9503b8fa41b9f6e3c500af411b29ee1c27844253 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 18 Aug 2017 12:00:59 +0300 Subject: [PATCH 08/14] Remove the profile pic change from the old settings menu since it's in the new profile edit menu. --- src/components/settings/settings.js | 41 +--------------------------- src/components/settings/settings.vue | 12 -------- 2 files changed, 1 insertion(+), 52 deletions(-) diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 8d6a671318..b3bb82909f 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -9,8 +9,7 @@ const settings = { hideNsfwLocal: this.$store.state.config.hideNsfw, muteWordsString: this.$store.state.config.muteWords.join('\n'), autoLoadLocal: this.$store.state.config.autoLoad, - hoverPreviewLocal: this.$store.state.config.hoverPreview, - previewfile: null + hoverPreviewLocal: this.$store.state.config.hoverPreview } }, components: { @@ -21,44 +20,6 @@ const settings = { return this.$store.state.users.currentUser } }, - methods: { - uploadAvatar ({target}) { - const file = target.files[0] - // eslint-disable-next-line no-undef - const reader = new FileReader() - reader.onload = ({target}) => { - const img = target.result - this.previewfile = img - } - reader.readAsDataURL(file) - }, - submitAvatar () { - if (!this.previewfile) { return } - - const img = this.previewfile - // eslint-disable-next-line no-undef - let imginfo = new Image() - let cropX, cropY, cropW, cropH - imginfo.src = this.previewfile - if (imginfo.height > imginfo.width) { - cropX = 0 - cropW = imginfo.width - cropY = Math.floor((imginfo.height - imginfo.width) / 2) - cropH = imginfo.width - } else { - cropY = 0 - cropH = imginfo.height - cropX = Math.floor((imginfo.width - imginfo.height) / 2) - cropW = imginfo.height - } - this.$store.state.api.backendInteractor.updateAvatar({params: {img, cropX, cropY, cropW, cropH}}).then((user) => { - if (!user.error) { - this.$store.commit('addNewUsers', [user]) - this.$store.commit('setCurrentUser', user) - } - }) - } - }, watch: { hideAttachmentsLocal (value) { this.$store.dispatch('setOption', { name: 'hideAttachments', value }) diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index 1abb178909..6ff96fece5 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -8,18 +8,6 @@

Theme

-
-

Avatar

-

Your current avatar:

- -

Set new avatar:

- - -
- -
- -

Filtering

All notices containing these words will be muted, one per line

From 052befa5819eb81895dd43b3ad16dda913859a5e Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 18 Aug 2017 12:26:07 +0300 Subject: [PATCH 09/14] fix the very annoying thing where favs from pleromabe would not generate notifs when on GS --- src/modules/statuses.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index de5d7d2314..68e71fcb3c 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -97,7 +97,7 @@ export const statusType = (status) => { return 'retweet' } - if (typeof status.uri === 'string' && status.uri.match(/(fave|objectType=Favourite)/)) { + if ((typeof status.uri === 'string' && status.uri.match(/(fave|objectType=Favourite)/)) || status.text.match(/favorited/)) { return 'favorite' } From 1136db24cc24ddd107de42ec297e2983704885e2 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Fri, 18 Aug 2017 12:38:47 +0300 Subject: [PATCH 10/14] Fix issue with trying to match() on undefined --- src/modules/statuses.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/statuses.js b/src/modules/statuses.js index 68e71fcb3c..c7c3d01640 100644 --- a/src/modules/statuses.js +++ b/src/modules/statuses.js @@ -97,7 +97,8 @@ export const statusType = (status) => { return 'retweet' } - if ((typeof status.uri === 'string' && status.uri.match(/(fave|objectType=Favourite)/)) || status.text.match(/favorited/)) { + if ((typeof status.uri === 'string' && status.uri.match(/(fave|objectType=Favourite)/)) || + (typeof status.text === 'string' && status.text.match(/favorited/))) { return 'favorite' } From 42fb65e274f4890263e4cb3d88ba3b9c0b728516 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Sun, 20 Aug 2017 13:16:41 +0300 Subject: [PATCH 11/14] Add error message in post status form when failing to post and don't get rid of post/attachments when failing. --- .../post_status_form/post_status_form.js | 21 ++++++++++++------- .../post_status_form/post_status_form.vue | 10 +++++++++ .../status_poster/status_poster.service.js | 15 +++++++------ 3 files changed, 33 insertions(+), 13 deletions(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index c097026362..6b78b7dda2 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -39,6 +39,7 @@ const PostStatusForm = { return { dropFiles: [], submitDisabled: false, + error: null, newStatus: { status: statusText, files: [] @@ -90,14 +91,20 @@ const PostStatusForm = { media: newStatus.files, store: this.$store, inReplyToStatusId: this.replyTo + }).then((data) => { + if (!data.error) { + this.newStatus = { + status: '', + files: [] + } + this.$emit('posted') + let el = this.$el.querySelector('textarea') + el.style.height = '16px' + this.error = null + } else { + this.error = data.error + } }) - this.newStatus = { - status: '', - files: [] - } - this.$emit('posted') - let el = this.$el.querySelector('textarea') - el.style.height = '16px' }, addMediaFile (fileInfo) { this.newStatus.files.push(fileInfo) diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index a17d6479f8..e1e3e4be3f 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -19,6 +19,9 @@
+
+ Error: {{ error }} +
@@ -61,6 +64,13 @@ width: 10em; } } + .error { + border-radius: 5px; + text-align: center; + background-color: rgba(255, 48, 16, 0.65); + padding: 0.25em; + margin: 0.35em; + } .attachments { padding: 0 0.5em; diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js index bc1fd37d26..ee8d160a48 100644 --- a/src/services/status_poster/status_poster.service.js +++ b/src/services/status_poster/status_poster.service.js @@ -7,12 +7,15 @@ const postStatus = ({ store, status, media = [], inReplyToStatusId = undefined } return apiService.postStatus({credentials: store.state.users.currentUser.credentials, status, mediaIds, inReplyToStatusId}) .then((data) => data.json()) .then((data) => { - store.dispatch('addNewStatuses', { - statuses: [data], - timeline: 'friends', - showImmediately: true, - noIdUpdate: true // To prevent missing notices on next pull. - }) + if (!data.error) { + store.dispatch('addNewStatuses', { + statuses: [data], + timeline: 'friends', + showImmediately: true, + noIdUpdate: true // To prevent missing notices on next pull. + }) + } + return data }) } From dbf2f1621e1bc9d790aa62b88fb7abed6a9acc6f Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Sun, 20 Aug 2017 16:53:48 +0300 Subject: [PATCH 12/14] Adjust the clickable area of notif avatar to not contain everything below it, adjust the status avatar to not have ghost border on top/right --- src/components/notifications/notifications.vue | 8 +++++--- src/components/status/status.vue | 11 +++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index c9113bc482..2ad7c488e0 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -8,9 +8,11 @@
- - - +
+ + + +

diff --git a/src/components/status/status.vue b/src/components/status/status.vue index e582a80dc8..f8be00f5af 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -194,12 +194,11 @@ } .media-left { - img { - margin-top: 0.2em; - float: right; - margin-right: 0.3em; - border-radius: 5px; - } + margin: 0.2em 0.3em 0 0; + img { + float: right; + border-radius: 5px; + } } .retweet-info { From d3169b057c1b3522930b044df5ee68b808c0da13 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 21 Aug 2017 15:35:14 +0300 Subject: [PATCH 13/14] Visual indicator for when posting is happening, as well as disabling the button to prevent double-posts. --- src/components/post_status_form/post_status_form.js | 3 +++ src/components/post_status_form/post_status_form.vue | 3 ++- src/services/status_poster/status_poster.service.js | 5 +++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 6b78b7dda2..3313ec3f96 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -40,6 +40,7 @@ const PostStatusForm = { dropFiles: [], submitDisabled: false, error: null, + posting: false, newStatus: { status: statusText, files: [] @@ -86,6 +87,7 @@ const PostStatusForm = { this.caret = selectionStart }, postStatus (newStatus) { + this.posting = true statusPoster.postStatus({ status: newStatus.status, media: newStatus.files, @@ -104,6 +106,7 @@ const PostStatusForm = { } else { this.error = data.error } + this.posting = false }) }, addMediaFile (fileInfo) { diff --git a/src/components/post_status_form/post_status_form.vue b/src/components/post_status_form/post_status_form.vue index e1e3e4be3f..e775c45e3f 100644 --- a/src/components/post_status_form/post_status_form.vue +++ b/src/components/post_status_form/post_status_form.vue @@ -17,7 +17,8 @@

- + +
Error: {{ error }} diff --git a/src/services/status_poster/status_poster.service.js b/src/services/status_poster/status_poster.service.js index ee8d160a48..001ff8a50e 100644 --- a/src/services/status_poster/status_poster.service.js +++ b/src/services/status_poster/status_poster.service.js @@ -17,6 +17,11 @@ const postStatus = ({ store, status, media = [], inReplyToStatusId = undefined } } return data }) + .catch((err) => { + return { + error: err.message + } + }) } const uploadMedia = ({ store, formData }) => { From b5e5a8d1e32bfbda9022404b348285b8dc222335 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 21 Aug 2017 16:45:45 +0300 Subject: [PATCH 14/14] Use _original profile pic instead of the 48x48 thumbnail in the user card content. --- src/components/user_card_content/user_card_content.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index 7e60cb9ded..175ae03df0 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -6,7 +6,7 @@
- +
{{user.name}}