forked from AkkomaGang/akkoma-fe
Merge branch 'fix/default-inlined-videos' into 'develop'
Change video playing default without bothering making it an instance configurable See merge request pleroma/pleroma-fe!505
This commit is contained in:
commit
f0721ed83b
7 changed files with 14 additions and 17 deletions
|
@ -57,9 +57,9 @@ const Attachment = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
openModal (event) {
|
openModal (event) {
|
||||||
const modalTypes = this.$store.state.config.playVideosInline
|
const modalTypes = this.$store.state.config.playVideosInModal
|
||||||
? ['image']
|
? ['image', 'video']
|
||||||
: ['image', 'video']
|
: ['image']
|
||||||
if (fileTypeService.fileMatchesSomeType(modalTypes, this.attachment) ||
|
if (fileTypeService.fileMatchesSomeType(modalTypes, this.attachment) ||
|
||||||
this.usePlaceHolder
|
this.usePlaceHolder
|
||||||
) {
|
) {
|
||||||
|
|
|
@ -66,7 +66,7 @@ const settings = {
|
||||||
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'webkitAudioDecodedByteCount') ||
|
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'webkitAudioDecodedByteCount') ||
|
||||||
// Future spec, still not supported in Nightly 63 as of 08/2018
|
// Future spec, still not supported in Nightly 63 as of 08/2018
|
||||||
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks'),
|
Object.getOwnPropertyDescriptor(HTMLMediaElement.prototype, 'audioTracks'),
|
||||||
playVideosInline: user.playVideosInline,
|
playVideosInModal: user.playVideosInModal,
|
||||||
useContainFit: user.useContainFit
|
useContainFit: user.useContainFit
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -164,8 +164,8 @@ const settings = {
|
||||||
this.$store.dispatch('setOption', { name: 'webPushNotifications', value })
|
this.$store.dispatch('setOption', { name: 'webPushNotifications', value })
|
||||||
if (value) this.$store.dispatch('registerPushNotifications')
|
if (value) this.$store.dispatch('registerPushNotifications')
|
||||||
},
|
},
|
||||||
playVideosInline (value) {
|
playVideosInModal (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'playVideosInline', value })
|
this.$store.dispatch('setOption', { name: 'playVideosInModal', value })
|
||||||
},
|
},
|
||||||
useContainFit (value) {
|
useContainFit (value) {
|
||||||
this.$store.dispatch('setOption', { name: 'useContainFit', value })
|
this.$store.dispatch('setOption', { name: 'useContainFit', value })
|
||||||
|
|
|
@ -146,8 +146,8 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" id="playVideosInline" v-model="playVideosInline">
|
<input type="checkbox" id="playVideosInModal" v-model="playVideosInModal">
|
||||||
<label for="playVideosInline">{{$t('settings.play_videos_inline')}}</label>
|
<label for="playVideosInModal">{{$t('settings.play_videos_in_modal')}}</label>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<input type="checkbox" id="useContainFit" v-model="useContainFit">
|
<input type="checkbox" id="useContainFit" v-model="useContainFit">
|
||||||
|
|
|
@ -222,9 +222,9 @@ const Status = {
|
||||||
if (this.attachmentSize === 'hide') {
|
if (this.attachmentSize === 'hide') {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
return this.$store.state.config.playVideosInline
|
return this.$store.state.config.playVideosInModal
|
||||||
? ['image']
|
? ['image', 'video']
|
||||||
: ['image', 'video']
|
: ['image']
|
||||||
},
|
},
|
||||||
galleryAttachments () {
|
galleryAttachments () {
|
||||||
return this.status.attachments.filter(
|
return this.status.attachments.filter(
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
"lock_account_description": "Restrict your account to approved followers only",
|
"lock_account_description": "Restrict your account to approved followers only",
|
||||||
"loop_video": "Loop videos",
|
"loop_video": "Loop videos",
|
||||||
"loop_video_silent_only": "Loop only videos without sound (i.e. Mastodon's \"gifs\")",
|
"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",
|
"use_contain_fit": "Don't crop the attachment in thumbnails",
|
||||||
"name": "Name",
|
"name": "Name",
|
||||||
"name_bio": "Name & Bio",
|
"name_bio": "Name & Bio",
|
||||||
|
|
|
@ -150,7 +150,7 @@
|
||||||
"lock_account_description": "Vain erikseen hyväksytyt käyttäjät voivat seurata tiliäsi",
|
"lock_account_description": "Vain erikseen hyväksytyt käyttäjät voivat seurata tiliäsi",
|
||||||
"loop_video": "Uudelleentoista videot",
|
"loop_video": "Uudelleentoista videot",
|
||||||
"loop_video_silent_only": "Uudelleentoista ainoastaan äänettömät videot (Video-\"giffit\")",
|
"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",
|
"use_contain_fit": "Älä rajaa liitteitä esikatselussa",
|
||||||
"name": "Nimi",
|
"name": "Nimi",
|
||||||
"name_bio": "Nimi ja kuvaus",
|
"name_bio": "Nimi ja kuvaus",
|
||||||
|
|
|
@ -19,8 +19,5 @@
|
||||||
"loginMethod": "password",
|
"loginMethod": "password",
|
||||||
"webPushNotifications": false,
|
"webPushNotifications": false,
|
||||||
"noAttachmentLinks": false,
|
"noAttachmentLinks": false,
|
||||||
"nsfwCensorImage": "",
|
"nsfwCensorImage": ""
|
||||||
"useOneClickNsfw": true,
|
|
||||||
"playVideosInline": false,
|
|
||||||
"useContainFit": false
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue