mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-02 00:54:30 +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
|
@ -59,8 +59,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { Haptics, ImpactStyle } from '@capacitor/haptics';
|
||||
|
||||
export default {
|
||||
props: {
|
||||
value: Boolean,
|
||||
|
@ -92,36 +90,36 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
async clickedChapterOption() {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
await this.$hapticsImpactMedium()
|
||||
this.show = false
|
||||
this.$nextTick(() => this.$emit('change', { time: this.currentEndOfChapterTime * 1000, isChapterTime: true }))
|
||||
},
|
||||
async clickedOption(timeoutMin) {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
await this.$hapticsImpactMedium()
|
||||
var timeout = timeoutMin * 1000 * 60
|
||||
this.show = false
|
||||
this.manualTimerModal = false
|
||||
this.$nextTick(() => this.$emit('change', { time: timeout, isChapterTime: false }))
|
||||
},
|
||||
async cancelSleepTimer() {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
await this.$hapticsImpactMedium()
|
||||
this.$emit('cancel')
|
||||
this.show = false
|
||||
},
|
||||
async increaseSleepTime() {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
await this.$hapticsImpactMedium()
|
||||
this.$emit('increase')
|
||||
},
|
||||
async decreaseSleepTime() {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
await this.$hapticsImpactMedium()
|
||||
this.$emit('decrease')
|
||||
},
|
||||
async increaseManualTimeout() {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
await this.$hapticsImpactMedium()
|
||||
this.manualTimeoutMin++
|
||||
},
|
||||
async decreaseManualTimeout() {
|
||||
await Haptics.impact({ style: ImpactStyle.Medium });
|
||||
await this.$hapticsImpactMedium()
|
||||
if (this.manualTimeoutMin > 1) this.manualTimeoutMin--
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue