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

@ -47,6 +47,7 @@
<script>
import { Dialog } from '@capacitor/dialog'
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default {
data() {
@ -149,6 +150,7 @@ export default {
this.saveSettings()
},
async saveSettings() {
await Haptics.impact({ style: ImpactStyle.Medium });
const updatedDeviceData = await this.$db.updateDeviceSettings({ ...this.settings })
console.log('Saved device data', updatedDeviceData)
if (updatedDeviceData) {
@ -176,4 +178,4 @@ export default {
this.init()
}
}
</script>
</script>