diff --git a/src/components/media_upload/media_upload.js b/src/components/media_upload/media_upload.js
index 42d900d3..1c874faa 100644
--- a/src/components/media_upload/media_upload.js
+++ b/src/components/media_upload/media_upload.js
@@ -3,19 +3,10 @@ import statusPosterService from '../../services/status_poster/status_poster.serv
import fileSizeFormatService from '../../services/file_size_format/file_size_format.js'
const mediaUpload = {
- mounted () {
- const input = this.$el.querySelector('input')
-
- input.addEventListener('change', ({target}) => {
- for (var i = 0; i < target.files.length; i++) {
- let file = target.files[i]
- this.uploadFile(file)
- }
- })
- },
data () {
return {
- uploading: false
+ uploading: false,
+ uploadReady: true
}
},
methods: {
@@ -56,6 +47,18 @@ const mediaUpload = {
} else {
e.dataTransfer.dropEffect = 'none'
}
+ },
+ clearFile () {
+ this.uploadReady = false
+ this.$nextTick(() => {
+ this.uploadReady = true
+ })
+ },
+ change ({target}) {
+ for (var i = 0; i < target.files.length; i++) {
+ let file = target.files[i]
+ this.uploadFile(file)
+ }
}
},
props: [
diff --git a/src/components/media_upload/media_upload.vue b/src/components/media_upload/media_upload.vue
index 768d3565..fcdc3471 100644
--- a/src/components/media_upload/media_upload.vue
+++ b/src/components/media_upload/media_upload.vue
@@ -3,7 +3,7 @@
diff --git a/src/components/notification/notification.js b/src/components/notification/notification.js
index f95a329f..7d9807de 100644
--- a/src/components/notification/notification.js
+++ b/src/components/notification/notification.js
@@ -1,5 +1,5 @@
import Status from '../status/status.vue'
-import StillImage from '../still-image/still-image.vue'
+import UserAvatar from '../user_avatar/user_avatar.vue'
import UserCardContent from '../user_card_content/user_card_content.vue'
import { highlightClass, highlightStyle } from '../../services/user_highlighter/user_highlighter.js'
import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator'
@@ -13,7 +13,7 @@ const Notification = {
},
props: [ 'notification' ],
components: {
- Status, StillImage, UserCardContent
+ Status, UserAvatar, UserCardContent
},
methods: {
toggleUserExpanded () {
diff --git a/src/components/notification/notification.vue b/src/components/notification/notification.vue
index f91c90cc..a0a55cba 100644
--- a/src/components/notification/notification.vue
+++ b/src/components/notification/notification.vue
@@ -2,7 +2,7 @@
{{ charactersLeft }}
{{ charactersLeft }}
diff --git a/src/components/status/status.js b/src/components/status/status.js index c718fe9f..65ddcb9f 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -4,7 +4,7 @@ import RetweetButton from '../retweet_button/retweet_button.vue' import DeleteButton from '../delete_button/delete_button.vue' import PostStatusForm from '../post_status_form/post_status_form.vue' import UserCardContent from '../user_card_content/user_card_content.vue' -import StillImage from '../still-image/still-image.vue' +import UserAvatar from '../user_avatar/user_avatar.vue' import Gallery from '../gallery/gallery.vue' import LinkPreview from '../link-preview/link-preview.vue' import generateProfileLink from 'src/services/user_profile_link_generator/user_profile_link_generator' @@ -36,6 +36,7 @@ const Status = { preview: null, showPreview: false, showingTall: this.inConversation && this.focused, + showingLongSubject: false, expandingSubject: typeof this.$store.state.config.collapseMessageWithSubject === 'undefined' ? !this.$store.state.instance.collapseMessageWithSubject : !this.$store.state.config.collapseMessageWithSubject, @@ -89,6 +90,7 @@ const Status = { retweet () { return !!this.statusoid.retweeted_status }, retweeter () { return this.statusoid.user.name || this.statusoid.user.screen_name }, retweeterHtml () { return this.statusoid.user.name_html }, + retweeterProfileLink () { return this.generateUserProfileLink(this.statusoid.user.id, this.statusoid.user.screen_name) }, status () { if (this.retweet) { return this.statusoid.retweeted_status @@ -129,6 +131,9 @@ const Status = { const lengthScore = this.status.statusnet_html.split(/ 20
},
+ longSubject () {
+ return this.status.summary.length > 900
+ },
isReply () {
return !!(this.status.in_reply_to_status_id && this.status.in_reply_to_user_id)
},
@@ -244,7 +249,7 @@ const Status = {
DeleteButton,
PostStatusForm,
UserCardContent,
- StillImage,
+ UserAvatar,
Gallery,
LinkPreview
},
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index c6e73e4e..9986107f 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -13,10 +13,13 @@