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'; headerAccountIcon.style.display = 'block';
}); });
} }
}); });
function showUpdateNotification(updateCallback) { function showUpdateNotification(updateCallback) {

View file

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

View file

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

View file

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