mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-07-09 02:41:35 +00:00
Merge remote-tracking branch 'remotes/upstream/master'
This commit is contained in:
commit
f643d12cd6
2 changed files with 11 additions and 15 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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 [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue