mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2026-08-26 05:14:09 +02:00
Add:Haptic feedback device setting off/light/medium/heavy #472
This commit is contained in:
@@ -352,17 +352,17 @@ export default {
|
||||
}
|
||||
},
|
||||
async touchstartTrack(e) {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
if (!e || !e.touches || !this.$refs.track || !this.showFullscreen || this.lockUi) return
|
||||
this.touchTrackStart = true
|
||||
},
|
||||
async selectChapter(chapter) {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
this.seek(chapter.start)
|
||||
this.showChapterModal = false
|
||||
},
|
||||
async castClick() {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
if (this.isLocalPlayMethod) {
|
||||
this.$eventBus.$emit('cast-local-item')
|
||||
return
|
||||
@@ -382,13 +382,13 @@ export default {
|
||||
this.forceCloseDropdownMenu()
|
||||
},
|
||||
async jumpNextChapter() {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
if (this.isLoading) return
|
||||
if (!this.nextChapter) return
|
||||
this.seek(this.nextChapter.start)
|
||||
},
|
||||
async jumpChapterStart() {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
if (this.isLoading) return
|
||||
if (!this.currentChapter) {
|
||||
return this.restart()
|
||||
@@ -409,7 +409,7 @@ export default {
|
||||
this.$emit('showSleepTimer')
|
||||
},
|
||||
async setPlaybackSpeed(speed) {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
console.log(`[AudioPlayer] Set Playback Rate: ${speed}`)
|
||||
this.currentPlaybackRate = speed
|
||||
AbsAudioPlayer.setPlaybackSpeed({ value: speed })
|
||||
@@ -418,12 +418,12 @@ export default {
|
||||
this.seek(0)
|
||||
},
|
||||
async jumpBackwards() {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
if (this.isLoading) return
|
||||
AbsAudioPlayer.seekBackward({ value: this.jumpBackwardsTime })
|
||||
},
|
||||
async jumpForward() {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
if (this.isLoading) return
|
||||
AbsAudioPlayer.seekForward({ value: this.jumpForwardTime })
|
||||
},
|
||||
@@ -563,7 +563,7 @@ export default {
|
||||
this.seek(time)
|
||||
},
|
||||
async playPauseClick() {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
if (this.isLoading) return
|
||||
|
||||
this.isPlaying = !!((await AbsAudioPlayer.playPause()) || {}).playing
|
||||
@@ -667,7 +667,7 @@ export default {
|
||||
}
|
||||
},
|
||||
async clickMenuAction(action) {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
this.showMoreMenuDialog = false
|
||||
this.$nextTick(() => {
|
||||
if (action === 'lock') {
|
||||
|
||||
@@ -115,10 +115,10 @@ export default {
|
||||
})
|
||||
} else {
|
||||
items.push({
|
||||
icon: 'download',
|
||||
iconOutlined: false,
|
||||
text: 'Downloads',
|
||||
to: '/downloads'
|
||||
icon: 'download',
|
||||
iconOutlined: false,
|
||||
text: 'Downloads',
|
||||
to: '/downloads'
|
||||
})
|
||||
}
|
||||
items.push({
|
||||
@@ -137,7 +137,7 @@ export default {
|
||||
this.show = false
|
||||
},
|
||||
async logout() {
|
||||
await this.$hapticsImpactMedium()
|
||||
await this.$hapticsImpact()
|
||||
if (this.user) {
|
||||
await this.$axios.$post('/logout').catch((error) => {
|
||||
console.error(error)
|
||||
|
||||
Reference in New Issue
Block a user