feat: add haptic feedback to all action buttons

This commit is contained in:
benonymity 2022-12-08 00:28:28 -05:00
parent 96dde8cf31
commit 1aa6a441f3
16 changed files with 113 additions and 42 deletions

View file

@ -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>