mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-21 11:14:38 +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
|
@ -46,6 +46,8 @@
|
|||
|
||||
<script>
|
||||
import { Dialog } from '@capacitor/dialog'
|
||||
import { Haptics, ImpactStyle } from '@capacitor/haptics';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
value: Boolean,
|
||||
|
@ -94,6 +96,7 @@ export default {
|
|||
this.showBookmarkTitleInput = true
|
||||
},
|
||||
async deleteBookmark(bm) {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
const { value } = await Dialog.confirm({
|
||||
title: 'Remove Bookmark',
|
||||
message: `Are you sure you want to remove bookmark?`
|
||||
|
@ -111,7 +114,8 @@ export default {
|
|||
})
|
||||
this.show = false
|
||||
},
|
||||
clickBookmark(bm) {
|
||||
async clickBookmark(bm) {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
this.$emit('select', bm)
|
||||
},
|
||||
submitUpdateBookmark(updatedBookmark) {
|
||||
|
@ -155,7 +159,8 @@ export default {
|
|||
this.newBookmarkTitle = this.$formatDate(Date.now(), 'MMM dd, yyyy HH:mm')
|
||||
this.showBookmarkTitleInput = true
|
||||
},
|
||||
submitBookmark() {
|
||||
async submitBookmark() {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
if (this.selectedBookmark) {
|
||||
var updatePayload = {
|
||||
...this.selectedBookmark,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue