Added lirycs
Build and Publish / Build and Publish Docker Image (push) Failing after 25s

This commit is contained in:
ab committed 2026-11-23 01:45:22 +02:00
1 parent eefe8a9777
commit beea7c1c0a
37 files changed
+1779 -34

No files matched your search

+7
View File
@@ -1,4 +1,11 @@
<style>
.lyrics-editor {grid-column:1 / -1;gap:12px}
.lyrics-editor-version {border:1px solid var(--border-color);border-radius:10px;padding:16px;margin:12px 0;display:grid;gap:12px}
.lyrics-editor-version label {display:grid;gap:6px}
.lyrics-editor label:has(input[type=checkbox]) {display:flex;align-items:center;gap:8px}
.lyrics-editor input[type=checkbox] {width:18px;height:18px;min-height:18px;flex:0 0 18px;padding:0;margin:0;accent-color:var(--accent)}
.lyrics-editor-head {display:flex;align-items:center;justify-content:space-between;gap:12px}
.lyrics-editor-version textarea {width:100%;resize:vertical;min-height:100px;font-family:inherit;font-weight:400;line-height:1.5;text-transform:none}
:root {
--bg-primary: #121212;
--bg-secondary: #181818;
+37 -2
View File
@@ -1031,6 +1031,14 @@
</div>
</section>
<section class="panel settings-section" id="settings-lyrics">
<div class="panel-head"><div class="panel-title"><strong>Lyrics · LRCLIB</strong><span>Automatic library enrichment</span></div></div>
<div class="setting-toggle">
<label class="setting-toggle-row"><span>Fetch lyrics automatically</span><input type="checkbox" x-model="settingsDraft.lyrics_enrichment_enabled" /></label>
<div class="setting-help">Requests to the external LRCLIB API reveal track metadata from this library. Disabling stops automatic requests; saved lyrics remain available.</div>
<span class="source-pill" :class="sourceClass('lyrics_enrichment_enabled')" x-text="settingSource('lyrics_enrichment_enabled')"></span>
</div>
</section>
<section class="panel settings-section settings-developer" id="settings-developer">
<div class="panel-head">
<div class="panel-title">
@@ -1695,6 +1703,22 @@
</div>
<div class="editor-grid" x-show="isTrackEditor()">
<section class="field lyrics-editor" x-show="isTrackEditor()">
<label>Lyrics</label>
<p class="muted">Stored with this audio content. Plain text or LRC timestamps; saved locally only.</p>
<template x-for="(version,index) in editorLyrics" :key="version.id">
<div class="lyrics-editor-version">
<div class="lyrics-editor-head"><strong x-text="version.source === 'lrclib' ? 'LRCLIB · ' + (version.source_id || '') : 'Manual version'"></strong><button class="btn danger" type="button" @click="editorLyrics.splice(index,1)">Remove</button></div>
<label>Version label<input x-model="version.label" maxlength="512" /></label>
<label>Language (optional)<input x-model="version.language" maxlength="64" placeholder="en, ru, …" /></label>
<label><input type="checkbox" x-model="version.instrumental" @change="if(version.instrumental){version.plain_text='';version.synced_lrc='';}" /> Instrumental</label>
<label x-show="!version.instrumental">Plain text<textarea x-model="version.plain_text" rows="7" maxlength="262144"></textarea></label>
<label x-show="!version.instrumental">Synced text (LRC)<textarea x-model="version.synced_lrc" rows="7" maxlength="262144" placeholder="[00:12.50] A line of lyrics"></textarea></label>
</div>
</template>
<button class="btn" type="button" @click="addLyricsVersion()" :disabled="editorLyrics.length>=16">Add version</button>
<label><input type="checkbox" x-model="editorLyricsRetry" /> Retry LRCLIB lookup on the next run (when enrichment is enabled)</label>
</section>
<div class="field">
<label>Track #</label>
<input type="number" min="1" max="9999" x-model="editorDraft.track_number" />
@@ -2118,6 +2142,8 @@ function adminV2() {
releaseTrackSearchLoading: false,
releaseTrackSearchToken: 0,
editorDetail: null,
editorLyrics: [],
editorLyricsRetry: false,
editorDraft: { title: '', hidden: 'false', release_type: 'album', year: '', release_id: null, track_number: '', disc_number: '', artist_ids: [], release_tracks: [] },
mergeOpen: false,
mergeLoading: false,
@@ -2158,6 +2184,7 @@ function adminV2() {
swagger_enabled: false,
lastfm_api_key: '',
lastfm_shared_secret: '',
lyrics_enrichment_enabled: true,
agent_enabled: false,
agent_inbox_dir: '',
agent_storage_dir: '',
@@ -3470,6 +3497,8 @@ function adminV2() {
const detail = await this.request(`${this.apiBase}/library/item/detail?${params.toString()}`);
if (!this.activeLibraryItem || `${this.activeLibraryItem.kind}:${this.activeLibraryItem.id}` !== key) return;
this.editorDetail = detail;
this.editorLyrics = (detail.lyrics?.versions || []).map(v=>({...v}));
this.editorLyricsRetry = false;
this.editorDraft = {
title: detail.title || '',
hidden: detail.hidden ? 'true' : 'false',
@@ -4178,6 +4207,11 @@ function adminV2() {
}
},
addLyricsVersion() {
if(this.editorLyrics.length >= 16) return;
const id=globalThis.crypto?.randomUUID?.() || Date.now().toString(36)+'-'+Math.random().toString(36).slice(2);
this.editorLyrics.push({id:'manual:' + id,label:'Original',source:'manual',source_id:null,language:null,plain_text:'',synced_lrc:'',instrumental:false});
},
async saveLibraryItem() {
if (this.isTrackEditor() && String(this.editorReleaseToAdd || '').trim()) {
if (!this.selectEditorRelease()) {
@@ -4202,13 +4236,14 @@ function adminV2() {
track_number: this.editorDraft.track_number || '',
disc_number: this.editorDraft.disc_number || '',
artist_ids: this.editorDraft.artist_ids || [],
release_tracks: this.isReleaseEditor() ? this.releaseTrackPayload() : null
release_tracks: this.isReleaseEditor() ? this.releaseTrackPayload() : null,
lyrics: this.isTrackEditor() ? {versions:this.editorLyrics.map(v=>({...v,plain_text:v.plain_text?.trim()?v.plain_text:null,synced_lrc:v.synced_lrc?.trim()?v.synced_lrc:null})),retry_lookup:this.editorLyricsRetry} : null
})
});
this.replaceLibraryItem(updated);
this.activeLibraryItem = updated;
if (this.editorDetail) this.editorDetail.item = updated;
if (this.isReleaseEditor()) await this.loadEditorDetail(updated);
if (this.isReleaseEditor() || this.isTrackEditor()) await this.loadEditorDetail(updated);
this.showToast(wasNewRelease ? 'Release created' : 'Saved');
await this.refreshCountsOnly();
} catch (error) {
+2
View File
@@ -10,6 +10,8 @@
{% block body %}
{% include "player/shell.html" %}
{% include "player/modals.html" %}
{% include "player/lyrics_modal.html" %}
{% include "player/podcast_scripts.html" %}
{% include "player/lyrics_scripts.html" %}
{% include "player/scripts.html" %}
{% endblock body %}
+45
View File
@@ -0,0 +1,45 @@
<div x-data>
<template x-if="$store.lyrics.visible">
<div class="lyrics-overlay" :class="{'lyrics-fullscreen':$store.lyrics.follow}" @click.self="$store.lyrics.close()">
<section class="lyrics-dialog" role="dialog" aria-modal="true" aria-labelledby="lyrics-title" tabindex="-1"
x-init="$nextTick(()=>$el.focus())" @keydown.escape.stop.prevent="$store.lyrics.close()" @keydown="$store.lyrics.trap($event,$el)"
x-effect="$store.lyrics.tick($store.player.currentTrack,$store.player.currentTime)">
<header class="lyrics-header">
<div class="lyrics-heading"><small x-text="$store.lyrics.follow?$store.lyrics.text('following'):$store.lyrics.text('preview')"></small>
<h2 id="lyrics-title" x-text="$store.lyrics.track?.title || $store.lyrics.text('lyrics')"></h2>
<p x-text="($store.lyrics.track?.artists || []).map(a=>a.name || a.label).join(', ')"></p>
</div>
<button class="lyrics-close" type="button" @click="$store.lyrics.close()" :aria-label="$store.lyrics.text('close')">✕</button>
</header>
<div class="lyrics-version" x-show="$store.lyrics.versions.length>1">
<label for="lyrics-version" x-text="$store.lyrics.text('version')"></label>
<select id="lyrics-version" :value="$store.lyrics.selected" @change="$store.lyrics.choose($event.target.value)">
<template x-for="(version,index) in $store.lyrics.versions" :key="version.id"><option :value="index" x-text="version.label + (version.language?' · '+version.language:'')"></option></template>
</select>
</div>
<div class="lyrics-scroll" @wheel.passive="$store.lyrics.holdUntil=Date.now()+5000" @touchstart.passive="$store.lyrics.holdUntil=Date.now()+5000">
<p class="lyrics-message" x-show="$store.lyrics.loading" role="status" x-text="$store.lyrics.text('loading')"></p>
<div class="lyrics-message" x-show="$store.lyrics.error"><p x-text="$store.lyrics.text('error')"></p><button @click="$store.lyrics.load($store.lyrics.track)" x-text="$store.lyrics.text('retry')"></button></div>
<p class="lyrics-message" x-show="!$store.lyrics.loading && !$store.lyrics.error && !$store.lyrics.versions.length" x-text="$store.lyrics.text('missing')"></p>
<p class="lyrics-message" x-show="$store.lyrics.currentVersion()?.instrumental" x-text="$store.lyrics.text('instrumental')"></p>
<div class="lyrics-lines" x-show="$store.lyrics.lines.length>0">
<template x-for="(line,index) in $store.lyrics.lines" :key="index">
<button class="lyrics-line" :data-lyrics-line="index" :class="{active:index===$store.lyrics.active,past:index<$store.lyrics.active}"
:disabled="!$store.lyrics.sameTrack($store.player.currentTrack)" @click="$store.lyrics.seek(line)" x-text="line.text || '♪'"></button>
</template>
</div>
<pre class="lyrics-plain" x-show="!$store.lyrics.lines.length && !$store.lyrics.currentVersion()?.instrumental" x-text="$store.lyrics.plain()"></pre>
</div>
<footer class="lyrics-footer">
<small x-text="$store.lyrics.currentVersion()?.source==='lrclib'?'LRCLIB':$store.lyrics.currentVersion()?.label || ''"></small>
<div class="lyrics-transport" x-show="$store.lyrics.follow">
<button @click="$store.player.prev()" :aria-label="$store.lyrics.text('previous')">⏮</button>
<button @click="$store.player.toggle()" :aria-label="$store.lyrics.text('play')" x-text="$store.player.isPlaying?'Ⅱ':'▶'"></button>
<button @click="$store.player.next()" :aria-label="$store.lyrics.text('next')">⏭</button>
</div>
<button x-show="$store.lyrics.lines.length && $store.lyrics.active>=0" @click="$store.lyrics.scroll(true)" x-text="$store.lyrics.text('resume')"></button>
</footer>
</section>
</div>
</template>
</div>
+115
View File
@@ -0,0 +1,115 @@
<script>
document.addEventListener('alpine:init', () => {
Alpine.store('lyrics', {
visible:false, follow:false, track:null, versions:[], selected:0,
lines:[], active:-1, loading:false, error:false, generation:0,
loadedKey:null, holdUntil:0, previousFocus:null, previousOverflow:'',
text(key) {
const labels={lyrics:['Lyrics','Текст песни'],available:['Available · view','Есть · посмотреть'],unavailable:['Not available','Нет текста'],
loading:['Loading lyrics…','Загрузка текста…'],missing:['No lyrics for this track yet.','Для этого трека текста пока нет.'],
instrumental:['Instrumental','Инструментальная композиция'],error:['Could not load lyrics.','Не удалось загрузить текст.'],
retry:['Retry','Повторить'],close:['Close','Закрыть'],version:['Version','Версия'],following:['Following playback','Следует за воспроизведением'],
preview:['Track lyrics','Просмотр текста'],resume:['Follow lyrics','Следить за текстом'],play:['Play / pause','Играть / пауза'],previous:['Previous track','Предыдущий трек'],next:['Next track','Следующий трек']};
return labels[key]?.[document.documentElement.lang.startsWith('ru')?1:0] || key;
},
key(track) {
if (!track || track.podcast || String(track.id).startsWith('ep1:')) return '';
return track.content_id || track.key?.content_id || track._federationTrack?.key?.content_id || String(track.id || '');
},
open(track,follow=true) {
if (!this.visible) {
this.previousFocus=document.activeElement;
this.previousOverflow=document.body.style.overflow;
document.body.style.overflow='hidden';
}
this.visible=true; this.follow=follow; this.loadedKey=null; this.holdUntil=0;
Alpine.store('info')?.close();
this.load(follow?Alpine.store('player').currentTrack:track);
},
close() {
this.visible=false; this.generation++; this.loadedKey=null;
document.body.style.overflow=this.previousOverflow;
this.previousFocus?.focus?.();
},
async load(track) {
const generation=++this.generation;
this.track=track; this.loadedKey=this.key(track); this.versions=[]; this.lines=[]; this.selected=0;this.active=-1;this.error=false;
if (!this.loadedKey) {this.loading=false;return;}
this.loading=true;
try {
const source=track.availability?.federation?.[0] || track._federationTrack?.availability?.federation?.[0];
const remote=source && (!Number.isInteger(track.id) || track.id<1 || track.federation_pending);
const endpoint=GUEST?`/api/player/shares/${SHARE_TOKEN}/lyrics/${track.id}`:remote
? `/api/player/federation/tracks/lyrics?owner=${encodeURIComponent(source.owner)}&content_id=${encodeURIComponent(this.key(track))}`
: `/api/player/lyrics/${track.id}`;
const response=await fetch(endpoint);
if (!response.ok) throw new Error('lyrics request failed');
const data=await response.json();
if (generation!==this.generation || !this.visible) return;
this.versions=(data?.versions || []).slice().sort((a,b)=>Number(this.parse(b.synced_lrc).length>0)-Number(this.parse(a.synced_lrc).length>0));
// Availability follows current database state, including manual edits.
track.has_lyrics=this.versions.length>0;
this.choose(0);
} catch (_) {if (generation===this.generation) this.error=true;}
finally {if (generation===this.generation) this.loading=false;}
},
parse(value) {
if (!value) return [];
const offset=Number(value.match(/^\s*\[offset:\s*(-?\d+)\s*\]\s*$/mi)?.[1] || 0);
const shift=Math.max(-3600000,Math.min(3600000,offset));
const lines=[];
for (const raw of value.split(/\r?\n/)) {
let rest=raw.trim(), times=[];
while (true) {
const match=rest.match(/^\[(\d{1,4}):(\d{1,2}(?:\.\d+)?)\]/);
if (!match || Number(match[2])>=60 || Number(match[1])>1440) break;
times.push(Math.max(0,Math.round((Number(match[1])*60+Number(match[2]))*1000)+shift));
rest=rest.slice(match[0].length);
}
for (const ms of times) lines.push({ms,text:rest.trim()});
}
return lines.sort((a,b)=>a.ms-b.ms);
},
choose(index) {
this.selected=Number(index); this.lines=this.parse(this.versions[this.selected]?.synced_lrc);this.active=-1;this.holdUntil=0;
this.tick(Alpine.store('player').currentTrack,Alpine.store('player').currentTime);
},
currentVersion() {return this.versions[this.selected] || null;},
plain() {
const version=this.currentVersion();
return version?.plain_text || (this.lines.length?this.lines.map(v=>v.text).join('\n'):version?.synced_lrc || '');
},
sameTrack(track) {return !!this.loadedKey && this.loadedKey===this.key(track);},
tick(track,time) {
if (!this.visible) return;
if (this.follow && this.key(track)!==this.loadedKey) {this.load(track);return;}
if (!this.sameTrack(track) || !this.lines.length) {this.active=-1;return;}
const ms=Number(time || 0)*1000;
let low=0,high=this.lines.length;
while(low<high){const mid=(low+high)>>>1;if(this.lines[mid].ms<=ms)low=mid+1;else high=mid;}
const next=low-1;
if (next!==this.active) {this.active=next;this.scroll();}
},
scroll(force=false) {
if (!force && Date.now()<this.holdUntil) return;
if (force) this.holdUntil=0;
requestAnimationFrame(()=>{
if (!this.visible || this.active<0) return;
const line=document.querySelector(`[data-lyrics-line="${this.active}"]`);
const scroller=line?.closest('.lyrics-scroll');
if (!line || !scroller) return;
scroller.scrollTo({top:line.offsetTop-scroller.clientHeight*0.4,behavior:window.matchMedia('(prefers-reduced-motion: reduce)').matches?'instant':'smooth'});
});
},
seek(line) {const player=Alpine.store('player');if(this.sameTrack(player.currentTrack)){this.holdUntil=0;player.seek(line.ms/1000);}},
trap(event,root) {
if(event.key!=='Tab') return;
const elements=[...root.querySelectorAll('button,select,[tabindex="0"]')].filter(el=>!el.disabled&&el.getClientRects().length);
if(!elements.length){event.preventDefault();return;}
const first=elements[0],last=elements[elements.length-1];
if(event.shiftKey&&(document.activeElement===first||document.activeElement===root)){event.preventDefault();last.focus();}
else if(!event.shiftKey&&document.activeElement===last){event.preventDefault();first.focus();}
},
});
});
</script>
+4 -2
View File
@@ -26,6 +26,7 @@
<tr>
<th x-text="row.label"></th>
<td>
<template x-if="typeof row.run === 'function'"><button class="info-link" type="button" @click="row.run()" x-text="row.value"></button></template>
<template x-if="row.links && row.links.length">
<div class="info-link-list">
<template x-for="link in row.links" :key="link.type + '-' + link.id + '-' + link.label">
@@ -33,7 +34,7 @@
</template>
</div>
</template>
<template x-if="!row.links || !row.links.length">
<template x-if="(!row.links || !row.links.length) && !row.run">
<span x-text="row.value"></span>
</template>
</td>
@@ -1187,7 +1188,8 @@
</div>
<div class="history-date" x-text="$store.history.date(item.played_at)"></div>
<div class="track-actions">
<button class="track-action-btn info-btn popularity-info-btn"
<button class="track-action-btn lyrics-presence" type="button" x-show="item.track.has_lyrics" @click.stop="$store.lyrics.open(item.track,false)" :title="$store.lyrics.text('lyrics')" :aria-label="$store.lyrics.text('lyrics')"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="4" y="3" width="16" height="18" rx="3"/><path d="M8 8h8M8 12h6M8 16h4"/></svg></button>
<button class="track-action-btn info-btn popularity-info-btn"
:class="{ 'has-popularity': $store.library.hasPopularity(item.track), 'no-popularity': !$store.library.hasPopularity(item.track) }"
:style="$store.library.popularityStyle(item.track)"
@click.stop="$store.library.openTrackInfo(item.track)"
+1
View File
@@ -3154,6 +3154,7 @@ document.addEventListener('alpine:init', () => {
openTrackInfo(track) {
const rows = this.trackInfoRows(track).map(row => GUEST && row.links
? {...row, value: row.links.map(link => link.label).join(', '), links: null} : row);
rows.push({label:Alpine.store('lyrics').text('lyrics'), value:track.has_lyrics ? Alpine.store('lyrics').text('available') : Alpine.store('lyrics').text('unavailable'), run:()=>{Alpine.store('info').close();Alpine.store('lyrics').open(track,false);}});
const actions = [{label:T.download, run:() => this.downloadTrack(track)}];
if (!GUEST) actions.push({label:T.findSimilar, run:() => this.searchSimilar(track)});
Alpine.store('info').openRows(T.trackInfoTitle, rows, actions);
+18 -6
View File
@@ -521,7 +521,8 @@
</div>
<span></span>
<div class="track-actions">
<button class="track-action-btn info-btn popularity-info-btn"
<button class="track-action-btn lyrics-presence" type="button" x-show="track.has_lyrics" @click.stop="$store.lyrics.open(track,false)" :title="$store.lyrics.text('lyrics')" :aria-label="$store.lyrics.text('lyrics')"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="4" y="3" width="16" height="18" rx="3"/><path d="M8 8h8M8 12h6M8 16h4"/></svg></button>
<button class="track-action-btn info-btn popularity-info-btn"
:class="{ 'has-popularity': $store.library.hasPopularity(track), 'no-popularity': !$store.library.hasPopularity(track) }"
:style="$store.library.popularityStyle(track)"
@click.stop="$store.library.openTrackInfo(track)"
@@ -894,7 +895,8 @@
</div>
<span></span>
<div class="track-actions">
<button class="track-action-btn info-btn popularity-info-btn"
<button class="track-action-btn lyrics-presence" type="button" x-show="track.has_lyrics" @click.stop="$store.lyrics.open(track,false)" :title="$store.lyrics.text('lyrics')" :aria-label="$store.lyrics.text('lyrics')"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="4" y="3" width="16" height="18" rx="3"/><path d="M8 8h8M8 12h6M8 16h4"/></svg></button>
<button class="track-action-btn info-btn popularity-info-btn"
:class="{ 'has-popularity': $store.library.hasPopularity(track), 'no-popularity': !$store.library.hasPopularity(track) }"
:style="$store.library.popularityStyle(track)"
@click.stop="$store.library.openTrackInfo(track)"
@@ -1123,7 +1125,8 @@
</div>
<span></span>
<div class="track-actions">
<button class="track-action-btn info-btn popularity-info-btn"
<button class="track-action-btn lyrics-presence" type="button" x-show="track.has_lyrics" @click.stop="$store.lyrics.open(track,false)" :title="$store.lyrics.text('lyrics')" :aria-label="$store.lyrics.text('lyrics')"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="4" y="3" width="16" height="18" rx="3"/><path d="M8 8h8M8 12h6M8 16h4"/></svg></button>
<button class="track-action-btn info-btn popularity-info-btn"
:class="{ 'has-popularity': $store.library.hasPopularity(track), 'no-popularity': !$store.library.hasPopularity(track) }"
:style="$store.library.popularityStyle(track)"
@click.stop="$store.library.openTrackInfo(track)"
@@ -1303,7 +1306,8 @@
</div>
<span></span>
<div class="track-actions">
<button class="track-action-btn info-btn popularity-info-btn"
<button class="track-action-btn lyrics-presence" type="button" x-show="track.has_lyrics" @click.stop="$store.lyrics.open(track,false)" :title="$store.lyrics.text('lyrics')" :aria-label="$store.lyrics.text('lyrics')"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="4" y="3" width="16" height="18" rx="3"/><path d="M8 8h8M8 12h6M8 16h4"/></svg></button>
<button class="track-action-btn info-btn popularity-info-btn"
:class="{ 'has-popularity': $store.library.hasPopularity(track), 'no-popularity': !$store.library.hasPopularity(track) }"
:style="$store.library.popularityStyle(track)"
@click.stop="track.federation_pending ? $store.library.openFederationTrackInfo(track._federationTrack) : $store.library.openTrackInfo(track)"
@@ -1470,7 +1474,8 @@
</div>
<span></span>
<div class="track-actions">
<button class="track-action-btn info-btn popularity-info-btn"
<button class="track-action-btn lyrics-presence" type="button" x-show="track.has_lyrics" @click.stop="$store.lyrics.open(track,false)" :title="$store.lyrics.text('lyrics')" :aria-label="$store.lyrics.text('lyrics')"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="4" y="3" width="16" height="18" rx="3"/><path d="M8 8h8M8 12h6M8 16h4"/></svg></button>
<button class="track-action-btn info-btn popularity-info-btn"
:class="{ 'has-popularity': $store.library.hasPopularity(track), 'no-popularity': !$store.library.hasPopularity(track) }"
:style="$store.library.popularityStyle(track)"
@click.stop="track.federation_pending ? $store.library.openFederationTrackInfo(track._federationTrack) : $store.library.openTrackInfo(track)"
@@ -1599,7 +1604,8 @@
</div>
</div>
<div class="queue-track-actions">
<button class="queue-track-remove info-btn popularity-info-btn"
<button class="track-action-btn lyrics-presence" type="button" x-show="item.track.has_lyrics" @click.stop="$store.lyrics.open(item.track,false)" :title="$store.lyrics.text('lyrics')" :aria-label="$store.lyrics.text('lyrics')"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="4" y="3" width="16" height="18" rx="3"/><path d="M8 8h8M8 12h6M8 16h4"/></svg></button>
<button class="queue-track-remove info-btn popularity-info-btn"
:class="{ 'has-popularity': $store.library.hasPopularity(item.track), 'no-popularity': !$store.library.hasPopularity(item.track) }"
:style="$store.library.popularityStyle(item.track)"
@click.stop="item.track.federation_pending ? $store.library.openFederationTrackInfo(item.track._federationTrack) : $store.library.openTrackInfo(item.track)"
@@ -1680,6 +1686,9 @@
<button class="player-btn" :class="{ active: $store.player.shuffle }" @click="$store.player.toggleShuffle()" title="{{ t.player_shuffle }}">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polyline points="16 3 21 3 21 8"/><line x1="4" y1="20" x2="21" y2="3"/><polyline points="21 16 21 21 16 21"/><line x1="15" y1="15" x2="21" y2="21"/><line x1="4" y1="4" x2="9" y2="9"/></svg>
</button>
<button class="player-btn lyrics-toggle lyrics-toggle-mobile" type="button" @click.stop="$store.lyrics.open($store.player.currentTrack,true)" :disabled="!$store.player.currentTrack || !!$store.player.currentTrack.podcast" :title="$store.lyrics.text('lyrics')" :aria-label="$store.lyrics.text('lyrics')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="4" y="3" width="16" height="18" rx="3"/><path d="M8 8h8M8 12h6M8 16h4"/></svg>
</button>
<button class="player-btn player-btn-prev" @click="$store.player.prev()" title="{{ t.player_previous }}">
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M6 6h2v12H6zm3.5 6l8.5 6V6z"/></svg>
</button>
@@ -1724,6 +1733,9 @@
</div>
<div class="player-right">
<button class="player-btn lyrics-toggle" type="button" @click.stop="$store.lyrics.open($store.player.currentTrack,true)" :disabled="!$store.player.currentTrack || !!$store.player.currentTrack.podcast" :title="$store.lyrics.text('lyrics')" :aria-label="$store.lyrics.text('lyrics')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" aria-hidden="true"><rect x="4" y="3" width="16" height="18" rx="3"/><path d="M8 8h8M8 12h6M8 16h4"/></svg>
</button>
<div class="volume-control">
<button class="volume-btn" @click="$store.player.toggleMute()">
<template x-if="$store.player.volume === 0">
+44
View File
@@ -1,4 +1,48 @@
<style>
.lyrics-overlay {position:fixed;inset:0;z-index:1600;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.7);padding:24px;backdrop-filter:blur(14px)}
.lyrics-dialog {position:relative;display:flex;flex-direction:column;width:min(800px,100%);height:min(820px,90dvh);border-radius:20px;background:linear-gradient(155deg,#294943,#132a28 65%,#0d1d1b);color:#f5faf7;box-shadow:0 20px 100px #0006;overflow:hidden;outline:none}
.lyrics-fullscreen {padding:0}
.lyrics-fullscreen .lyrics-dialog {width:100%;height:100dvh;border-radius:0}
.lyrics-header {display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:28px 36px 12px;flex-shrink:0}
.lyrics-heading {min-width:0}
.lyrics-heading small {font-size:12px;letter-spacing:.08em;text-transform:uppercase;opacity:.65}
.lyrics-heading h2 {margin:8px 0 4px;font-size:24px;overflow-wrap:anywhere}
.lyrics-heading p {margin:0;color:#b7cbc5;font-size:14px}
.lyrics-dialog button {color:inherit;cursor:pointer;font-family:inherit}
.lyrics-close {background:#ffffff12;border:0;border-radius:50%;width:42px;height:42px;flex-shrink:0;font-size:22px}
.lyrics-close:hover {background:#ffffff25}
.lyrics-version {padding:8px 36px;display:flex;align-items:center;gap:12px;font-size:13px;flex-shrink:0}
.lyrics-version select {max-width:80%;background:#19332e;border:1px solid #ffffff30;border-radius:6px;color:inherit;padding:6px}
.lyrics-scroll {position:relative;overflow:auto;overscroll-behavior:contain;flex:1;padding:18px max(36px,calc((100% - 1000px)/2));scrollbar-width:thin;scrollbar-color:#ffffff30 transparent}
.lyrics-lines {padding:12vh 0 35vh}
.lyrics-line {display:block;width:100%;text-align:left;background:none;border:0;padding:12px 0;font-size:clamp(26px,3.5vw,52px);font-weight:750;line-height:1.3;color:#94b1a8!important;transition:color .3s,transform .3s;overflow-wrap:anywhere}
.lyrics-line.active {color:#fff!important;transform:translateX(6px)}
.lyrics-line.past {color:#bdd0c9!important}
.lyrics-line:hover:not(:disabled) {color:#fff!important}
.lyrics-line:disabled {cursor:default;opacity:1}
.lyrics-plain {font-family:inherit;font-size:clamp(23px,3vw,40px);font-weight:650;line-height:1.6;white-space:pre-wrap;overflow-wrap:anywhere;padding:3vh 0 12vh;margin:0}
.lyrics-message {padding:10vh 0;color:#c1d2cb;font-size:20px;line-height:1.6}
.lyrics-footer {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 36px max(18px,env(safe-area-inset-bottom));font-size:12px;background:#0d1d1b80;flex-shrink:0}
.lyrics-footer small {opacity:.6}
.lyrics-footer button,.lyrics-message button {background:#ffffff12;border:1px solid #ffffff20;border-radius:20px;padding:8px 14px}
.lyrics-transport {display:flex;gap:10px}
.lyrics-dialog :focus-visible {outline:2px solid #e5fff4;outline-offset:4px}
.lyrics-toggle-mobile {display:none!important}
.lyrics-presence {color:var(--accent,#80bda6)!important;width:24px!important;min-width:24px!important;padding:3px!important}
.lyrics-presence svg {width:15px;height:15px}
@media(max-width:768px) {
.lyrics-overlay {padding:12px}
.lyrics-fullscreen {padding:0}
.lyrics-dialog {height:85dvh;border-radius:16px}
.lyrics-header {padding:calc(18px + env(safe-area-inset-top)) 20px 12px;gap:12px}
.lyrics-heading h2 {font-size:21px}
.lyrics-version {padding:8px 20px}
.lyrics-scroll {padding:12px 24px}
.lyrics-line {font-size:30px;padding:10px 0}
.lyrics-footer {padding-left:20px;padding-right:20px;gap:8px;flex-wrap:wrap}
.lyrics-toggle-mobile {display:inline-flex!important}
}
@media(prefers-reduced-motion:reduce) {.lyrics-line {transition:none}}
:root {
--bg-primary: #121212;
--bg-secondary: #181818;