style: auto-fix linting issues
This commit is contained in:
parent
c34d3a7db6
commit
575e4590bc
5 changed files with 2770 additions and 1955 deletions
4667
index.html
4667
index.html
File diff suppressed because one or more lines are too long
19
js/events.js
19
js/events.js
|
|
@ -808,9 +808,10 @@ export async function handleTrackAction(
|
|||
return `
|
||||
<div class="modal-option ${alreadyContains ? 'already-contains' : ''}" data-id="${p.id}">
|
||||
<span>${p.name}</span>
|
||||
${alreadyContains
|
||||
? `<button class="remove-from-playlist-btn-modal" title="Remove from playlist" style="background: transparent; border: none; color: inherit; cursor: pointer; padding: 4px; display: flex; align-items: center;">${SVG_BIN}</button>`
|
||||
: ''
|
||||
${
|
||||
alreadyContains
|
||||
? `<button class="remove-from-playlist-btn-modal" title="Remove from playlist" style="background: transparent; border: none; color: inherit; cursor: pointer; padding: 4px; display: flex; align-items: center;">${SVG_BIN}</button>`
|
||||
: ''
|
||||
}
|
||||
</div>
|
||||
`;
|
||||
|
|
@ -1108,12 +1109,12 @@ export function initializeTrackInteractions(player, api, mainContent, contextMen
|
|||
const type = card.dataset.albumId
|
||||
? 'album'
|
||||
: card.dataset.playlistId
|
||||
? 'playlist'
|
||||
: card.dataset.mixId
|
||||
? 'mix'
|
||||
: card.dataset.href
|
||||
? card.dataset.href.split('/')[1]
|
||||
: 'item';
|
||||
? 'playlist'
|
||||
: card.dataset.mixId
|
||||
? 'mix'
|
||||
: card.dataset.href
|
||||
? card.dataset.href.split('/')[1]
|
||||
: 'item';
|
||||
const id = card.dataset.albumId || card.dataset.playlistId || card.dataset.mixId;
|
||||
|
||||
const item = trackDataStore.get(card) || {
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ export class Player {
|
|||
// Warm connection/cache
|
||||
// For Blob URLs (DASH), this head request is not needed and can cause errors.
|
||||
if (!streamUrl.startsWith('blob:')) {
|
||||
fetch(streamUrl, { method: 'HEAD', signal: this.preloadAbortController.signal }).catch(() => { });
|
||||
fetch(streamUrl, { method: 'HEAD', signal: this.preloadAbortController.signal }).catch(() => {});
|
||||
}
|
||||
} catch (error) {
|
||||
if (error.name !== 'AbortError') {
|
||||
|
|
|
|||
25
js/ui.js
25
js/ui.js
|
|
@ -1533,10 +1533,10 @@ export class UIRenderer {
|
|||
dateDisplay =
|
||||
window.innerWidth > 768
|
||||
? releaseDate.toLocaleDateString('en-US', {
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
})
|
||||
year: 'numeric',
|
||||
month: 'long',
|
||||
day: 'numeric',
|
||||
})
|
||||
: year;
|
||||
}
|
||||
}
|
||||
|
|
@ -2268,9 +2268,9 @@ export class UIRenderer {
|
|||
<span>${artist.popularity}% popularity</span>
|
||||
<div class="artist-tags">
|
||||
${(artist.artistRoles || [])
|
||||
.filter((role) => role.category)
|
||||
.map((role) => `<span class="artist-tag">${role.category}</span>`)
|
||||
.join('')}
|
||||
.filter((role) => role.category)
|
||||
.map((role) => `<span class="artist-tag">${role.category}</span>`)
|
||||
.join('')}
|
||||
</div>
|
||||
`;
|
||||
|
||||
|
|
@ -2865,9 +2865,10 @@ export class UIRenderer {
|
|||
return;
|
||||
}
|
||||
|
||||
historyEl.innerHTML = history
|
||||
.map(
|
||||
(query) => `
|
||||
historyEl.innerHTML =
|
||||
history
|
||||
.map(
|
||||
(query) => `
|
||||
<div class="search-history-item" data-query="${escapeHtml(query)}">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="history-icon">
|
||||
<circle cx="12" cy="12" r="10"></circle>
|
||||
|
|
@ -2879,8 +2880,8 @@ export class UIRenderer {
|
|||
</span>
|
||||
</div>
|
||||
`
|
||||
)
|
||||
.join('') +
|
||||
)
|
||||
.join('') +
|
||||
`
|
||||
<div class="search-history-clear-all" id="clear-search-history">
|
||||
Clear all history
|
||||
|
|
|
|||
12
styles.css
12
styles.css
|
|
@ -650,8 +650,8 @@ body.has-page-background .track-item:hover {
|
|||
background: var(--secondary);
|
||||
}
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button {
|
||||
-webkit-appearance: none;
|
||||
input[type='search']::-webkit-search-cancel-button {
|
||||
appearance: none;
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
|
@ -719,7 +719,6 @@ input[type="search"]::-webkit-search-cancel-button {
|
|||
}
|
||||
|
||||
@keyframes pulse {
|
||||
|
||||
0%,
|
||||
100% {
|
||||
opacity: 1;
|
||||
|
|
@ -1038,7 +1037,6 @@ input[type="search"]::-webkit-search-cancel-button {
|
|||
}
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
|
||||
#home-recommended-songs,
|
||||
#artist-detail-tracks,
|
||||
#playlist-detail-recommended {
|
||||
|
|
@ -1638,11 +1636,11 @@ input[type="search"]::-webkit-search-cancel-button {
|
|||
border-radius: 50%;
|
||||
}
|
||||
|
||||
input:checked+.slider {
|
||||
input:checked + .slider {
|
||||
background-color: var(--primary);
|
||||
}
|
||||
|
||||
input:checked+.slider::before {
|
||||
input:checked + .slider::before {
|
||||
transform: translateX(16px);
|
||||
background-color: var(--primary-foreground);
|
||||
}
|
||||
|
|
@ -4793,4 +4791,4 @@ body:has(#side-panel.active) #close-fullscreen-cover-btn {
|
|||
width: 25px;
|
||||
height: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue