Compare commits
2 Commits
d488531358
...
0f240596cc
| Author | SHA1 | Date | |
|---|---|---|---|
|
0f240596cc
|
|||
|
6fc3e1c057
|
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-nonograms-solid",
|
"name": "vue-nonograms-solid",
|
||||||
"version": "1.15.8",
|
"version": "1.15.9",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "vue-nonograms-solid",
|
"name": "vue-nonograms-solid",
|
||||||
"version": "1.15.8",
|
"version": "1.15.9",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@capacitor/android": "^8.1.0",
|
"@capacitor/android": "^8.1.0",
|
||||||
"@capacitor/cli": "^8.1.0",
|
"@capacitor/cli": "^8.1.0",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vue-nonograms-solid",
|
"name": "vue-nonograms-solid",
|
||||||
"version": "1.15.8",
|
"version": "1.15.9",
|
||||||
"homepage": "https://nonograms.7u.pl/",
|
"homepage": "https://nonograms.7u.pl/",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@@ -36,10 +36,14 @@ const handleKeyDown = (e) => {
|
|||||||
|
|
||||||
const triggerVibration = () => {
|
const triggerVibration = () => {
|
||||||
if (!('vibrate' in navigator)) return;
|
if (!('vibrate' in navigator)) return;
|
||||||
|
try {
|
||||||
const isCoarse = window.matchMedia?.('(pointer: coarse)')?.matches;
|
const isCoarse = window.matchMedia?.('(pointer: coarse)')?.matches;
|
||||||
const isTouch = navigator.maxTouchPoints && navigator.maxTouchPoints > 0;
|
const isTouch = navigator.maxTouchPoints && navigator.maxTouchPoints > 0;
|
||||||
if (isCoarse || isTouch) {
|
if (isCoarse || isTouch) {
|
||||||
navigator.vibrate([80, 40, 120, 40, 180]);
|
navigator.vibrate([200, 100, 200, 100, 200]);
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('Vibration failed:', e);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user