diff --git a/src/components/attachment/attachment.js b/src/components/attachment/attachment.js index 4793985249..3b7f08dcdb 100644 --- a/src/components/attachment/attachment.js +++ b/src/components/attachment/attachment.js @@ -57,9 +57,9 @@ const Attachment = { } }, openModal (event) { - const modalTypes = this.$store.state.config.playVideosInline - ? ['image'] - : ['image', 'video'] + const modalTypes = this.$store.state.config.playVideosInModal + ? ['image', 'video'] + : ['image'] if (fileTypeService.fileMatchesSomeType(modalTypes, this.attachment) || this.usePlaceHolder ) { diff --git a/src/components/post_status_form/post_status_form.js b/src/components/post_status_form/post_status_form.js index 8a4e2489fb..88bc736f93 100644 --- a/src/components/post_status_form/post_status_form.js +++ b/src/components/post_status_form/post_status_form.js @@ -16,7 +16,7 @@ const buildMentionsString = ({user, attentions}, currentUser) => { return `@${attention.screen_name}` }) - return mentions.join(' ') + ' ' + return mentions.length > 0 ? mentions.join(' ') + ' ' : '' } const PostStatusForm = { diff --git a/src/components/settings/settings.js b/src/components/settings/settings.js index 06011e7c9f..8d1384855e 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -1,5 +1,5 @@ /* eslint-env browser */ -import TabSwitcher from '../tab_switcher/tab_switcher.jsx' +import TabSwitcher from '../tab_switcher/tab_switcher.js' import StyleSwitcher from '../style_switcher/style_switcher.vue' import InterfaceLanguageSwitcher from '../interface_language_switcher/interface_language_switcher.vue' import { filter, trim } from 'lodash' @@ -66,7 +66,7 @@ const settings = { Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'webkitAudioDecodedByteCount') || // Future spec, still not supported in Nightly 63 as of 08/2018 Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks'), - playVideosInline: user.playVideosInline, + playVideosInModal: user.playVideosInModal, useContainFit: user.useContainFit } }, @@ -164,8 +164,8 @@ const settings = { this.$store.dispatch('setOption', { name: 'webPushNotifications', value }) if (value) this.$store.dispatch('registerPushNotifications') }, - playVideosInline (value) { - this.$store.dispatch('setOption', { name: 'playVideosInline', value }) + playVideosInModal (value) { + this.$store.dispatch('setOption', { name: 'playVideosInModal', value }) }, useContainFit (value) { this.$store.dispatch('setOption', { name: 'useContainFit', value }) diff --git a/src/components/settings/settings.vue b/src/components/settings/settings.vue index 08d659d64c..9953780f23 100644 --- a/src/components/settings/settings.vue +++ b/src/components/settings/settings.vue @@ -146,8 +146,8 @@
  • - - + +
  • diff --git a/src/components/status/status.js b/src/components/status/status.js index ec4de516f2..c718fe9f69 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -87,7 +87,7 @@ const Status = { } }, retweet () { return !!this.statusoid.retweeted_status }, - retweeter () { return this.statusoid.user.name }, + retweeter () { return this.statusoid.user.name || this.statusoid.user.screen_name }, retweeterHtml () { return this.statusoid.user.name_html }, status () { if (this.retweet) { @@ -222,9 +222,9 @@ const Status = { if (this.attachmentSize === 'hide') { return [] } - return this.$store.state.config.playVideosInline - ? ['image'] - : ['image', 'video'] + return this.$store.state.config.playVideosInModal + ? ['image', 'video'] + : ['image'] }, galleryAttachments () { return this.status.attachments.filter( diff --git a/src/components/style_switcher/style_switcher.js b/src/components/style_switcher/style_switcher.js index 6a4e1cba38..8c3d48617b 100644 --- a/src/components/style_switcher/style_switcher.js +++ b/src/components/style_switcher/style_switcher.js @@ -7,7 +7,7 @@ import OpacityInput from '../opacity_input/opacity_input.vue' import ShadowControl from '../shadow_control/shadow_control.vue' import FontControl from '../font_control/font_control.vue' import ContrastRatio from '../contrast_ratio/contrast_ratio.vue' -import TabSwitcher from '../tab_switcher/tab_switcher.jsx' +import TabSwitcher from '../tab_switcher/tab_switcher.js' import Preview from './preview.vue' import ExportImport from '../export_import/export_import.vue' diff --git a/src/components/tab_switcher/tab_switcher.jsx b/src/components/tab_switcher/tab_switcher.js similarity index 85% rename from src/components/tab_switcher/tab_switcher.jsx rename to src/components/tab_switcher/tab_switcher.js index 9038733cd2..f9c3f92765 100644 --- a/src/components/tab_switcher/tab_switcher.jsx +++ b/src/components/tab_switcher/tab_switcher.js @@ -4,6 +4,7 @@ import './tab_switcher.scss' export default Vue.component('tab-switcher', { name: 'TabSwitcher', + props: ['renderOnlyFocused'], data () { return { active: this.$slots.default.findIndex(_ => _.tag) @@ -44,11 +45,12 @@ export default Vue.component('tab-switcher', { const contents = this.$slots.default.map((slot, index) => { if (!slot.tag) return const active = index === this.active - return ( -
    - {slot} -
    - ) + if (this.renderOnlyFocused) { + return active + ?
    {slot}
    + : + } + return
    {slot}
    }) return ( diff --git a/src/components/user_card_content/user_card_content.vue b/src/components/user_card_content/user_card_content.vue index a93caa5eee..d1034d6850 100644 --- a/src/components/user_card_content/user_card_content.vue +++ b/src/components/user_card_content/user_card_content.vue @@ -110,15 +110,15 @@
    {{ $t('user_card.statuses') }}
    - {{user.statuses_count}}
    + {{user.statuses_count}}
    {{ $t('user_card.followees') }}
    - {{user.friends_count}} + {{user.friends_count}}
    {{ $t('user_card.followers') }}
    - {{user.followers_count}} + {{user.followers_count}}

    diff --git a/src/components/user_profile/user_profile.vue b/src/components/user_profile/user_profile.vue index 4ba09dc332..c431c729d6 100644 --- a/src/components/user_profile/user_profile.vue +++ b/src/components/user_profile/user_profile.vue @@ -1,9 +1,20 @@