Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 97c82b4ba2 | |||
| de7626a6a9 | |||
| fb7d0c7e1a | |||
| c3b70dc16c | |||
| 66bb127d43 |
Generated
+1
-1
@@ -1418,7 +1418,7 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c"
|
||||
|
||||
[[package]]
|
||||
name = "furumusic"
|
||||
version = "0.2.5"
|
||||
version = "0.2.8"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"async-trait",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "furumusic"
|
||||
version = "0.2.6"
|
||||
version = "0.2.8"
|
||||
edition = "2024"
|
||||
description = "Reusable web-app boilerplate: auth, OIDC/SSO, admin panel, user management, i18n, PostgreSQL"
|
||||
|
||||
|
||||
+34
-8
@@ -9,7 +9,7 @@ use cot::response::IntoResponse;
|
||||
use cot::session::Session;
|
||||
use cot::{Body, Template};
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use serde::{Deserialize, Deserializer, Serialize};
|
||||
use sqlx::{PgPool, Postgres, QueryBuilder};
|
||||
|
||||
use super::BUILD_INFO;
|
||||
@@ -68,9 +68,12 @@ pub(super) struct UpdateLibraryItemRequest {
|
||||
title: String,
|
||||
hidden: bool,
|
||||
release_type: Option<String>,
|
||||
#[serde(default, deserialize_with = "deserialize_optional_stringish")]
|
||||
year: Option<String>,
|
||||
release_id: Option<i64>,
|
||||
#[serde(default, deserialize_with = "deserialize_optional_stringish")]
|
||||
track_number: Option<String>,
|
||||
#[serde(default, deserialize_with = "deserialize_optional_stringish")]
|
||||
disc_number: Option<String>,
|
||||
artist_ids: Option<Vec<i64>>,
|
||||
}
|
||||
@@ -1876,7 +1879,7 @@ async fn fetch_library_item(
|
||||
"releases" => {
|
||||
sqlx::query_as::<_, LibraryItemRow>(
|
||||
"SELECT r.id, r.title::text AS title, \
|
||||
CONCAT(r.release_type::text, COALESCE(' · ' || r.year::text, '')) AS subtitle, \
|
||||
(COALESCE(NULLIF(STRING_AGG(DISTINCT a.name::text, ', '), ''), 'Unknown artist') || COALESCE(' / ' || r.year::text, '')) AS subtitle, \
|
||||
r.is_hidden, COUNT(DISTINCT t.id)::bigint AS primary_count, \
|
||||
COUNT(DISTINCT ra.artist_id)::bigint AS secondary_count, \
|
||||
COUNT(DISTINCT ph.id)::bigint AS tertiary_count, \
|
||||
@@ -1884,6 +1887,7 @@ async fn fetch_library_item(
|
||||
FROM furumusic__release r \
|
||||
LEFT JOIN furumusic__track t ON t.release_id = r.id \
|
||||
LEFT JOIN furumusic__release_artist ra ON ra.release_id = r.id \
|
||||
LEFT JOIN furumusic__artist a ON a.id = ra.artist_id \
|
||||
LEFT JOIN furumusic__play_history ph ON ph.track_id = t.id \
|
||||
WHERE r.id = $1 \
|
||||
GROUP BY r.id",
|
||||
@@ -2055,8 +2059,11 @@ async fn load_artist_options(pool: &PgPool) -> anyhow::Result<Vec<ArtistOptionDt
|
||||
async fn load_release_options(pool: &PgPool) -> anyhow::Result<Vec<ReleaseOptionDto>> {
|
||||
let rows = sqlx::query_as::<_, (i64, String, Option<String>)>(
|
||||
"SELECT r.id, r.title::text AS title, \
|
||||
CONCAT(r.release_type::text, COALESCE(' / ' || r.year::text, '')) AS subtitle \
|
||||
(COALESCE(NULLIF(STRING_AGG(DISTINCT a.name::text, ', '), ''), 'Unknown artist') || COALESCE(' / ' || r.year::text, '')) AS subtitle \
|
||||
FROM furumusic__release r \
|
||||
LEFT JOIN furumusic__release_artist ra ON ra.release_id = r.id \
|
||||
LEFT JOIN furumusic__artist a ON a.id = ra.artist_id \
|
||||
GROUP BY r.id \
|
||||
ORDER BY r.title_sort ASC, r.year NULLS LAST, r.id ASC",
|
||||
)
|
||||
.fetch_all(pool)
|
||||
@@ -2452,7 +2459,7 @@ async fn load_release_items(
|
||||
) -> anyhow::Result<Vec<LibraryItemRow>> {
|
||||
let mut qb = QueryBuilder::<Postgres>::new(
|
||||
"SELECT r.id, r.title::text AS title, \
|
||||
CONCAT(r.release_type::text, COALESCE(' · ' || r.year::text, '')) AS subtitle, \
|
||||
(COALESCE(NULLIF(STRING_AGG(DISTINCT a.name::text, ', '), ''), 'Unknown artist') || COALESCE(' / ' || r.year::text, '')) AS subtitle, \
|
||||
r.is_hidden, COUNT(DISTINCT t.id)::bigint AS primary_count, \
|
||||
COUNT(DISTINCT ra.artist_id)::bigint AS secondary_count, \
|
||||
COUNT(DISTINCT ph.id)::bigint AS tertiary_count, \
|
||||
@@ -2657,10 +2664,12 @@ fn optional_job_time(value: &str) -> Option<String> {
|
||||
}
|
||||
|
||||
fn normalize_library_kind(kind: Option<&str>) -> String {
|
||||
match kind {
|
||||
Some("releases") => "releases",
|
||||
Some("tracks") => "tracks",
|
||||
Some("playlists") => "playlists",
|
||||
let kind = kind.unwrap_or_default().trim().to_ascii_lowercase();
|
||||
match kind.as_str() {
|
||||
"release" | "releases" => "releases",
|
||||
"track" | "tracks" => "tracks",
|
||||
"playlist" | "playlists" => "playlists",
|
||||
"artist" | "artists" => "artists",
|
||||
_ => "artists",
|
||||
}
|
||||
.to_owned()
|
||||
@@ -2696,6 +2705,23 @@ fn parse_optional_admin_i32(value: Option<&str>, min: i32, max: i32) -> Option<i
|
||||
.map(|parsed| parsed.clamp(min, max))
|
||||
}
|
||||
|
||||
fn deserialize_optional_stringish<'de, D>(deserializer: D) -> Result<Option<String>, D::Error>
|
||||
where
|
||||
D: Deserializer<'de>,
|
||||
{
|
||||
let Some(value) = Option::<serde_json::Value>::deserialize(deserializer)? else {
|
||||
return Ok(None);
|
||||
};
|
||||
match value {
|
||||
serde_json::Value::Null => Ok(None),
|
||||
serde_json::Value::String(value) => Ok(Some(value)),
|
||||
serde_json::Value::Number(value) => Ok(Some(value.to_string())),
|
||||
other => Err(serde::de::Error::custom(format!(
|
||||
"expected string, number, or null, got {other}"
|
||||
))),
|
||||
}
|
||||
}
|
||||
|
||||
fn now_string() -> String {
|
||||
chrono::Utc::now().format("%Y-%m-%dT%H:%M:%SZ").to_string()
|
||||
}
|
||||
|
||||
@@ -370,7 +370,8 @@ pub async fn save_cover_to_storage(
|
||||
}
|
||||
|
||||
let ext = extension_for_mime(&cover.mime_type);
|
||||
let filename = format!("cover.{ext}");
|
||||
let hash_prefix: String = hash.chars().take(12).collect();
|
||||
let filename = format!("cover-{hash_prefix}.{ext}");
|
||||
|
||||
let artist_dir = sanitize_dir_name(artist_name);
|
||||
let album_dir = sanitize_dir_name(release_title);
|
||||
|
||||
+10
-2
@@ -1934,7 +1934,7 @@ tbody tr:hover {
|
||||
<div class="empty" x-show="editorLoading">Loading editor...</div>
|
||||
<div x-show="!editorLoading">
|
||||
<div class="field">
|
||||
<label x-text="isArtistEditor() ? 'Artist name' : 'Title'"></label>
|
||||
<label x-text="isArtistEditor() ? 'Artist name' : (isReleaseEditor() ? 'Release title' : (isTrackEditor() ? 'Track title' : 'Title'))"></label>
|
||||
<input x-model="editorDraft.title" />
|
||||
</div>
|
||||
|
||||
@@ -2829,8 +2829,10 @@ function adminV2() {
|
||||
selectEditorRelease(release = null) {
|
||||
const candidates = this.filteredEditorReleases();
|
||||
release = release || candidates[0];
|
||||
if (release) this.editorDraft.release_id = Number(release.id);
|
||||
if (!release) return false;
|
||||
this.editorDraft.release_id = Number(release.id);
|
||||
this.editorReleaseToAdd = '';
|
||||
return true;
|
||||
},
|
||||
|
||||
setEditorImageFile(event) {
|
||||
@@ -2948,6 +2950,12 @@ function adminV2() {
|
||||
},
|
||||
|
||||
async saveLibraryItem() {
|
||||
if (this.isTrackEditor() && String(this.editorReleaseToAdd || '').trim()) {
|
||||
if (!this.selectEditorRelease()) {
|
||||
this.showToast('Choose a release from search results');
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!this.editorCanSave()) return;
|
||||
this.editorSaving = true;
|
||||
try {
|
||||
|
||||
@@ -422,13 +422,13 @@
|
||||
<button class="torrent-tree-check" :class="{ checked: $store.torrents.selectedUploadTracks.has(item.track.id) }" @click="$store.torrents.toggleUploadTrackSelection(item.track.id)">
|
||||
<template x-if="$store.torrents.selectedUploadTracks.has(item.track.id)"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3"><polyline points="20 6 9 17 4 12"/></svg></template>
|
||||
</button>
|
||||
<button class="track-action-btn play-btn" @click="$store.player.play(item.track)" title="{{ t.player_play }}"><svg viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg></button>
|
||||
<div class="upload-track-main">
|
||||
<div class="upload-track-title"><span x-text="item.track.track_number ? item.track.track_number + '. ' + item.track.title : item.track.title"></span><span class="upload-hidden-pill" x-show="item.is_hidden">hidden</span></div>
|
||||
<div class="upload-track-meta"><span x-text="$store.torrents.uploadArtistsText(item)"></span><span x-show="$store.torrents.uploadFeaturedArtistsText(item)">feat.</span><span x-show="$store.torrents.uploadFeaturedArtistsText(item)" x-text="$store.torrents.uploadFeaturedArtistsText(item)"></span></div>
|
||||
</div>
|
||||
<div class="upload-track-actions">
|
||||
<button class="track-action-btn" @click="$store.queue.addNextInQueue([item.track])" title="{{ t.player_play_next }}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h8M5 18h14"/><path d="M17 10l4 3-4 3" fill="currentColor" stroke="none"/></svg></button>
|
||||
<button class="track-action-btn queue-insert-btn queue-next-btn" @click="$store.queue.addNextInQueue([item.track])" title="{{ t.player_play_next }}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h10M5 12h7M5 18h10"/><path d="M17 9l4 3-4 3" fill="currentColor" stroke="none"/></svg></button>
|
||||
<button class="track-action-btn queue-insert-btn queue-end-btn" @click="$store.queue.addToEnd([item.track])" title="{{ t.player_add_to_queue }}"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h14M5 18h7"/><path d="M17 15l4 3-4 3" fill="currentColor" stroke="none"/></svg></button>
|
||||
<button class="modal-btn modal-btn-ghost" @click="$store.torrents.editUpload(item)">Edit</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -516,11 +516,6 @@
|
||||
<div class="upload-track-card" :class="{ hidden: item.is_hidden }">
|
||||
<template x-if="$store.torrents.uploadEditId !== item.track.id">
|
||||
<div class="upload-track-display">
|
||||
<button class="track-action-btn play-btn"
|
||||
@click="$store.player.play(item.track)"
|
||||
title="{{ t.player_play }}">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg>
|
||||
</button>
|
||||
<div class="upload-track-main">
|
||||
<div class="upload-track-title">
|
||||
<span x-text="item.track.title"></span>
|
||||
@@ -535,8 +530,11 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="upload-track-actions">
|
||||
<button class="track-action-btn" @click="$store.queue.addNextInQueue([item.track])" title="{{ t.player_play_next }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h8M5 18h14"/><path d="M17 10l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
<button class="track-action-btn queue-insert-btn queue-next-btn" @click="$store.queue.addNextInQueue([item.track])" title="{{ t.player_play_next }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h10M5 12h7M5 18h10"/><path d="M17 9l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn queue-insert-btn queue-end-btn" @click="$store.queue.addToEnd([item.track])" title="{{ t.player_add_to_queue }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h14M5 18h7"/><path d="M17 15l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
</button>
|
||||
<button class="modal-btn modal-btn-ghost" @click="$store.torrents.editUpload(item)">Edit</button>
|
||||
</div>
|
||||
|
||||
@@ -165,6 +165,19 @@ document.addEventListener('alpine:init', () => {
|
||||
|
||||
Alpine.store('mobile', {
|
||||
libraryOpen: false,
|
||||
playerExpanded: false,
|
||||
playerDragging: false,
|
||||
playerDragOffset: 0,
|
||||
playerCloseOffset: 0,
|
||||
_playerDragStartY: 0,
|
||||
_playerDragStartX: 0,
|
||||
_playerDragTracking: false,
|
||||
_playerDragMode: null,
|
||||
_playerDragPointerId: null,
|
||||
_playerDragElement: null,
|
||||
_playerDragMove: null,
|
||||
_playerDragEnd: null,
|
||||
_playerSuppressClickUntil: 0,
|
||||
toggleLibrary() {
|
||||
this.libraryOpen = !this.libraryOpen;
|
||||
if (this.libraryOpen) Alpine.store('user').menuOpen = false;
|
||||
@@ -172,6 +185,121 @@ document.addEventListener('alpine:init', () => {
|
||||
closeLibrary() {
|
||||
this.libraryOpen = false;
|
||||
},
|
||||
isMobilePlayer() {
|
||||
return window.matchMedia && window.matchMedia('(max-width: 720px)').matches;
|
||||
},
|
||||
openPlayerFullscreen() {
|
||||
if (!this.isMobilePlayer() || !Alpine.store('player').currentTrack) return;
|
||||
this.playerExpanded = true;
|
||||
this.playerDragging = false;
|
||||
this.playerDragOffset = 0;
|
||||
this.playerCloseOffset = 0;
|
||||
Alpine.store('queue').visible = false;
|
||||
Alpine.store('devices').open = false;
|
||||
},
|
||||
closePlayerFullscreen() {
|
||||
this.playerExpanded = false;
|
||||
this.playerDragging = false;
|
||||
this.playerDragOffset = 0;
|
||||
this.playerCloseOffset = 0;
|
||||
},
|
||||
playerDragStyle() {
|
||||
return `--mobile-player-drag:${this.playerDragOffset}px; --mobile-player-close-drag:${this.playerCloseOffset}px;`;
|
||||
},
|
||||
handlePlayerClick(event) {
|
||||
if (Date.now() <= this._playerSuppressClickUntil) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
this._playerSuppressClickUntil = 0;
|
||||
}
|
||||
},
|
||||
startPlayerDrag(event, force = false) {
|
||||
if (!this.isMobilePlayer() || !Alpine.store('player').currentTrack) return;
|
||||
if (event.button && event.button !== 0) return;
|
||||
const target = event.target;
|
||||
const isDragBlocked = target.closest('input, select, textarea, .volume-slider, .device-popover, .mobile-expanded-queue');
|
||||
if (!force) {
|
||||
if (this.playerExpanded) {
|
||||
const isCloseHandle = target.closest('.player-now-playing');
|
||||
const scroller = event.currentTarget?.classList?.contains('player-bar') ? event.currentTarget : null;
|
||||
if (!isCloseHandle || isDragBlocked || (scroller && scroller.scrollTop > 4)) return;
|
||||
} else if (isDragBlocked) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (this._playerDragTracking) this.endPlayerDrag({ type: 'pointercancel' });
|
||||
this.playerDragging = false;
|
||||
this._playerDragTracking = true;
|
||||
this._playerDragMode = this.playerExpanded ? 'close' : 'open';
|
||||
this._playerDragStartY = event.clientY;
|
||||
this._playerDragStartX = event.clientX;
|
||||
this._playerDragPointerId = event.pointerId;
|
||||
this._playerDragElement = event.currentTarget;
|
||||
this.playerDragOffset = 0;
|
||||
this.playerCloseOffset = 0;
|
||||
this._playerDragMove = e => this.movePlayerDrag(e);
|
||||
this._playerDragEnd = e => this.endPlayerDrag(e);
|
||||
window.addEventListener('pointermove', this._playerDragMove, { passive: false });
|
||||
window.addEventListener('pointerup', this._playerDragEnd, { passive: false });
|
||||
window.addEventListener('pointercancel', this._playerDragEnd, { passive: false });
|
||||
},
|
||||
movePlayerDrag(event) {
|
||||
if (!this._playerDragTracking) return;
|
||||
const delta = this._playerDragStartY - event.clientY;
|
||||
const absDelta = Math.abs(delta);
|
||||
if (!this.playerDragging) {
|
||||
const horizontalDelta = Math.abs(event.clientX - this._playerDragStartX);
|
||||
const wantsOpen = this._playerDragMode === 'open' && delta > 0;
|
||||
const wantsClose = this._playerDragMode === 'close' && delta < 0;
|
||||
if (absDelta < 8 || absDelta < horizontalDelta * 1.15 || (!wantsOpen && !wantsClose)) return;
|
||||
this.playerDragging = true;
|
||||
try {
|
||||
this._playerDragElement?.setPointerCapture?.(this._playerDragPointerId);
|
||||
} catch (_) {}
|
||||
}
|
||||
event.preventDefault();
|
||||
if (this._playerDragMode === 'close') {
|
||||
this.playerCloseOffset = Math.max(0, Math.min(window.innerHeight, -delta));
|
||||
} else {
|
||||
const max = Math.max(0, window.innerHeight - 132);
|
||||
this.playerDragOffset = Math.max(0, Math.min(max, delta));
|
||||
}
|
||||
},
|
||||
endPlayerDrag(event) {
|
||||
const openThreshold = Math.min(180, Math.max(90, window.innerHeight * 0.18));
|
||||
const closeThreshold = Math.min(110, Math.max(64, window.innerHeight * 0.1));
|
||||
const wasCancelled = event?.type === 'pointercancel';
|
||||
const wasDragging = this.playerDragging;
|
||||
if (wasDragging) this._playerSuppressClickUntil = Date.now() + 450;
|
||||
if (this._playerDragMode === 'close') {
|
||||
if (!wasCancelled && this.playerCloseOffset > closeThreshold) this.closePlayerFullscreen();
|
||||
else {
|
||||
this.playerCloseOffset = 0;
|
||||
this.playerDragging = false;
|
||||
}
|
||||
} else if (this._playerDragMode === 'open' && !wasCancelled && this.playerDragOffset > openThreshold) {
|
||||
this.openPlayerFullscreen();
|
||||
} else {
|
||||
this.playerDragOffset = 0;
|
||||
this.playerDragging = false;
|
||||
}
|
||||
try {
|
||||
if (this._playerDragPointerId !== null && this._playerDragElement?.hasPointerCapture?.(this._playerDragPointerId)) {
|
||||
this._playerDragElement.releasePointerCapture(this._playerDragPointerId);
|
||||
}
|
||||
} catch (_) {}
|
||||
if (this._playerDragMove) window.removeEventListener('pointermove', this._playerDragMove);
|
||||
if (this._playerDragEnd) {
|
||||
window.removeEventListener('pointerup', this._playerDragEnd);
|
||||
window.removeEventListener('pointercancel', this._playerDragEnd);
|
||||
}
|
||||
this._playerDragTracking = false;
|
||||
this._playerDragMode = null;
|
||||
this._playerDragPointerId = null;
|
||||
this._playerDragElement = null;
|
||||
this._playerDragMove = null;
|
||||
this._playerDragEnd = null;
|
||||
},
|
||||
});
|
||||
|
||||
Alpine.store('info', {
|
||||
@@ -1380,6 +1508,11 @@ document.addEventListener('alpine:init', () => {
|
||||
this.addToEnd([track]);
|
||||
},
|
||||
|
||||
upcoming(limit = 12) {
|
||||
const start = Math.max(0, this.currentIndex + 1);
|
||||
return this.tracks.slice(start, start + limit);
|
||||
},
|
||||
|
||||
addToEnd(tracks) {
|
||||
const items = this._trackList(tracks);
|
||||
if (!items.length) return;
|
||||
|
||||
+67
-34
@@ -483,19 +483,16 @@
|
||||
<span x-show="$store.library.hasPopularity(track)" x-text="$store.library.popularityLabel(track)"></span>
|
||||
<span x-show="!$store.library.hasPopularity(track)" class="info-letter">i</span>
|
||||
</button>
|
||||
<button class="track-action-btn play-btn" @click.stop="$store.library.playSearchTrack(idx)" title="{{ t.player_play }}">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg>
|
||||
</button>
|
||||
<button class="like-btn" :class="{ liked: $store.likes.has(track.id) }" @click.stop="$store.likes.toggle(track.id)" title="{{ t.player_like }}">
|
||||
<svg viewBox="0 0 24 24" :fill="$store.likes.has(track.id) ? 'currentColor' : 'none'" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 000-7.78z"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.queue.addNextInQueue([track])" title="{{ t.player_play_next }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h8M5 18h14"/><path d="M17 10l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
<button class="track-action-btn queue-insert-btn queue-next-btn" @click.stop="$store.queue.addNextInQueue([track])" title="{{ t.player_play_next }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h10M5 12h7M5 18h10"/><path d="M17 9l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.queue.addToEnd([track])" title="{{ t.player_add_to_queue }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
||||
<button class="track-action-btn queue-insert-btn queue-end-btn" @click.stop="$store.queue.addToEnd([track])" title="{{ t.player_add_to_queue }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h14M5 18h7"/><path d="M17 15l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.playlists.showPicker([track.id])" title="{{ t.player_add_to_playlist }}">
|
||||
<button class="track-action-btn playlist-add-btn" @click.stop="$store.playlists.showPicker([track.id])" title="{{ t.player_add_to_playlist }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
@@ -663,19 +660,16 @@
|
||||
<span x-show="$store.library.hasPopularity(track)" x-text="$store.library.popularityLabel(track)"></span>
|
||||
<span x-show="!$store.library.hasPopularity(track)" class="info-letter">i</span>
|
||||
</button>
|
||||
<button class="track-action-btn play-btn" @click.stop="$store.queue.playRelease($store.library.currentArtist.featured_tracks, idx)" title="{{ t.player_play }}">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg>
|
||||
</button>
|
||||
<button class="like-btn" :class="{ liked: $store.likes.has(track.id) }" @click.stop="$store.likes.toggle(track.id)" title="{{ t.player_like }}">
|
||||
<svg viewBox="0 0 24 24" :fill="$store.likes.has(track.id) ? 'currentColor' : 'none'" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 000-7.78z"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.queue.addNextInQueue([track])" title="{{ t.player_play_next }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h8M5 18h14"/><path d="M17 10l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
<button class="track-action-btn queue-insert-btn queue-next-btn" @click.stop="$store.queue.addNextInQueue([track])" title="{{ t.player_play_next }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h10M5 12h7M5 18h10"/><path d="M17 9l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.queue.addToEnd([track])" title="{{ t.player_add_to_queue }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
||||
<button class="track-action-btn queue-insert-btn queue-end-btn" @click.stop="$store.queue.addToEnd([track])" title="{{ t.player_add_to_queue }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h14M5 18h7"/><path d="M17 15l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.playlists.showPicker([track.id])" title="{{ t.player_add_to_playlist }}">
|
||||
<button class="track-action-btn playlist-add-btn" @click.stop="$store.playlists.showPicker([track.id])" title="{{ t.player_add_to_playlist }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
@@ -786,19 +780,16 @@
|
||||
<span x-show="$store.library.hasPopularity(track)" x-text="$store.library.popularityLabel(track)"></span>
|
||||
<span x-show="!$store.library.hasPopularity(track)" class="info-letter">i</span>
|
||||
</button>
|
||||
<button class="track-action-btn play-btn" @click.stop="$store.queue.playRelease([track], 0)" title="{{ t.player_play }}">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg>
|
||||
</button>
|
||||
<button class="like-btn" :class="{ liked: $store.likes.has(track.id) }" @click.stop="$store.likes.toggle(track.id)" title="{{ t.player_like }}">
|
||||
<svg viewBox="0 0 24 24" :fill="$store.likes.has(track.id) ? 'currentColor' : 'none'" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 000-7.78z"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.queue.addNextInQueue([track])" title="{{ t.player_play_next }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h8M5 18h14"/><path d="M17 10l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
<button class="track-action-btn queue-insert-btn queue-next-btn" @click.stop="$store.queue.addNextInQueue([track])" title="{{ t.player_play_next }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h10M5 12h7M5 18h10"/><path d="M17 9l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.queue.addToEnd([track])" title="{{ t.player_add_to_queue }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
||||
<button class="track-action-btn queue-insert-btn queue-end-btn" @click.stop="$store.queue.addToEnd([track])" title="{{ t.player_add_to_queue }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h14M5 18h7"/><path d="M17 15l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.playlists.showPicker([track.id])" title="{{ t.player_add_to_playlist }}">
|
||||
<button class="track-action-btn playlist-add-btn" @click.stop="$store.playlists.showPicker([track.id])" title="{{ t.player_add_to_playlist }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
@@ -862,19 +853,16 @@
|
||||
<span x-show="$store.library.hasPopularity(track)" x-text="$store.library.popularityLabel(track)"></span>
|
||||
<span x-show="!$store.library.hasPopularity(track)" class="info-letter">i</span>
|
||||
</button>
|
||||
<button class="track-action-btn play-btn" @click.stop="$store.queue.playRelease($store.library.currentPlaylist.tracks, idx)" title="{{ t.player_play }}">
|
||||
<svg viewBox="0 0 24 24" fill="currentColor"><path d="M8 5v14l11-7z"/></svg>
|
||||
</button>
|
||||
<button class="like-btn" :class="{ liked: $store.likes.has(track.id) }" @click.stop="$store.likes.toggle(track.id)" title="{{ t.player_like }}">
|
||||
<svg viewBox="0 0 24 24" :fill="$store.likes.has(track.id) ? 'currentColor' : 'none'" stroke="currentColor" stroke-width="2"><path d="M20.84 4.61a5.5 5.5 0 00-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 00-7.78 7.78L12 21.23l8.84-8.84a5.5 5.5 0 000-7.78z"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.queue.addNextInQueue([track])" title="{{ t.player_play_next }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h8M5 18h14"/><path d="M17 10l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
<button class="track-action-btn queue-insert-btn queue-next-btn" @click.stop="$store.queue.addNextInQueue([track])" title="{{ t.player_play_next }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h10M5 12h7M5 18h10"/><path d="M17 9l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.queue.addToEnd([track])" title="{{ t.player_add_to_queue }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/></svg>
|
||||
<button class="track-action-btn queue-insert-btn queue-end-btn" @click.stop="$store.queue.addToEnd([track])" title="{{ t.player_add_to_queue }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M5 6h14M5 12h14M5 18h7"/><path d="M17 15l4 3-4 3" fill="currentColor" stroke="none"/></svg>
|
||||
</button>
|
||||
<button class="track-action-btn" @click.stop="$store.playlists.showPicker([track.id])" title="{{ t.player_add_to_playlist }}">
|
||||
<button class="track-action-btn playlist-add-btn" @click.stop="$store.playlists.showPicker([track.id])" title="{{ t.player_add_to_playlist }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M8 6h13M8 12h13M8 18h13M3 6h.01M3 12h.01M3 18h.01"/></svg>
|
||||
</button>
|
||||
</div>
|
||||
@@ -955,11 +943,21 @@
|
||||
</div>
|
||||
|
||||
<!-- Player Bar -->
|
||||
<div class="player-bar">
|
||||
<div class="player-bar"
|
||||
:class="{ 'mobile-expanded': $store.mobile.playerExpanded, 'mobile-dragging': $store.mobile.playerDragging }"
|
||||
:style="$store.mobile.playerDragStyle()"
|
||||
@click.capture="$store.mobile.handlePlayerClick($event)"
|
||||
@pointerdown="$store.mobile.startPlayerDrag($event)">
|
||||
<button class="mobile-player-collapse-btn" type="button" @click.stop="$store.mobile.closePlayerFullscreen()" title="{{ t.player_close }}" aria-label="{{ t.player_close }}">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4">
|
||||
<path d="M6 9l6 6 6-6"/>
|
||||
</svg>
|
||||
</button>
|
||||
<div class="player-now-playing">
|
||||
<template x-if="$store.player.currentTrack">
|
||||
<div style="display:flex;align-items:center;gap:12px;overflow:hidden">
|
||||
<div class="player-cover">
|
||||
<div class="player-cover"
|
||||
@click.stop="$store.mobile.openPlayerFullscreen()">
|
||||
<template x-if="$store.player.currentTrack.cover_url">
|
||||
<img :src="$store.player.currentTrack.cover_url" :alt="$store.player.currentTrack.title">
|
||||
</template>
|
||||
@@ -989,6 +987,9 @@
|
||||
<span class="player-release-year" x-text="' · ' + $store.player.currentTrack.release_year"></span>
|
||||
</template>
|
||||
</div>
|
||||
<div class="player-track-release" x-show="$store.player.currentTrack.release_title">
|
||||
<a class="artist-link" @click.stop="$store.player.currentTrack.release_id && $store.library.openRelease($store.player.currentTrack.release_id)" x-text="$store.player.currentTrack.release_title"></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -1029,6 +1030,8 @@
|
||||
<div class="progress-bar-thumb"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="player-progress-strip-times"
|
||||
x-text="'-' + formatTime(Math.max(0, $store.player.duration - $store.player.currentTime)) + ' / ' + formatTime($store.player.duration)"></div>
|
||||
<span class="player-time" x-text="formatTime($store.player.duration)"></span>
|
||||
</div>
|
||||
<div class="player-version-chip">v{{ t.app_version() }}</div>
|
||||
@@ -1167,4 +1170,34 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mobile-expanded-queue">
|
||||
<div class="mobile-expanded-queue-title">{{ t.player_queue }}</div>
|
||||
<template x-if="$store.queue.upcoming().length === 0">
|
||||
<div class="mobile-expanded-queue-empty">{{ t.player_queue_empty }}</div>
|
||||
</template>
|
||||
<template x-for="(track, idx) in $store.queue.upcoming()" :key="'mobile-expanded-queue-' + track.id + '-' + idx">
|
||||
<button class="mobile-expanded-queue-row" type="button" @click="$store.queue.playFromIndex($store.queue.currentIndex + idx + 1)">
|
||||
<div class="mobile-expanded-queue-cover">
|
||||
<template x-if="track.cover_url">
|
||||
<img :src="track.cover_url" :alt="track.title" loading="lazy">
|
||||
</template>
|
||||
<template x-if="!track.cover_url">
|
||||
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M9 18V5l12-2v13"/><circle cx="6" cy="18" r="3"/><circle cx="18" cy="16" r="3"/></svg>
|
||||
</template>
|
||||
</div>
|
||||
<div class="mobile-expanded-queue-info">
|
||||
<div class="mobile-expanded-queue-name" x-text="track.title"></div>
|
||||
<div class="mobile-expanded-queue-artist">
|
||||
<template x-for="(artist, artistIdx) in $store.library.trackArtistLinks(track)" :key="artist.label + '-' + artist.id + '-' + artistIdx">
|
||||
<span>
|
||||
<template x-if="artistIdx > 0"><span>, </span></template>
|
||||
<span x-text="artist.label"></span>
|
||||
</span>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<span class="mobile-expanded-queue-time" x-text="formatTime(track.duration_seconds)"></span>
|
||||
</button>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+627
-42
@@ -687,7 +687,7 @@ button.user-stat:hover {
|
||||
|
||||
.track-list-header {
|
||||
display: grid;
|
||||
grid-template-columns: 40px 1fr 1fr 120px 60px;
|
||||
grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 154px 60px;
|
||||
padding: 8px 16px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
color: var(--text-subdued);
|
||||
@@ -699,7 +699,7 @@ button.user-stat:hover {
|
||||
|
||||
.track-row {
|
||||
display: grid;
|
||||
grid-template-columns: 40px 1fr 1fr 120px 60px;
|
||||
grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1fr) 154px 60px;
|
||||
padding: 8px 16px;
|
||||
border-radius: 4px;
|
||||
cursor: default;
|
||||
@@ -736,14 +736,18 @@ button.user-stat:hover {
|
||||
}
|
||||
|
||||
.track-album { font-size: 13px; color: var(--text-subdued); }
|
||||
.track-duration { font-size: 13px; color: var(--text-subdued); text-align: right; }
|
||||
.track-duration { font-size: 13px; color: var(--text-subdued); text-align: right; pointer-events: none; }
|
||||
|
||||
/* Track action buttons */
|
||||
.track-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-start;
|
||||
gap: 2px;
|
||||
opacity: 1;
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.track-action-btn {
|
||||
@@ -759,9 +763,22 @@ button.user-stat:hover {
|
||||
transition: color 0.15s, background 0.15s;
|
||||
}
|
||||
|
||||
.track-actions .track-action-btn,
|
||||
.track-actions .like-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
flex: 0 0 28px;
|
||||
}
|
||||
|
||||
.track-actions .popularity-info-btn {
|
||||
width: auto;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
||||
.track-action-btn:hover { color: var(--text-primary); background: var(--bg-active); }
|
||||
.track-action-btn.play-btn:hover { color: var(--accent); }
|
||||
.track-action-btn svg { width: 16px; height: 16px; }
|
||||
.track-action-btn.queue-insert-btn svg { width: 17px; height: 17px; }
|
||||
|
||||
.info-btn {
|
||||
color: var(--text-subdued);
|
||||
@@ -1167,6 +1184,27 @@ button.user-stat:hover {
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.player-track-release {
|
||||
margin-top: 2px;
|
||||
font-size: 11px;
|
||||
color: var(--text-subdued);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.player-track-release .artist-link {
|
||||
color: var(--text-subdued);
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: inherit;
|
||||
}
|
||||
|
||||
.player-track-release .artist-link:hover {
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.player-controls {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -1223,6 +1261,10 @@ button.user-stat:hover {
|
||||
|
||||
.player-time { font-size: 11px; color: var(--text-subdued); min-width: 40px; text-align: center; }
|
||||
|
||||
.player-progress-strip-times {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
flex: 1;
|
||||
height: 4px;
|
||||
@@ -3052,7 +3094,7 @@ button.user-stat:hover {
|
||||
|
||||
.upload-tree-track {
|
||||
display: grid;
|
||||
grid-template-columns: 24px 30px minmax(0, 1fr) auto;
|
||||
grid-template-columns: 24px minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-height: 44px;
|
||||
@@ -3151,7 +3193,7 @@ button.user-stat:hover {
|
||||
|
||||
.upload-track-display {
|
||||
display: grid;
|
||||
grid-template-columns: 34px minmax(0, 1fr) auto;
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
@@ -3409,6 +3451,11 @@ button.user-stat:hover {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.mobile-player-collapse-btn,
|
||||
.mobile-expanded-queue {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.playlist-action-btn {
|
||||
background: none;
|
||||
border: none;
|
||||
@@ -3463,7 +3510,7 @@ button.user-stat:hover {
|
||||
|
||||
@media (max-width: 900px) {
|
||||
:root {
|
||||
--player-height: 118px;
|
||||
--player-height: 168px;
|
||||
--player-bar-space: calc(var(--player-height) + var(--safe-bottom));
|
||||
}
|
||||
|
||||
@@ -3597,54 +3644,175 @@ button.user-stat:hover {
|
||||
}
|
||||
|
||||
.player-bar {
|
||||
grid-template-columns: minmax(0, 1fr) auto;
|
||||
grid-template-rows: auto auto;
|
||||
gap: 8px 12px;
|
||||
position: relative;
|
||||
grid-template-columns: auto minmax(0, 1fr);
|
||||
grid-template-rows: 62px 58px;
|
||||
grid-template-areas:
|
||||
"now now"
|
||||
"buttons actions";
|
||||
gap: 4px 10px;
|
||||
align-items: center;
|
||||
padding: 10px 12px calc(10px + var(--safe-bottom));
|
||||
padding: 34px 12px calc(9px + var(--safe-bottom));
|
||||
touch-action: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.player-now-playing {
|
||||
grid-column: 1;
|
||||
grid-row: 1;
|
||||
grid-area: now;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.player-now-playing > div {
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
gap: 10px !important;
|
||||
width: 100%;
|
||||
max-width: 620px;
|
||||
margin: 0 auto;
|
||||
overflow: visible !important;
|
||||
}
|
||||
|
||||
.player-cover {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
width: 52px;
|
||||
height: 52px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.player-track-info {
|
||||
width: min(58vw, 360px);
|
||||
max-width: 360px;
|
||||
}
|
||||
|
||||
.player-track-title-row {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.player-current-like {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.player-track-title,
|
||||
.player-track-artist,
|
||||
.player-track-release {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.player-track-release {
|
||||
display: block;
|
||||
color: var(--text-subdued);
|
||||
font-size: 10px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.player-controls {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 2;
|
||||
gap: 6px;
|
||||
width: 100%;
|
||||
display: contents;
|
||||
}
|
||||
|
||||
.player-buttons {
|
||||
gap: 18px;
|
||||
grid-area: buttons;
|
||||
justify-self: start;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.player-bar:not(.mobile-expanded) .player-buttons .player-btn:first-child,
|
||||
.player-bar:not(.mobile-expanded) .player-buttons .player-btn:last-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.player-btn {
|
||||
min-width: 32px;
|
||||
min-height: 32px;
|
||||
min-width: 42px;
|
||||
min-height: 42px;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.player-btn svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.player-btn-play {
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.player-btn-play svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.player-timeline {
|
||||
max-width: none;
|
||||
gap: 6px;
|
||||
gap: 5px;
|
||||
align-self: center;
|
||||
padding-right: 58px;
|
||||
}
|
||||
|
||||
.player-bar:not(.mobile-expanded) .player-timeline {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 21px;
|
||||
gap: 0;
|
||||
padding-right: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.player-bar:not(.mobile-expanded) .player-time {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.player-bar:not(.mobile-expanded) .progress-bar,
|
||||
.player-bar:not(.mobile-expanded) .progress-bar:hover {
|
||||
width: 100%;
|
||||
height: 21px;
|
||||
border-radius: 0;
|
||||
background: rgba(29, 185, 84, 0.18);
|
||||
}
|
||||
|
||||
.player-bar:not(.mobile-expanded) .progress-bar-fill {
|
||||
border-radius: 0;
|
||||
background: var(--accent);
|
||||
}
|
||||
|
||||
.player-bar:not(.mobile-expanded) .progress-bar-thumb {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.player-bar:not(.mobile-expanded) .player-progress-strip-times {
|
||||
position: absolute;
|
||||
top: 22px;
|
||||
right: 10px;
|
||||
height: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0;
|
||||
color: var(--text-subdued);
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
line-height: 1;
|
||||
pointer-events: none;
|
||||
text-shadow: none;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.player-version-chip {
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
bottom: calc(12px + var(--safe-bottom));
|
||||
width: auto;
|
||||
max-width: none;
|
||||
margin-top: 0;
|
||||
padding-left: 0;
|
||||
opacity: 0.62;
|
||||
font-size: 9px;
|
||||
font-size: 8px;
|
||||
line-height: 1;
|
||||
opacity: 0.58;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.player-time {
|
||||
@@ -3653,17 +3821,35 @@ button.user-stat:hover {
|
||||
}
|
||||
|
||||
.player-right {
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
grid-area: actions;
|
||||
justify-self: end;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(132px, 1fr) 40px 40px;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.volume-control {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: 30px minmax(112px, 1fr);
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.volume-btn {
|
||||
min-width: 30px;
|
||||
min-height: 36px;
|
||||
justify-content: center;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.volume-slider {
|
||||
width: 88px;
|
||||
height: 6px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 9px;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
@@ -3672,18 +3858,365 @@ button.user-stat:hover {
|
||||
}
|
||||
|
||||
.volume-slider-thumb {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
right: -8.5px;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
height: 6px;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.progress-bar-fill {
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.progress-bar-thumb {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.queue-toggle-btn {
|
||||
min-width: 36px;
|
||||
min-height: 36px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.queue-toggle-btn svg,
|
||||
.volume-btn svg {
|
||||
width: 21px;
|
||||
height: 21px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-dragging:not(.mobile-expanded) {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
height: calc(var(--player-bar-space) + var(--mobile-player-drag, 0px));
|
||||
z-index: 70;
|
||||
border-radius: 18px 18px 0 0;
|
||||
box-shadow: 0 -18px 54px rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
height: 100dvh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
gap: 16px;
|
||||
align-items: center;
|
||||
padding: calc(18px + env(safe-area-inset-top)) 18px calc(16px + var(--safe-bottom));
|
||||
border-top: 0;
|
||||
border-radius: 0;
|
||||
background: var(--bg-primary);
|
||||
box-shadow: none;
|
||||
overflow-y: auto;
|
||||
overscroll-behavior: contain;
|
||||
z-index: 80;
|
||||
transform: translateY(var(--mobile-player-close-drag, 0px));
|
||||
transition: transform 0.18s ease, height 0.18s ease;
|
||||
touch-action: pan-y;
|
||||
user-select: auto;
|
||||
}
|
||||
|
||||
.player-bar.mobile-dragging {
|
||||
transition: none;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .mobile-player-collapse-btn {
|
||||
display: flex;
|
||||
position: absolute;
|
||||
top: calc(12px + env(safe-area-inset-top));
|
||||
right: 12px;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border: 0;
|
||||
border-radius: 50%;
|
||||
background: rgba(255,255,255,0.08);
|
||||
color: var(--text-primary);
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
.mobile-player-collapse-btn svg {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-now-playing {
|
||||
justify-content: center;
|
||||
align-self: stretch;
|
||||
width: 100%;
|
||||
min-height: max(300px, calc(100dvh - 248px));
|
||||
flex: 0 0 auto;
|
||||
overflow: visible;
|
||||
padding-top: 38px;
|
||||
touch-action: none;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-now-playing > div {
|
||||
width: 100%;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
gap: 18px !important;
|
||||
overflow: visible !important;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded.mobile-dragging .player-now-playing {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-cover {
|
||||
width: min(76vw, 38dvh, 360px);
|
||||
height: auto;
|
||||
aspect-ratio: 1;
|
||||
border-radius: 14px;
|
||||
box-shadow: 0 22px 62px rgba(0,0,0,0.48);
|
||||
touch-action: none;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-cover svg {
|
||||
width: 96px;
|
||||
height: 96px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-track-info {
|
||||
width: min(100%, 520px);
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-track-title-row {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-track-title {
|
||||
font-size: 22px;
|
||||
font-weight: 800;
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-track-artist {
|
||||
margin-top: 5px;
|
||||
font-size: 14px;
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-current-like {
|
||||
display: flex;
|
||||
width: 38px;
|
||||
height: 38px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-track-release {
|
||||
margin-top: 4px;
|
||||
font-size: 13px;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-controls {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
flex: 0 0 auto;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-version-chip {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-buttons {
|
||||
justify-self: center;
|
||||
gap: 18px;
|
||||
order: 2;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-btn {
|
||||
min-width: 56px;
|
||||
min-height: 56px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-btn svg {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-btn-play {
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-timeline {
|
||||
width: 100%;
|
||||
max-width: none;
|
||||
justify-self: center;
|
||||
align-self: center;
|
||||
padding-right: 0;
|
||||
order: 1;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .progress-bar {
|
||||
height: 7px;
|
||||
border-radius: 999px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .progress-bar-thumb {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-right {
|
||||
position: static;
|
||||
grid-area: actions;
|
||||
justify-self: center;
|
||||
width: min(100%, 560px);
|
||||
flex: 0 0 auto;
|
||||
grid-template-columns: minmax(0, 1fr) 48px 48px;
|
||||
gap: 8px;
|
||||
padding: 0;
|
||||
border-radius: 0;
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .volume-control {
|
||||
grid-template-columns: 44px minmax(0, 1fr);
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .volume-btn,
|
||||
.player-bar.mobile-expanded .queue-toggle-btn {
|
||||
min-width: 48px;
|
||||
min-height: 48px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .volume-btn {
|
||||
min-width: 44px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .volume-slider {
|
||||
display: block;
|
||||
height: 7px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .device-popover {
|
||||
position: fixed;
|
||||
top: auto;
|
||||
bottom: calc(90px + var(--safe-bottom));
|
||||
left: 12px;
|
||||
right: 12px;
|
||||
width: auto;
|
||||
max-width: none;
|
||||
max-height: 42dvh;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .mobile-expanded-queue {
|
||||
display: block;
|
||||
width: 100%;
|
||||
max-height: none;
|
||||
min-height: 0;
|
||||
overflow: visible;
|
||||
flex: 0 0 auto;
|
||||
margin-top: 8px;
|
||||
padding-top: 14px;
|
||||
padding-bottom: 24px;
|
||||
border-top: 1px solid var(--border-color);
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-title {
|
||||
margin: 0 0 8px;
|
||||
color: var(--text-subdued);
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-empty {
|
||||
padding: 18px 0;
|
||||
color: var(--text-subdued);
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-row {
|
||||
width: 100%;
|
||||
min-height: 54px;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
color: var(--text-secondary);
|
||||
display: grid;
|
||||
grid-template-columns: 42px minmax(0, 1fr) auto;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 6px 4px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-row:active {
|
||||
background: var(--bg-hover);
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-cover {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 5px;
|
||||
overflow: hidden;
|
||||
background: var(--bg-elevated);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-cover img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-cover svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
color: var(--text-subdued);
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-info {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-name,
|
||||
.mobile-expanded-queue-artist {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-name {
|
||||
color: var(--text-primary);
|
||||
font-size: 13px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.mobile-expanded-queue-artist,
|
||||
.mobile-expanded-queue-time {
|
||||
color: var(--text-subdued);
|
||||
font-size: 11px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
:root {
|
||||
--player-height: 132px;
|
||||
--player-height: 170px;
|
||||
--player-bar-space: calc(var(--player-height) + var(--safe-bottom));
|
||||
}
|
||||
|
||||
@@ -3960,7 +4493,7 @@ button.user-stat:hover {
|
||||
}
|
||||
|
||||
.upload-tree-track {
|
||||
grid-template-columns: 24px 30px minmax(0, 1fr);
|
||||
grid-template-columns: 24px minmax(0, 1fr);
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
@@ -3976,7 +4509,7 @@ button.user-stat:hover {
|
||||
}
|
||||
|
||||
.upload-track-display {
|
||||
grid-template-columns: 32px minmax(0, 1fr);
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.upload-track-actions {
|
||||
@@ -4121,11 +4654,24 @@ button.user-stat:hover {
|
||||
gap: 8px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
grid-template-rows: 60px 58px;
|
||||
}
|
||||
|
||||
.player-track-title { font-size: 12px; }
|
||||
.player-track-artist { font-size: 10px; }
|
||||
.player-buttons { gap: 10px; }
|
||||
.player-track-release { font-size: 9px; }
|
||||
.player-buttons { gap: 2px; }
|
||||
|
||||
.player-right {
|
||||
grid-template-columns: minmax(68px, 1fr) 34px 34px;
|
||||
width: 100%;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.volume-control {
|
||||
grid-template-columns: 22px minmax(44px, 1fr);
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.player-version-chip {
|
||||
padding-left: 0;
|
||||
@@ -4138,26 +4684,65 @@ button.user-stat:hover {
|
||||
}
|
||||
|
||||
.volume-btn {
|
||||
min-width: 24px;
|
||||
min-height: 34px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.queue-toggle-btn {
|
||||
min-width: 34px;
|
||||
min-height: 34px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.volume-slider {
|
||||
width: 72px;
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.player-btn {
|
||||
min-width: 30px;
|
||||
min-height: 30px;
|
||||
min-width: 42px;
|
||||
min-height: 42px;
|
||||
padding: 7px;
|
||||
}
|
||||
|
||||
.player-btn svg {
|
||||
width: 17px;
|
||||
height: 17px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.player-btn-play {
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.player-btn-play svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded {
|
||||
gap: 14px;
|
||||
padding-left: 14px;
|
||||
padding-right: 14px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-cover {
|
||||
width: min(82vw, 36dvh, 340px);
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-buttons {
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-btn {
|
||||
min-width: 52px;
|
||||
min-height: 52px;
|
||||
}
|
||||
|
||||
.player-bar.mobile-expanded .player-btn-play {
|
||||
width: 68px;
|
||||
height: 68px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user