mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 01:54:33 +02:00
fix: use native haptic plugin and remove semicolons
This commit is contained in:
parent
1aa6a441f3
commit
acc5bde33a
16 changed files with 65 additions and 87 deletions
|
@ -1,52 +1,52 @@
|
|||
import Vue from 'vue'
|
||||
import { Haptics, ImpactStyle, NotificationType } from '@capacitor/haptics'
|
||||
import Vue from "vue";
|
||||
import { Haptics, ImpactStyle, NotificationType } from "@capacitor/haptics"
|
||||
|
||||
const hapticsImpactHeavy = async () => {
|
||||
await Haptics.impact({ style: ImpactStyle.Heavy });
|
||||
await Haptics.impact({ style: ImpactStyle.Heavy })
|
||||
}
|
||||
Vue.prototype.$hapticsImpactHeavy = hapticsImpactHeavy
|
||||
Vue.prototype.$hapticsImpactHeavy = hapticsImpactHeavy;
|
||||
|
||||
const hapticsImpactMedium = async () => {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
await Haptics.impact({ style: ImpactStyle.Medium })
|
||||
}
|
||||
Vue.prototype.$hapticsImpactMedium = hapticsImpactMedium
|
||||
|
||||
const hapticsImpactLight = async () => {
|
||||
await Haptics.impact({ style: ImpactStyle.Light });
|
||||
};
|
||||
await Haptics.impact({ style: ImpactStyle.Light })
|
||||
}
|
||||
Vue.prototype.$hapticsImpactLight = hapticsImpactLight
|
||||
|
||||
const hapticsVibrate = async () => {
|
||||
await Haptics.vibrate();
|
||||
};
|
||||
Vue.prototype.$hapticsVibrate = hapticsVibrate
|
||||
await Haptics.vibrate()
|
||||
}
|
||||
Vue.prototype.$hapticsVibrate = hapticsVibrate;
|
||||
|
||||
const hapticsNotificationSuccess = async () => {
|
||||
await Haptics.notification({ type: NotificationType.Success });
|
||||
};
|
||||
await Haptics.notification({ type: NotificationType.Success })
|
||||
}
|
||||
Vue.prototype.$hapticsNotificationSuccess = hapticsNotificationSuccess
|
||||
|
||||
const hapticsNotificationWarning = async () => {
|
||||
await Haptics.notification({ type: NotificationType.Warning });
|
||||
};
|
||||
await Haptics.notification({ type: NotificationType.Warning })
|
||||
}
|
||||
Vue.prototype.$hapticsNotificationWarning = hapticsNotificationWarning
|
||||
|
||||
const hapticsNotificationError = async () => {
|
||||
await Haptics.notification({ type: NotificationType.Error });
|
||||
};
|
||||
await Haptics.notification({ type: NotificationType.Error })
|
||||
}
|
||||
Vue.prototype.$hapticsNotificationError = hapticsNotificationError
|
||||
|
||||
const hapticsSelectionStart = async () => {
|
||||
await Haptics.selectionStart();
|
||||
};
|
||||
await Haptics.selectionStart()
|
||||
}
|
||||
Vue.prototype.$hapticsSelectionStart = hapticsSelectionStart
|
||||
|
||||
const hapticsSelectionChanged = async () => {
|
||||
await Haptics.selectionChanged();
|
||||
};
|
||||
await Haptics.selectionChanged()
|
||||
}
|
||||
Vue.prototype.$hapticsSelectionChanged = hapticsSelectionChanged
|
||||
|
||||
const hapticsSelectionEnd = async () => {
|
||||
await Haptics.selectionEnd();
|
||||
};
|
||||
Vue.prototype.$hapticsSelectionEnd = hapticsSelectionEnd
|
||||
await Haptics.selectionEnd()
|
||||
}
|
||||
Vue.prototype.$hapticsSelectionEnd = hapticsSelectionEnd
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue