From a8c6b3f538dc97b93411213f72e90c16156f3926 Mon Sep 17 00:00:00 2001 From: shpuld Date: Thu, 31 Jan 2019 21:19:41 +0200 Subject: [PATCH] Change video playing default without bothering making it an instance configurable --- src/components/attachment/attachment.js | 6 +++--- src/components/settings/settings.js | 6 +++--- src/components/settings/settings.vue | 4 ++-- src/components/status/status.js | 6 +++--- src/i18n/en.json | 2 +- src/i18n/fi.json | 2 +- static/config.json | 5 +---- 7 files changed, 14 insertions(+), 17 deletions(-) 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/settings/settings.js b/src/components/settings/settings.js index 06011e7c9f..7353b0e42f 100644 --- a/src/components/settings/settings.js +++ b/src/components/settings/settings.js @@ -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..c07c60e147 100644 --- a/src/components/status/status.js +++ b/src/components/status/status.js @@ -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/i18n/en.json b/src/i18n/en.json index b1356aaa11..3e194c5143 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -150,7 +150,7 @@ "lock_account_description": "Restrict your account to approved followers only", "loop_video": "Loop videos", "loop_video_silent_only": "Loop only videos without sound (i.e. Mastodon's \"gifs\")", - "play_videos_inline": "Play videos directly on timeline", + "play_videos_in_modal": "Play videos directly in the media viewer", "use_contain_fit": "Don't crop the attachment in thumbnails", "name": "Name", "name_bio": "Name & Bio", diff --git a/src/i18n/fi.json b/src/i18n/fi.json index 122016b025..0d62f29588 100644 --- a/src/i18n/fi.json +++ b/src/i18n/fi.json @@ -150,7 +150,7 @@ "lock_account_description": "Vain erikseen hyväksytyt käyttäjät voivat seurata tiliäsi", "loop_video": "Uudelleentoista videot", "loop_video_silent_only": "Uudelleentoista ainoastaan äänettömät videot (Video-\"giffit\")", - "play_videos_inline": "Toista videot suoraan aikajanalla", + "play_videos_in_modal": "Toista videot modaalissa", "use_contain_fit": "Älä rajaa liitteitä esikatselussa", "name": "Nimi", "name_bio": "Nimi ja kuvaus", diff --git a/static/config.json b/static/config.json index aac93f7067..24e26696fa 100644 --- a/static/config.json +++ b/static/config.json @@ -19,8 +19,5 @@ "loginMethod": "password", "webPushNotifications": false, "noAttachmentLinks": false, - "nsfwCensorImage": "", - "useOneClickNsfw": true, - "playVideosInline": false, - "useContainFit": false + "nsfwCensorImage": "" }