forked from AkkomaGang/akkoma-fe
Linting fixes.
This commit is contained in:
parent
d65112a625
commit
93eb6671c6
5 changed files with 13 additions and 14 deletions
|
@ -11,16 +11,16 @@ const Attachment = {
|
||||||
type () {
|
type () {
|
||||||
let type = 'unknown'
|
let type = 'unknown'
|
||||||
|
|
||||||
if(this.attachment.mimetype.match(/text\/html/)) {
|
if (this.attachment.mimetype.match(/text\/html/)) {
|
||||||
type = 'html';
|
type = 'html'
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.attachment.mimetype.match(/image/)) {
|
if (this.attachment.mimetype.match(/image/)) {
|
||||||
type = 'image';
|
type = 'image'
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.attachment.mimetype.match(/video\/(webm|mp4)/)) {
|
if (this.attachment.mimetype.match(/video\/(webm|mp4)/)) {
|
||||||
type = 'video';
|
type = 'video'
|
||||||
};
|
};
|
||||||
|
|
||||||
return type
|
return type
|
||||||
|
|
|
@ -3,9 +3,9 @@ const FavoriteButton = {
|
||||||
methods: {
|
methods: {
|
||||||
favorite () {
|
favorite () {
|
||||||
if (!this.status.favorited) {
|
if (!this.status.favorited) {
|
||||||
this.$store.dispatch('favorite', { id: this.status.id})
|
this.$store.dispatch('favorite', {id: this.status.id})
|
||||||
} else {
|
} else {
|
||||||
this.$store.dispatch('unfavorite', { id: this.status.id})
|
this.$store.dispatch('unfavorite', {id: this.status.id})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,9 +8,9 @@ const mediaUpload = {
|
||||||
const self = this
|
const self = this
|
||||||
|
|
||||||
input.addEventListener('change', ({target}) => {
|
input.addEventListener('change', ({target}) => {
|
||||||
const file = target.files[0];
|
const file = target.files[0]
|
||||||
const formData = new FormData();
|
const formData = new FormData()
|
||||||
formData.append('media', file);
|
formData.append('media', file)
|
||||||
statusPosterService.uploadMedia({ store, formData })
|
statusPosterService.uploadMedia({ store, formData })
|
||||||
.then((fileData) => {
|
.then((fileData) => {
|
||||||
self.$emit('uploaded', fileData)
|
self.$emit('uploaded', fileData)
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import statusPoster from '../../services/status_poster/status_poster.service.js'
|
import statusPoster from '../../services/status_poster/status_poster.service.js'
|
||||||
import MediaUpload from '../media_upload/media_upload.vue'
|
import MediaUpload from '../media_upload/media_upload.vue'
|
||||||
|
|
||||||
import { reject, map, uniqBy } from 'lodash';
|
import { reject, map, uniqBy } from 'lodash'
|
||||||
|
|
||||||
const buildMentionsString = ({user, attentions}, currentUser) => {
|
const buildMentionsString = ({user, attentions}, currentUser) => {
|
||||||
|
|
||||||
let allAttentions = [...attentions]
|
let allAttentions = [...attentions]
|
||||||
|
|
||||||
allAttentions.unshift(user)
|
allAttentions.unshift(user)
|
||||||
|
|
|
@ -27,7 +27,7 @@ const Timeline = {
|
||||||
fetchOlderStatuses () {
|
fetchOlderStatuses () {
|
||||||
const store = this.$store
|
const store = this.$store
|
||||||
const credentials = store.state.users.currentUser.credentials
|
const credentials = store.state.users.currentUser.credentials
|
||||||
store.commit('setLoading', { timeline: this.timelineName, value: true });
|
store.commit('setLoading', { timeline: this.timelineName, value: true })
|
||||||
timelineFetcher.fetchAndUpdate({
|
timelineFetcher.fetchAndUpdate({
|
||||||
store,
|
store,
|
||||||
credentials,
|
credentials,
|
||||||
|
|
Loading…
Reference in a new issue