Merge remote-tracking branch 'remotes/upstream/master'

This commit is contained in:
Toni Barth 2024-10-11 15:43:38 +02:00
commit f643d12cd6
2 changed files with 11 additions and 15 deletions

View file

@ -65,15 +65,10 @@ export default {
}, },
methods: { methods: {
imageLoaded() { imageLoaded() {
var aspectRatio = 1.25
if (this.$refs.wrapper) {
aspectRatio = this.$refs.wrapper.clientHeight / this.$refs.wrapper.clientWidth
}
if (this.$refs.img) { if (this.$refs.img) {
var { naturalWidth, naturalHeight } = this.$refs.img var { naturalWidth, naturalHeight } = this.$refs.img
var imgAr = naturalHeight / naturalWidth var imgAr = naturalHeight / naturalWidth
var arDiff = Math.abs(imgAr - aspectRatio) if (imgAr < 0.5 || imgAr > 2) {
if (arDiff > 0.15) {
this.showCoverBg = true this.showCoverBg = true
} else { } else {
this.showCoverBg = false this.showCoverBg = false

View file

@ -93,17 +93,18 @@ export default {
}, },
computed: { computed: {
contextMenuItems() { contextMenuItems() {
if (!this.userIsAdminOrUp) return [] const menuItems = []
return [ if (this.userIsAdminOrUp) {
{ menuItems.push({
text: 'Quick match all episodes', text: 'Quick match all episodes',
action: 'quick-match-episodes' action: 'quick-match-episodes'
}, })
{ }
menuItems.push({
text: this.allEpisodesFinished ? this.$strings.MessageMarkAllEpisodesNotFinished : this.$strings.MessageMarkAllEpisodesFinished, text: this.allEpisodesFinished ? this.$strings.MessageMarkAllEpisodesNotFinished : this.$strings.MessageMarkAllEpisodesFinished,
action: 'batch-mark-as-finished' action: 'batch-mark-as-finished'
} })
] return menuItems
}, },
sortItems() { sortItems() {
return [ return [