style: auto-fix linting issues

This commit is contained in:
edidealt 2026-03-22 19:13:04 +00:00 committed by github-actions[bot]
parent 8cc1c0dfe5
commit 6ed58333e7
8 changed files with 172 additions and 161 deletions

View file

@ -2913,7 +2913,6 @@ document.addEventListener('DOMContentLoaded', async () => {
headerAccountIcon.style.display = 'block';
});
}
});
function showUpdateNotification(updateCallback) {

View file

@ -553,7 +553,10 @@ export function initializePlayerEvents(player, audioPlayer, scrobbler, ui) {
setupMediaListeners(player.video);
}
playPauseBtn.addEventListener('click', () => { hapticMedium(); player.handlePlayPause(); });
playPauseBtn.addEventListener('click', () => {
hapticMedium();
player.handlePlayPause();
});
nextBtn.addEventListener('click', () => {
hapticMedium();
trackSkipTrack(player.currentTrack, 'next');

View file

@ -6,11 +6,13 @@ let _ImpactStyle = null;
let _NotificationStyle = null;
// Single stored promise — subsequent calls reuse the same one
const _ready = import('@capacitor/haptics').then((mod) => {
const _ready = import('@capacitor/haptics')
.then((mod) => {
_Haptics = mod.Haptics;
_ImpactStyle = mod.ImpactStyle;
_NotificationStyle = mod.NotificationStyle;
}).catch(() => {
})
.catch(() => {
// Not in Capacitor or haptics not available — fall back to navigator.vibrate
});
@ -22,7 +24,10 @@ function vibrateFallback(ms) {
export async function hapticLight() {
await _ready;
try {
if (_Haptics) { await _Haptics.impact({ style: _ImpactStyle.Light }); return; }
if (_Haptics) {
await _Haptics.impact({ style: _ImpactStyle.Light });
return;
}
} catch {}
vibrateFallback(30);
}
@ -31,7 +36,10 @@ export async function hapticLight() {
export async function hapticMedium() {
await _ready;
try {
if (_Haptics) { await _Haptics.impact({ style: _ImpactStyle.Medium }); return; }
if (_Haptics) {
await _Haptics.impact({ style: _ImpactStyle.Medium });
return;
}
} catch {}
vibrateFallback(50);
}
@ -40,7 +48,10 @@ export async function hapticMedium() {
export async function hapticSuccess() {
await _ready;
try {
if (_Haptics) { await _Haptics.notification({ type: _NotificationStyle.Success }); return; }
if (_Haptics) {
await _Haptics.notification({ type: _NotificationStyle.Success });
return;
}
} catch {}
vibrateFallback(40);
}
@ -49,7 +60,10 @@ export async function hapticSuccess() {
export async function hapticLongPress() {
await _ready;
try {
if (_Haptics) { await _Haptics.impact({ style: _ImpactStyle.Medium }); return; }
if (_Haptics) {
await _Haptics.impact({ style: _ImpactStyle.Medium });
return;
}
} catch {}
vibrateFallback(50);
}

View file

@ -4,9 +4,7 @@
"description": "A minimalist music streaming application",
"start_url": "./",
"display": "standalone",
"display_override": [
"window-controls-overlay"
],
"display_override": ["window-controls-overlay"],
"background_color": "#000000",
"theme_color": "#000000",
"orientation": "portrait-primary",
@ -54,10 +52,7 @@
"purpose": "any maskable"
}
],
"categories": [
"music",
"entertainment"
],
"categories": ["music", "entertainment"],
"shortcuts": [
{
"name": "Search",