diff --git a/src/components/emoji_picker/emoji_picker.js b/src/components/emoji_picker/emoji_picker.js
index 594332e52..ba4c181df 100644
--- a/src/components/emoji_picker/emoji_picker.js
+++ b/src/components/emoji_picker/emoji_picker.js
@@ -97,7 +97,7 @@ const EmojiPicker = {
filteredEmoji() {
return this.filterByKeyword(this.$store.state.instance.customEmoji || [])
},
- emojis () {
+ emojis() {
const recentEmojis = this.$store.getters.recentEmojis
const standardEmojis = this.$store.state.instance.emoji || []
const customEmojis = this.sortedEmoji
@@ -116,7 +116,7 @@ const EmojiPicker = {
text: this.$t('emoji.recent'),
first: {
imageUrl: '',
- replacement: '🕒',
+ replacement: '🕒'
},
emojis: this.filterByKeyword(recentEmojis)
},
diff --git a/src/components/extra_buttons/extra_buttons.js b/src/components/extra_buttons/extra_buttons.js
index 9151055c1..6329b34f0 100644
--- a/src/components/extra_buttons/extra_buttons.js
+++ b/src/components/extra_buttons/extra_buttons.js
@@ -241,9 +241,9 @@ const ExtraButtons = {
isEdited() {
return this.status.edited_at !== null
},
- editingAvailable () {
+ editingAvailable() {
return this.$store.state.instance.editingAvailable
- },
+ }
}
}
diff --git a/src/components/poll/poll_form.js b/src/components/poll/poll_form.js
index 66daa768e..08fd6a2e9 100644
--- a/src/components/poll/poll_form.js
+++ b/src/components/poll/poll_form.js
@@ -100,9 +100,12 @@ export default {
convertExpiryFromUnit(unit, amount) {
// Note: we want seconds and not milliseconds
switch (unit) {
- case 'minutes': return amount * DateUtils.MINUTE / 1000
- case 'hours': return amount * DateUtils.HOUR / 1000
- case 'days': return amount * DateUtils.DAY / 1000
+ case 'minutes':
+ return (amount * DateUtils.MINUTE) / 1000
+ case 'hours':
+ return (amount * DateUtils.HOUR) / 1000
+ case 'days':
+ return (amount * DateUtils.DAY) / 1000
}
},
expiryAmountChange() {
diff --git a/src/components/popover/popover.vue b/src/components/popover/popover.vue
index 48a7495f0..e1466e7ea 100644
--- a/src/components/popover/popover.vue
+++ b/src/components/popover/popover.vue
@@ -112,7 +112,7 @@
svg {
width: 22px;
margin-right: 0.75rem;
- color: var(--popoverIcon, $fallback--icon)
+ color: var(--popoverIcon, $fallback--icon);
}
}
diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js
index fe174e9fa..52ed71528 100644
--- a/src/components/post_status_form/post_status_form.js
+++ b/src/components/post_status_form/post_status_form.js
@@ -48,11 +48,11 @@ const pxStringToNumber = (str) => {
}
const deleteDraft = (draftKey) => {
- const draftData = JSON.parse(localStorage.getItem('drafts') || '{}');
+ const draftData = JSON.parse(localStorage.getItem('drafts') || '{}')
- delete draftData[draftKey];
+ delete draftData[draftKey]
- localStorage.setItem('drafts', JSON.stringify(draftData));
+ localStorage.setItem('drafts', JSON.stringify(draftData))
}
const PostStatusForm = {
@@ -169,14 +169,14 @@ const PostStatusForm = {
}
if (!this.statusId) {
- let draftKey = 'status';
+ let draftKey = 'status'
if (this.replyTo) {
- draftKey = 'reply:' + this.replyTo;
+ draftKey = 'reply:' + this.replyTo
} else if (this.quoteId) {
- draftKey = 'quote:' + this.quoteId;
+ draftKey = 'quote:' + this.quoteId
}
- const draft = JSON.parse(localStorage.getItem('drafts') || '{}')[draftKey];
+ const draft = JSON.parse(localStorage.getItem('drafts') || '{}')[draftKey]
if (draft) {
statusParams = {
@@ -193,7 +193,7 @@ const PostStatusForm = {
}
if (draft.data.poll) {
- this.togglePollForm();
+ this.togglePollForm()
}
}
}
@@ -437,66 +437,76 @@ const PostStatusForm = {
}
const newStatus = this.newStatus
this.previewLoading = true
- statusPoster.postStatus({
- status: newStatus.status,
- spoilerText: newStatus.spoilerText || null,
- visibility: newStatus.visibility,
- sensitive: newStatus.nsfw,
- media: [],
- store: this.$store,
- inReplyToStatusId: this.replyTo,
- quoteId: this.quoteId,
- contentType: newStatus.contentType,
- language: newStatus.language,
- poll: {},
- preview: true
- }).then((data) => {
- // Don't apply preview if not loading, because it means
- // user has closed the preview manually.
- if (!this.previewLoading) return
- if (!data.error) {
- this.preview = data
- } else {
- this.preview = { error: data.error }
- }
- }).catch((error) => {
- this.preview = { error }
- }).finally(() => {
- this.previewLoading = false
- })
+ statusPoster
+ .postStatus({
+ status: newStatus.status,
+ spoilerText: newStatus.spoilerText || null,
+ visibility: newStatus.visibility,
+ sensitive: newStatus.nsfw,
+ media: [],
+ store: this.$store,
+ inReplyToStatusId: this.replyTo,
+ quoteId: this.quoteId,
+ contentType: newStatus.contentType,
+ language: newStatus.language,
+ poll: {},
+ preview: true
+ })
+ .then((data) => {
+ // Don't apply preview if not loading, because it means
+ // user has closed the preview manually.
+ if (!this.previewLoading) return
+ if (!data.error) {
+ this.preview = data
+ } else {
+ this.preview = { error: data.error }
+ }
+ })
+ .catch((error) => {
+ this.preview = { error }
+ })
+ .finally(() => {
+ this.previewLoading = false
+ })
- let draftKey = 'status';
+ let draftKey = 'status'
if (this.replyTo) {
- draftKey = 'reply:' + this.replyTo;
+ draftKey = 'reply:' + this.replyTo
} else if (this.quoteId) {
- draftKey = 'quote:' + this.quoteId;
+ draftKey = 'quote:' + this.quoteId
}
deleteDraft(draftKey)
},
- debouncePreviewStatus: debounce(function () { this.previewStatus() }, 500),
+ debouncePreviewStatus: debounce(function () {
+ this.previewStatus()
+ }, 500),
saveDraft() {
- const draftData = JSON.parse(localStorage.getItem('drafts') || '{}');
+ const draftData = JSON.parse(localStorage.getItem('drafts') || '{}')
- let draftKey = 'status';
+ let draftKey = 'status'
if (this.replyTo) {
- draftKey = 'reply:' + this.replyTo;
+ draftKey = 'reply:' + this.replyTo
} else if (this.quoteId) {
- draftKey = 'quote:' + this.quoteId;
+ draftKey = 'quote:' + this.quoteId
}
- if (this.newStatus.status || this.newStatus.spoilerText || this.newStatus.files.length > 0 || this.newStatus.poll.length > 0) {
- draftData[draftKey] = {
+ if (
+ this.newStatus.status ||
+ this.newStatus.spoilerText ||
+ this.newStatus.files.length > 0 ||
+ this.newStatus.poll.length > 0
+ ) {
+ draftData[draftKey] = {
updatedAt: new Date(),
- data: this.newStatus,
- };
-
- localStorage.setItem('drafts', JSON.stringify(draftData));
+ data: this.newStatus
+ }
+ localStorage.setItem('drafts', JSON.stringify(draftData))
} else {
- deleteDraft(draftKey);
+ deleteDraft(draftKey)
}
},
- autoPreview () {
+ autoPreview() {
if (!this.preview) return
this.previewLoading = true
this.debouncePreviewStatus()
diff --git a/src/components/settings_modal/tabs/profile_tab.js b/src/components/settings_modal/tabs/profile_tab.js
index 07024a1a6..cab90515e 100644
--- a/src/components/settings_modal/tabs/profile_tab.js
+++ b/src/components/settings_modal/tabs/profile_tab.js
@@ -46,8 +46,13 @@ const ProfileTab = {
emailLanguage: this.$store.state.users.currentUser.language || '',
newPostTTLDays: this.$store.state.users.currentUser.status_ttl_days,
expirePosts: this.$store.state.users.currentUser.status_ttl_days !== null,
- userAcceptsDirectMessagesFrom: this.$store.state.users.currentUser.accepts_direct_messages_from,
- userAcceptsDirectMessagesFromOptions: ["everybody", "nobody", "people_i_follow"].map(mode => ({
+ userAcceptsDirectMessagesFrom:
+ this.$store.state.users.currentUser.accepts_direct_messages_from,
+ userAcceptsDirectMessagesFromOptions: [
+ 'everybody',
+ 'nobody',
+ 'people_i_follow'
+ ].map((mode) => ({
key: mode,
value: mode,
label: this.$t(`settings.user_accepts_direct_messages_from_${mode}`)
diff --git a/src/components/timeline_menu/timeline_menu_content.js b/src/components/timeline_menu/timeline_menu_content.js
index 7364d14ba..aa5921807 100644
--- a/src/components/timeline_menu/timeline_menu_content.js
+++ b/src/components/timeline_menu/timeline_menu_content.js
@@ -8,19 +8,23 @@ import {
faHome,
faCircle
} from '@fortawesome/free-solid-svg-icons'
-import { federatedTimelineVisible, publicTimelineVisible, bubbleTimelineVisible } from '../../lib/timeline_visibility'
+import {
+ federatedTimelineVisible,
+ publicTimelineVisible,
+ bubbleTimelineVisible
+} from '../../lib/timeline_visibility'
library.add(faUsers, faGlobe, faBookmark, faEnvelope, faHome, faCircle)
const TimelineMenuContent = {
computed: {
...mapState({
- currentUser: state => state.users.currentUser,
- privateMode: state => state.instance.private,
- federating: state => state.instance.federating,
+ currentUser: (state) => state.users.currentUser,
+ privateMode: (state) => state.instance.private,
+ federating: (state) => state.instance.federating,
publicTimelineVisible,
federatedTimelineVisible,
- bubbleTimelineVisible,
+ bubbleTimelineVisible
})
}
}
diff --git a/src/components/timeline_menu/timeline_menu_content.vue b/src/components/timeline_menu/timeline_menu_content.vue
index 0318f4bbe..7f833247a 100644
--- a/src/components/timeline_menu/timeline_menu_content.vue
+++ b/src/components/timeline_menu/timeline_menu_content.vue
@@ -41,13 +41,14 @@
>