mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-07-23 12:16:10 +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
|
@ -77,6 +77,7 @@
|
|||
|
||||
<script>
|
||||
import { Dialog } from '@capacitor/dialog'
|
||||
import { Haptics, ImpactStyle } from '@capacitor/haptics';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -132,6 +133,7 @@ export default {
|
|||
}
|
||||
},
|
||||
async connectToServer(config) {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
console.log('[ServerConnectForm] connectToServer', config.address)
|
||||
this.processing = true
|
||||
this.serverConfig = {
|
||||
|
@ -159,6 +161,7 @@ export default {
|
|||
},
|
||||
async removeServerConfigClick() {
|
||||
if (!this.serverConfig.id) return
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
|
||||
const { value } = await Dialog.confirm({
|
||||
title: 'Confirm',
|
||||
|
@ -189,7 +192,8 @@ export default {
|
|||
this.showForm = true
|
||||
this.showAuth = true
|
||||
},
|
||||
newServerConfigClick() {
|
||||
async newServerConfigClick() {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
this.serverConfig = {
|
||||
address: '',
|
||||
userId: '',
|
||||
|
@ -348,4 +352,4 @@ export default {
|
|||
this.init()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue