adjust haptics

This commit is contained in:
Tom Fong 2023-07-01 11:39:11 +08:00
parent 57577d257d
commit 0fd54cf17f
9 changed files with 9 additions and 9 deletions

View file

@ -237,7 +237,7 @@ export class QrCodePage {
async tapHaptic() { async tapHaptic() {
if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') { if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') {
await Haptics.impact({ style: ImpactStyle.Medium }) await Haptics.impact({ style: ImpactStyle.Light })
.catch(async err => { .catch(async err => {
if (this.env.debugMode === 'on') { if (this.env.debugMode === 'on') {
await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" }) await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" })

View file

@ -443,7 +443,7 @@ export class GeneratePage {
async tapHaptic() { async tapHaptic() {
if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') { if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') {
await Haptics.impact({ style: ImpactStyle.Medium }) await Haptics.impact({ style: ImpactStyle.Light })
.catch(async err => { .catch(async err => {
if (this.env.debugMode === 'on') { if (this.env.debugMode === 'on') {
await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" }) await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" })

View file

@ -505,7 +505,7 @@ export class HistoryPage {
async tapHaptic() { async tapHaptic() {
if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') { if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') {
await Haptics.impact({ style: ImpactStyle.Medium }) await Haptics.impact({ style: ImpactStyle.Light })
.catch(async err => { .catch(async err => {
if (this.env.debugMode === 'on') { if (this.env.debugMode === 'on') {
await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" }) await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" })

View file

@ -196,7 +196,7 @@ export class ImportImagePage {
async tapHaptic() { async tapHaptic() {
if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') { if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') {
await Haptics.impact({ style: ImpactStyle.Medium }) await Haptics.impact({ style: ImpactStyle.Light })
.catch(async err => { .catch(async err => {
if (this.env.debugMode === 'on') { if (this.env.debugMode === 'on') {
await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" }) await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" })

View file

@ -1031,7 +1031,7 @@ export class ResultPage {
async tapHaptic() { async tapHaptic() {
if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') { if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') {
await Haptics.impact({ style: ImpactStyle.Medium }) await Haptics.impact({ style: ImpactStyle.Light })
.catch(async err => { .catch(async err => {
if (this.env.debugMode === 'on') { if (this.env.debugMode === 'on') {
await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" }) await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" })

View file

@ -205,7 +205,7 @@ export class ScanPage {
async tapHaptic() { async tapHaptic() {
if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') { if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') {
await Haptics.impact({ style: ImpactStyle.Medium }) await Haptics.impact({ style: ImpactStyle.Light })
.catch(async err => { .catch(async err => {
if (this.env.debugMode === 'on') { if (this.env.debugMode === 'on') {
await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" }) await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" })

View file

@ -27,7 +27,7 @@ export class SettingAutoBrightnessPage {
async tapHaptic() { async tapHaptic() {
if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') { if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') {
await Haptics.impact({ style: ImpactStyle.Medium }) await Haptics.impact({ style: ImpactStyle.Light })
.catch(async err => { .catch(async err => {
if (this.env.debugMode === 'on') { if (this.env.debugMode === 'on') {
await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" }) await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" })

View file

@ -126,7 +126,7 @@ export class SettingQrPage {
async tapHaptic() { async tapHaptic() {
if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') { if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') {
await Haptics.impact({ style: ImpactStyle.Medium }) await Haptics.impact({ style: ImpactStyle.Light })
.catch(async err => { .catch(async err => {
if (this.env.debugMode === 'on') { if (this.env.debugMode === 'on') {
await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" }) await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" })

View file

@ -137,7 +137,7 @@ export class TabsPage {
async tapHaptic() { async tapHaptic() {
if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') { if (this.env.vibration === 'on' || this.env.vibration === 'on-haptic') {
await Haptics.impact({ style: ImpactStyle.Medium }) await Haptics.impact({ style: ImpactStyle.Light })
.catch(async err => { .catch(async err => {
if (this.env.debugMode === 'on') { if (this.env.debugMode === 'on') {
await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" }) await Toast.show({ text: 'Err when Haptics.impact: ' + JSON.stringify(err), position: "top", duration: "long" })