mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 18:15:01 +02:00
feat: add haptic feedback to all action buttons
This commit is contained in:
parent
96dde8cf31
commit
1aa6a441f3
16 changed files with 113 additions and 42 deletions
|
@ -45,6 +45,7 @@
|
|||
<script>
|
||||
import { Dialog } from '@capacitor/dialog'
|
||||
import { AbsFileSystem, AbsDownloader } from '@/plugins/capacitor'
|
||||
import { Haptics, ImpactStyle } from '@capacitor/haptics';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
@ -148,8 +149,9 @@ export default {
|
|||
}
|
||||
return folderObj
|
||||
},
|
||||
downloadClick() {
|
||||
async downloadClick() {
|
||||
if (this.downloadItem) return
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
if (this.isIos) {
|
||||
// no local folders on iOS
|
||||
this.startDownload()
|
||||
|
@ -209,7 +211,8 @@ export default {
|
|||
this.$toast.error(errorMsg)
|
||||
}
|
||||
},
|
||||
playClick() {
|
||||
async playClick() {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
if (this.streamIsPlaying) {
|
||||
this.$eventBus.$emit('pause-item')
|
||||
} else {
|
||||
|
@ -231,6 +234,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async toggleFinished() {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
this.isProcessingReadUpdate = true
|
||||
if (this.isLocal || this.localEpisode) {
|
||||
var isFinished = !this.userIsFinished
|
||||
|
@ -278,4 +282,4 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue