fix: use native haptic plugin and remove semicolons

This commit is contained in:
benonymity
2022-12-08 19:09:46 -05:00
parent 1aa6a441f3
commit acc5bde33a
16 changed files with 65 additions and 87 deletions
+10 -11
View File
@@ -118,7 +118,6 @@
<script> <script>
import { Capacitor } from '@capacitor/core' import { Capacitor } from '@capacitor/core'
import { AbsAudioPlayer } from '@/plugins/capacitor' import { AbsAudioPlayer } from '@/plugins/capacitor'
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
props: { props: {
@@ -337,17 +336,17 @@ export default {
} }
}, },
async touchstartTrack(e) { async touchstartTrack(e) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (!e || !e.touches || !this.$refs.track || !this.showFullscreen || this.lockUi) return if (!e || !e.touches || !this.$refs.track || !this.showFullscreen || this.lockUi) return
this.touchTrackStart = true this.touchTrackStart = true
}, },
async selectChapter(chapter) { async selectChapter(chapter) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.seek(chapter.start) this.seek(chapter.start)
this.showChapterModal = false this.showChapterModal = false
}, },
async castClick() { async castClick() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.isLocalPlayMethod) { if (this.isLocalPlayMethod) {
this.$eventBus.$emit('cast-local-item') this.$eventBus.$emit('cast-local-item')
return return
@@ -367,13 +366,13 @@ export default {
this.forceCloseDropdownMenu() this.forceCloseDropdownMenu()
}, },
async jumpNextChapter() { async jumpNextChapter() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.isLoading) return if (this.isLoading) return
if (!this.nextChapter) return if (!this.nextChapter) return
this.seek(this.nextChapter.start) this.seek(this.nextChapter.start)
}, },
async jumpChapterStart() { async jumpChapterStart() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.isLoading) return if (this.isLoading) return
if (!this.currentChapter) { if (!this.currentChapter) {
return this.restart() return this.restart()
@@ -394,7 +393,7 @@ export default {
this.$emit('showSleepTimer') this.$emit('showSleepTimer')
}, },
async setPlaybackSpeed(speed) { async setPlaybackSpeed(speed) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
console.log(`[AudioPlayer] Set Playback Rate: ${speed}`) console.log(`[AudioPlayer] Set Playback Rate: ${speed}`)
this.currentPlaybackRate = speed this.currentPlaybackRate = speed
AbsAudioPlayer.setPlaybackSpeed({ value: speed }) AbsAudioPlayer.setPlaybackSpeed({ value: speed })
@@ -403,12 +402,12 @@ export default {
this.seek(0) this.seek(0)
}, },
async jumpBackwards() { async jumpBackwards() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.isLoading) return if (this.isLoading) return
AbsAudioPlayer.seekBackward({ value: this.jumpBackwardsTime }) AbsAudioPlayer.seekBackward({ value: this.jumpBackwardsTime })
}, },
async jumpForward() { async jumpForward() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.isLoading) return if (this.isLoading) return
AbsAudioPlayer.seekForward({ value: this.jumpForwardTime }) AbsAudioPlayer.seekForward({ value: this.jumpForwardTime })
}, },
@@ -548,7 +547,7 @@ export default {
this.seek(time) this.seek(time)
}, },
async playPauseClick() { async playPauseClick() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.isLoading) return if (this.isLoading) return
this.isPlaying = !!((await AbsAudioPlayer.playPause()) || {}).playing this.isPlaying = !!((await AbsAudioPlayer.playPause()) || {}).playing
@@ -652,7 +651,7 @@ export default {
} }
}, },
async clickMenuAction(action) { async clickMenuAction(action) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.showMoreMenuDialog = false this.showMoreMenuDialog = false
this.$nextTick(() => { this.$nextTick(() => {
if (action === 'lock') { if (action === 'lock') {
+1 -2
View File
@@ -36,7 +36,6 @@
<script> <script>
import TouchEvent from '@/objects/TouchEvent' import TouchEvent from '@/objects/TouchEvent'
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
data() { data() {
@@ -138,7 +137,7 @@ export default {
this.show = false this.show = false
}, },
async logout() { async logout() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.user) { if (this.user) {
await this.$axios.$post('/logout').catch((error) => { await this.$axios.$post('/logout').catch((error) => {
console.error(error) console.error(error)
+1 -2
View File
@@ -70,7 +70,6 @@
<script> <script>
import { Capacitor } from '@capacitor/core' import { Capacitor } from '@capacitor/core'
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
props: { props: {
@@ -408,7 +407,7 @@ export default {
e.preventDefault() e.preventDefault()
this.selectBtnClick() this.selectBtnClick()
} else if (this.recentEpisode) { } else if (this.recentEpisode) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
var eventBus = this.$eventBus || this.$nuxt.$eventBus var eventBus = this.$eventBus || this.$nuxt.$eventBus
if (this.streamIsPlaying) { if (this.streamIsPlaying) {
eventBus.$emit('pause-item') eventBus.$emit('pause-item')
+3 -4
View File
@@ -77,7 +77,6 @@
<script> <script>
import { Dialog } from '@capacitor/dialog' import { Dialog } from '@capacitor/dialog'
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
data() { data() {
@@ -133,7 +132,7 @@ export default {
} }
}, },
async connectToServer(config) { async connectToServer(config) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
console.log('[ServerConnectForm] connectToServer', config.address) console.log('[ServerConnectForm] connectToServer', config.address)
this.processing = true this.processing = true
this.serverConfig = { this.serverConfig = {
@@ -161,7 +160,7 @@ export default {
}, },
async removeServerConfigClick() { async removeServerConfigClick() {
if (!this.serverConfig.id) return if (!this.serverConfig.id) return
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
const { value } = await Dialog.confirm({ const { value } = await Dialog.confirm({
title: 'Confirm', title: 'Confirm',
@@ -193,7 +192,7 @@ export default {
this.showAuth = true this.showAuth = true
}, },
async newServerConfigClick() { async newServerConfigClick() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.serverConfig = { this.serverConfig = {
address: '', address: '',
userId: '', userId: '',
+1 -3
View File
@@ -25,8 +25,6 @@
</template> </template>
<script> <script>
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
data() { data() {
return { return {
@@ -107,7 +105,7 @@ export default {
}, },
async changeView() { async changeView() {
this.bookshelfListView = !this.bookshelfListView this.bookshelfListView = !this.bookshelfListView
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
} }
}, },
mounted() { mounted() {
+3 -4
View File
@@ -46,7 +46,6 @@
<script> <script>
import { Dialog } from '@capacitor/dialog' import { Dialog } from '@capacitor/dialog'
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
props: { props: {
@@ -96,7 +95,7 @@ export default {
this.showBookmarkTitleInput = true this.showBookmarkTitleInput = true
}, },
async deleteBookmark(bm) { async deleteBookmark(bm) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
const { value } = await Dialog.confirm({ const { value } = await Dialog.confirm({
title: 'Remove Bookmark', title: 'Remove Bookmark',
message: `Are you sure you want to remove bookmark?` message: `Are you sure you want to remove bookmark?`
@@ -115,7 +114,7 @@ export default {
this.show = false this.show = false
}, },
async clickBookmark(bm) { async clickBookmark(bm) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.$emit('select', bm) this.$emit('select', bm)
}, },
submitUpdateBookmark(updatedBookmark) { submitUpdateBookmark(updatedBookmark) {
@@ -160,7 +159,7 @@ export default {
this.showBookmarkTitleInput = true this.showBookmarkTitleInput = true
}, },
async submitBookmark() { async submitBookmark() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.selectedBookmark) { if (this.selectedBookmark) {
var updatePayload = { var updatePayload = {
...this.selectedBookmark, ...this.selectedBookmark,
+2 -4
View File
@@ -48,8 +48,6 @@
</template> </template>
<script> <script>
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
props: { props: {
value: Boolean, value: Boolean,
@@ -199,7 +197,7 @@ export default {
}, },
methods: { methods: {
async clearSelected() { async clearSelected() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.selected = 'all' this.selected = 'all'
this.show = false this.show = false
this.$nextTick(() => this.$emit('change', 'all')) this.$nextTick(() => this.$emit('change', 'all'))
@@ -218,7 +216,7 @@ export default {
this.show = false this.show = false
return return
} }
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.selected = val this.selected = val
this.show = false this.show = false
this.$nextTick(() => this.$emit('change', val)) this.$nextTick(() => this.$emit('change', val))
+1 -3
View File
@@ -25,8 +25,6 @@
</template> </template>
<script> <script>
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
data() { data() {
return { return {
@@ -51,7 +49,7 @@ export default {
}, },
methods: { methods: {
async clickedOption(lib) { async clickedOption(lib) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.show = false this.show = false
if (lib.id === this.currentLibraryId) return if (lib.id === this.currentLibraryId) return
await this.$store.dispatch('libraries/fetch', lib.id) await this.$store.dispatch('libraries/fetch', lib.id)
+1 -3
View File
@@ -18,8 +18,6 @@
</template> </template>
<script> <script>
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
props: { props: {
value: Boolean, value: Boolean,
@@ -129,7 +127,7 @@ export default {
}, },
methods: { methods: {
async clickedOption(val) { async clickedOption(val) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.selected === val) { if (this.selected === val) {
this.selectedDesc = !this.selectedDesc this.selectedDesc = !this.selectedDesc
} else { } else {
+7 -9
View File
@@ -59,8 +59,6 @@
</template> </template>
<script> <script>
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
props: { props: {
value: Boolean, value: Boolean,
@@ -92,36 +90,36 @@ export default {
}, },
methods: { methods: {
async clickedChapterOption() { async clickedChapterOption() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.show = false this.show = false
this.$nextTick(() => this.$emit('change', { time: this.currentEndOfChapterTime * 1000, isChapterTime: true })) this.$nextTick(() => this.$emit('change', { time: this.currentEndOfChapterTime * 1000, isChapterTime: true }))
}, },
async clickedOption(timeoutMin) { async clickedOption(timeoutMin) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
var timeout = timeoutMin * 1000 * 60 var timeout = timeoutMin * 1000 * 60
this.show = false this.show = false
this.manualTimerModal = false this.manualTimerModal = false
this.$nextTick(() => this.$emit('change', { time: timeout, isChapterTime: false })) this.$nextTick(() => this.$emit('change', { time: timeout, isChapterTime: false }))
}, },
async cancelSleepTimer() { async cancelSleepTimer() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.$emit('cancel') this.$emit('cancel')
this.show = false this.show = false
}, },
async increaseSleepTime() { async increaseSleepTime() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.$emit('increase') this.$emit('increase')
}, },
async decreaseSleepTime() { async decreaseSleepTime() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.$emit('decrease') this.$emit('decrease')
}, },
async increaseManualTimeout() { async increaseManualTimeout() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.manualTimeoutMin++ this.manualTimeoutMin++
}, },
async decreaseManualTimeout() { async decreaseManualTimeout() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.manualTimeoutMin > 1) this.manualTimeoutMin-- if (this.manualTimeoutMin > 1) this.manualTimeoutMin--
} }
}, },
@@ -39,8 +39,6 @@
</template> </template>
<script> <script>
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
props: { props: {
libraryItemId: String libraryItemId: String
@@ -117,7 +115,7 @@ export default {
}) })
}, },
async clickPlaylist(playlist) { async clickPlaylist(playlist) {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (playlist.isItemIncluded) { if (playlist.isItemIncluded) {
this.removeFromPlaylist(playlist) this.removeFromPlaylist(playlist)
} else { } else {
@@ -167,7 +165,7 @@ export default {
this.showPlaylistNameInput = true this.showPlaylistNameInput = true
}, },
async submitCreatePlaylist() { async submitCreatePlaylist() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (!this.newPlaylistName || !this.selectedPlaylistItems.length) { if (!this.newPlaylistName || !this.selectedPlaylistItems.length) {
return return
} }
+3 -4
View File
@@ -45,7 +45,6 @@
<script> <script>
import { Dialog } from '@capacitor/dialog' import { Dialog } from '@capacitor/dialog'
import { AbsFileSystem, AbsDownloader } from '@/plugins/capacitor' import { AbsFileSystem, AbsDownloader } from '@/plugins/capacitor'
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
props: { props: {
@@ -151,7 +150,7 @@ export default {
}, },
async downloadClick() { async downloadClick() {
if (this.downloadItem) return if (this.downloadItem) return
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.isIos) { if (this.isIos) {
// no local folders on iOS // no local folders on iOS
this.startDownload() this.startDownload()
@@ -212,7 +211,7 @@ export default {
} }
}, },
async playClick() { async playClick() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.streamIsPlaying) { if (this.streamIsPlaying) {
this.$eventBus.$emit('pause-item') this.$eventBus.$emit('pause-item')
} else { } else {
@@ -234,7 +233,7 @@ export default {
} }
}, },
async toggleFinished() { async toggleFinished() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.isProcessingReadUpdate = true this.isProcessingReadUpdate = true
if (this.isLocal || this.localEpisode) { if (this.isLocal || this.localEpisode) {
var isFinished = !this.userIsFinished var isFinished = !this.userIsFinished
+1 -3
View File
@@ -23,8 +23,6 @@
</template> </template>
<script> <script>
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
asyncData({ redirect, store }) { asyncData({ redirect, store }) {
if (!store.state.socketConnected) { if (!store.state.socketConnected) {
@@ -55,7 +53,7 @@ export default {
}, },
methods: { methods: {
async logout() { async logout() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.user) { if (this.user) {
await this.$axios.$post('/logout').catch((error) => { await this.$axios.$post('/logout').catch((error) => {
console.error(error) console.error(error)
+4 -5
View File
@@ -142,7 +142,6 @@
<script> <script>
import { Dialog } from '@capacitor/dialog' import { Dialog } from '@capacitor/dialog'
import { AbsFileSystem, AbsDownloader } from '@/plugins/capacitor' import { AbsFileSystem, AbsDownloader } from '@/plugins/capacitor'
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
@@ -410,7 +409,7 @@ export default {
}, },
async playClick() { async playClick() {
var episodeId = null var episodeId = null
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.isPodcast) { if (this.isPodcast) {
this.episodes.sort((a, b) => { this.episodes.sort((a, b) => {
@@ -464,7 +463,7 @@ export default {
this.$eventBus.$emit('play-item', { libraryItemId: this.libraryItemId, episodeId }) this.$eventBus.$emit('play-item', { libraryItemId: this.libraryItemId, episodeId })
}, },
async clearProgressClick() { async clearProgressClick() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
const { value } = await Dialog.confirm({ const { value } = await Dialog.confirm({
title: 'Confirm', title: 'Confirm',
message: 'Are you sure you want to reset your progress?' message: 'Are you sure you want to reset your progress?'
@@ -517,7 +516,7 @@ export default {
if (!this.numTracks) { if (!this.numTracks) {
return return
} }
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (this.isIos) { if (this.isIos) {
// no local folders on iOS // no local folders on iOS
this.startDownload() this.startDownload()
@@ -585,7 +584,7 @@ export default {
} }
}, },
async toggleFinished() { async toggleFinished() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.isProcessingReadUpdate = true this.isProcessingReadUpdate = true
if (this.isLocal) { if (this.isLocal) {
var isFinished = !this.userIsFinished var isFinished = !this.userIsFinished
+2 -3
View File
@@ -105,7 +105,6 @@ import draggable from 'vuedraggable'
import { Capacitor } from '@capacitor/core' import { Capacitor } from '@capacitor/core'
import { Dialog } from '@capacitor/dialog' import { Dialog } from '@capacitor/dialog'
import { AbsFileSystem } from '@/plugins/capacitor' import { AbsFileSystem } from '@/plugins/capacitor'
import { Haptics, ImpactStyle } from '@capacitor/haptics';
export default { export default {
components: { components: {
@@ -257,7 +256,7 @@ export default {
this.showDialog = true this.showDialog = true
}, },
async play() { async play() {
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
this.$eventBus.$emit('play-item', { libraryItemId: this.localLibraryItemId }) this.$eventBus.$emit('play-item', { libraryItemId: this.localLibraryItemId })
}, },
getCapImageSrc(contentUrl) { getCapImageSrc(contentUrl) {
@@ -265,7 +264,7 @@ export default {
}, },
async dialogAction(action) { async dialogAction(action) {
console.log('Dialog action', action) console.log('Dialog action', action)
await Haptics.impact({ style: ImpactStyle.Medium }); await this.$hapticsImpactMedium()
if (action == 'scan') { if (action == 'scan') {
this.scanItem() this.scanItem()
} else if (action == 'rescan') { } else if (action == 'rescan') {
+22 -22
View File
@@ -1,52 +1,52 @@
import Vue from 'vue' import Vue from "vue";
import { Haptics, ImpactStyle, NotificationType } from '@capacitor/haptics' import { Haptics, ImpactStyle, NotificationType } from "@capacitor/haptics"
const hapticsImpactHeavy = async () => { 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 () => { const hapticsImpactMedium = async () => {
await Haptics.impact({ style: ImpactStyle.Medium }); await Haptics.impact({ style: ImpactStyle.Medium })
} }
Vue.prototype.$hapticsImpactMedium = hapticsImpactMedium Vue.prototype.$hapticsImpactMedium = hapticsImpactMedium
const hapticsImpactLight = async () => { const hapticsImpactLight = async () => {
await Haptics.impact({ style: ImpactStyle.Light }); await Haptics.impact({ style: ImpactStyle.Light })
}; }
Vue.prototype.$hapticsImpactLight = hapticsImpactLight Vue.prototype.$hapticsImpactLight = hapticsImpactLight
const hapticsVibrate = async () => { const hapticsVibrate = async () => {
await Haptics.vibrate(); await Haptics.vibrate()
}; }
Vue.prototype.$hapticsVibrate = hapticsVibrate Vue.prototype.$hapticsVibrate = hapticsVibrate;
const hapticsNotificationSuccess = async () => { const hapticsNotificationSuccess = async () => {
await Haptics.notification({ type: NotificationType.Success }); await Haptics.notification({ type: NotificationType.Success })
}; }
Vue.prototype.$hapticsNotificationSuccess = hapticsNotificationSuccess Vue.prototype.$hapticsNotificationSuccess = hapticsNotificationSuccess
const hapticsNotificationWarning = async () => { const hapticsNotificationWarning = async () => {
await Haptics.notification({ type: NotificationType.Warning }); await Haptics.notification({ type: NotificationType.Warning })
}; }
Vue.prototype.$hapticsNotificationWarning = hapticsNotificationWarning Vue.prototype.$hapticsNotificationWarning = hapticsNotificationWarning
const hapticsNotificationError = async () => { const hapticsNotificationError = async () => {
await Haptics.notification({ type: NotificationType.Error }); await Haptics.notification({ type: NotificationType.Error })
}; }
Vue.prototype.$hapticsNotificationError = hapticsNotificationError Vue.prototype.$hapticsNotificationError = hapticsNotificationError
const hapticsSelectionStart = async () => { const hapticsSelectionStart = async () => {
await Haptics.selectionStart(); await Haptics.selectionStart()
}; }
Vue.prototype.$hapticsSelectionStart = hapticsSelectionStart Vue.prototype.$hapticsSelectionStart = hapticsSelectionStart
const hapticsSelectionChanged = async () => { const hapticsSelectionChanged = async () => {
await Haptics.selectionChanged(); await Haptics.selectionChanged()
}; }
Vue.prototype.$hapticsSelectionChanged = hapticsSelectionChanged Vue.prototype.$hapticsSelectionChanged = hapticsSelectionChanged
const hapticsSelectionEnd = async () => { const hapticsSelectionEnd = async () => {
await Haptics.selectionEnd(); await Haptics.selectionEnd()
}; }
Vue.prototype.$hapticsSelectionEnd = hapticsSelectionEnd Vue.prototype.$hapticsSelectionEnd = hapticsSelectionEnd