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

@ -1,15 +1,15 @@
import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: 'tf.monochrome.music',
appName: 'monochrome',
webDir: 'dist',
assets: {
iconBackgroundColor: '#000000',
iconBackgroundColorDark: '#000000',
splashBackgroundColor: '#000000',
splashBackgroundColorDark: '#000000',
},
appId: 'tf.monochrome.music',
appName: 'monochrome',
webDir: 'dist',
assets: {
iconBackgroundColor: '#000000',
iconBackgroundColorDark: '#000000',
splashBackgroundColor: '#000000',
splashBackgroundColorDark: '#000000',
},
};
export default config;

View file

@ -1,14 +1,14 @@
{
"images": [
{
"idiom": "universal",
"size": "1024x1024",
"filename": "AppIcon-512@2x.png",
"platform": "ios"
"images": [
{
"idiom": "universal",
"size": "1024x1024",
"filename": "AppIcon-512@2x.png",
"platform": "ios"
}
],
"info": {
"author": "xcode",
"version": 1
}
],
"info": {
"author": "xcode",
"version": 1
}
}
}

View file

@ -1,6 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
"info": {
"version": 1,
"author": "xcode"
}
}

View file

@ -1,56 +1,56 @@
{
"images": [
{
"idiom": "universal",
"filename": "Default@1x~universal~anyany.png",
"scale": "1x"
},
{
"idiom": "universal",
"filename": "Default@2x~universal~anyany.png",
"scale": "2x"
},
{
"idiom": "universal",
"filename": "Default@3x~universal~anyany.png",
"scale": "3x"
},
{
"appearances": [
"images": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "1x",
"filename": "Default@1x~universal~anyany-dark.png"
},
{
"appearances": [
"idiom": "universal",
"filename": "Default@1x~universal~anyany.png",
"scale": "1x"
},
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "2x",
"filename": "Default@2x~universal~anyany-dark.png"
},
{
"appearances": [
"idiom": "universal",
"filename": "Default@2x~universal~anyany.png",
"scale": "2x"
},
{
"appearance": "luminosity",
"value": "dark"
"idiom": "universal",
"filename": "Default@3x~universal~anyany.png",
"scale": "3x"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "1x",
"filename": "Default@1x~universal~anyany-dark.png"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "2x",
"filename": "Default@2x~universal~anyany-dark.png"
},
{
"appearances": [
{
"appearance": "luminosity",
"value": "dark"
}
],
"idiom": "universal",
"scale": "3x",
"filename": "Default@3x~universal~anyany-dark.png"
}
],
"idiom": "universal",
"scale": "3x",
"filename": "Default@3x~universal~anyany-dark.png"
],
"info": {
"version": 1,
"author": "xcode"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
}

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,13 +6,15 @@ let _ImpactStyle = null;
let _NotificationStyle = null;
// Single stored promise — subsequent calls reuse the same one
const _ready = import('@capacitor/haptics').then((mod) => {
_Haptics = mod.Haptics;
_ImpactStyle = mod.ImpactStyle;
_NotificationStyle = mod.NotificationStyle;
}).catch(() => {
// Not in Capacitor or haptics not available — fall back to navigator.vibrate
});
const _ready = import('@capacitor/haptics')
.then((mod) => {
_Haptics = mod.Haptics;
_ImpactStyle = mod.ImpactStyle;
_NotificationStyle = mod.NotificationStyle;
})
.catch(() => {
// Not in Capacitor or haptics not available — fall back to navigator.vibrate
});
function vibrateFallback(ms) {
if (navigator.vibrate) navigator.vibrate(ms);
@ -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

@ -1,76 +1,71 @@
{
"name": "Monochrome Music",
"short_name": "Monochrome",
"description": "A minimalist music streaming application",
"start_url": "./",
"display": "standalone",
"display_override": [
"window-controls-overlay"
],
"background_color": "#000000",
"theme_color": "#000000",
"orientation": "portrait-primary",
"icons": [
{
"src": "assets/icons/icon-48.webp",
"type": "image/png",
"sizes": "48x48",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-72.webp",
"type": "image/png",
"sizes": "72x72",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-96.webp",
"type": "image/png",
"sizes": "96x96",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-128.webp",
"type": "image/png",
"sizes": "128x128",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-192.webp",
"type": "image/png",
"sizes": "192x192",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-256.webp",
"type": "image/png",
"sizes": "256x256",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-512.webp",
"type": "image/png",
"sizes": "512x512",
"purpose": "any maskable"
}
],
"categories": [
"music",
"entertainment"
],
"shortcuts": [
{
"name": "Search",
"short_name": "Search",
"description": "Search for music",
"url": "./#search",
"icons": [
"name": "Monochrome Music",
"short_name": "Monochrome",
"description": "A minimalist music streaming application",
"start_url": "./",
"display": "standalone",
"display_override": ["window-controls-overlay"],
"background_color": "#000000",
"theme_color": "#000000",
"orientation": "portrait-primary",
"icons": [
{
"src": "assets/96.png",
"sizes": "96x96",
"type": "image/png"
"src": "assets/icons/icon-48.webp",
"type": "image/png",
"sizes": "48x48",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-72.webp",
"type": "image/png",
"sizes": "72x72",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-96.webp",
"type": "image/png",
"sizes": "96x96",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-128.webp",
"type": "image/png",
"sizes": "128x128",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-192.webp",
"type": "image/png",
"sizes": "192x192",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-256.webp",
"type": "image/png",
"sizes": "256x256",
"purpose": "any maskable"
},
{
"src": "assets/icons/icon-512.webp",
"type": "image/png",
"sizes": "512x512",
"purpose": "any maskable"
}
]
}
]
],
"categories": ["music", "entertainment"],
"shortcuts": [
{
"name": "Search",
"short_name": "Search",
"description": "Search for music",
"url": "./#search",
"icons": [
{
"src": "assets/96.png",
"sizes": "96x96",
"type": "image/png"
}
]
}
]
}