2026-05-26 12:55:11 +03:00
<!-- Info Modal -->
< template x-if = "$store.info.modal" >
< div class = "modal-overlay" @ click . self = "$store.info.close()" >
< div class = "modal-box info-modal" >
< div class = "info-modal-head" >
< h3 x-text = "$store.info.modal.title" ></ h3 >
2026-05-26 14:47:10 +03:00
< button class = "mobile-list-action" @ click = "$store.info.close()" title = "{{ t.player_close }}" >
2026-05-26 12:55:11 +03:00
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" >
< line x1 = "18" y1 = "6" x2 = "6" y2 = "18" />
< line x1 = "6" y1 = "6" x2 = "18" y2 = "18" />
</ svg >
</ button >
</ div >
2026-05-29 17:04:30 +03:00
< div class = "info-actions" x-show = "$store.info.modal.actions && $store.info.modal.actions.length" >
< template x-for = "(action, idx) in $store.info.modal.actions" :key = "action.label + '-' + idx" >
< button class = "info-action-btn" type = "button" @ click . stop . prevent = "$store.info.runAction(idx)" :disabled = "action.busy === true" >
< span x-text = "action.busy ? '{{ t.player_resolving }}' : action.label" ></ span >
</ button >
</ template >
</ div >
2026-05-27 15:56:57 +03:00
< div class = "info-modal-body" >
< template x-if = "$store.info.modal.rows && $store.info.modal.rows.length" >
< table class = "info-table" >
< tbody >
< template x-for = "(row, idx) in $store.info.modal.rows" :key = "row.label + '-' + idx" >
< tr >
< th x-text = "row.label" ></ th >
< td >
< 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" >
< button class = "info-link" type = "button" @ click = "$store.info.navigate(link)" x-text = "link.label" ></ button >
</ template >
</ div >
</ template >
< template x-if = "!row.links || !row.links.length" >
< span x-text = "row.value" ></ span >
</ template >
</ td >
</ tr >
</ template >
</ tbody >
</ table >
</ template >
< pre class = "info-modal-plain" x-show = "!$store.info.modal.rows || !$store.info.modal.rows.length" x-text = "$store.info.modal.body" ></ pre >
</ div >
2026-05-26 12:55:11 +03:00
</ div >
</ div >
</ template >
<!-- Create / Rename Playlist Modal -->
< template x-if = "$store.playlists.modal" >
< div class = "modal-overlay" @ click . self = "$store.playlists.modal = null" >
< div class = "modal-box" >
2026-05-26 14:47:10 +03:00
< h3 x-text = "$store.playlists.modal.mode === 'create' ? '{{ t.player_new_playlist }}' : '{{ t.player_rename_playlist }}'" ></ h3 >
< input type = "text" x-model = "$store.playlists.modal.title" placeholder = "{{ t.player_playlist_name }}"
2026-05-26 12:55:11 +03:00
@ keydown . enter = "$store.playlists.submitModal()" x-init = "$nextTick(() => $el.focus())" >
< div class = "modal-footer" >
2026-05-26 14:47:10 +03:00
< button class = "modal-btn modal-btn-ghost" @ click = "$store.playlists.modal = null" > {{ t.player_cancel }}</ button >
2026-05-26 12:55:11 +03:00
< button class = "modal-btn modal-btn-primary" @ click = "$store.playlists.submitModal()"
2026-05-26 14:47:10 +03:00
x-text = "$store.playlists.modal.mode === 'create' ? '{{ t.player_create }}' : '{{ t.player_save }}'" ></ button >
2026-05-26 12:55:11 +03:00
</ div >
</ div >
</ div >
</ template >
<!-- Add to Playlist Modal -->
< template x-if = "$store.playlists.picker" >
< div class = "modal-overlay" @ click . self = "$store.playlists.picker = null" >
< div class = "modal-box" >
2026-05-26 14:47:10 +03:00
< h3 > {{ t.player_add_to_playlist }}</ h3 >
2026-05-26 12:55:11 +03:00
< div class = "modal-playlist-list" >
< template x-for = "pl in $store.playlists.list.filter(p => p.kind === 'user' && p.is_own)" :key = "pl.id" >
< div class = "modal-playlist-item" @ click = "$store.playlists.addToPicked(pl.id)" >
< 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 >
< span x-text = "pl.title" ></ span >
</ div >
</ template >
</ div >
< div class = "modal-footer" >
2026-05-26 14:47:10 +03:00
< button class = "modal-btn modal-btn-ghost" @ click = "$store.playlists.picker = null" > {{ t.player_cancel }}</ button >
< button class = "modal-btn modal-btn-primary" @ click = "$store.playlists.picker = null; $store.playlists.showCreate()" > {{ t.player_new_playlist }}</ button >
2026-05-26 12:55:11 +03:00
</ div >
</ div >
</ div >
</ template >
2026-08-14 01:21:51 +01:00
<!-- Download Manager Modal -->
2026-05-26 12:55:11 +03:00
< template x-if = "$store.torrents.modal" >
< div class = "modal-overlay" @ click . self = "$store.torrents.close()" >
2026-09-01 13:52:04 +01:00
< div class = "modal-box torrent-modal"
:class = "{ 'youtube-mode': $store.torrents.sourceTab === 'youtube' }" >
2026-05-26 12:55:11 +03:00
< div class = "torrent-modal-head" >
< div >
2026-05-26 14:47:10 +03:00
< h3 > {{ t.player_torrent_manager }}</ h3 >
2026-05-26 12:55:11 +03:00
< p class = "torrent-message" style = "margin:4px 0 0"
:class = "{ error: $store.torrents.error }"
x-text = "$store.torrents.message" ></ p >
</ div >
2026-05-26 16:59:36 +03:00
< button class = "torrent-modal-close"
@ click = "$store.torrents.close()"
title = "{{ t.player_close }}"
aria-label = "{{ t.player_close }}" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2.2" >
< line x1 = "18" y1 = "6" x2 = "6" y2 = "18" />
< line x1 = "6" y1 = "6" x2 = "18" y2 = "18" />
</ svg >
</ button >
2026-05-26 12:55:11 +03:00
< div class = "torrent-client-status" >
< span class = "torrent-status-pill"
2026-08-14 01:21:51 +01:00
x-show = "$store.torrents.sourceTab === 'torrents'"
2026-05-26 12:55:11 +03:00
:class = "{ active: $store.torrents.activeCount() > 0 }"
x-text = "$store.torrents.clientSummary()" ></ span >
2026-08-14 01:21:51 +01:00
< span class = "torrent-status-pill"
x-show = "$store.torrents.sourceTab === 'youtube'"
:class = "{ active: $store.torrents.youtubeActiveCount() > 0 }"
x-text = "$store.torrents.youtubeSummary()" ></ span >
2026-05-26 14:47:10 +03:00
< span class = "torrent-status-pill torrent-agent-pill"
:class = "{ active: $store.torrents.agentBusy() }" >
< span class = "torrent-agent-dot" ></ span >
< span x-text = "$store.torrents.agentSummary()" ></ span >
</ span >
2026-05-26 12:55:11 +03:00
< span class = "torrent-status-pill"
2026-08-14 01:21:51 +01:00
x-show = "$store.torrents.sourceTab === 'torrents'"
2026-05-26 16:21:21 +03:00
x-text = "$store.torrents.sessions.length + ' ' + T.saved" ></ span >
2026-08-14 01:21:51 +01:00
< span class = "torrent-status-pill"
x-show = "$store.torrents.sourceTab === 'youtube'"
x-text = "$store.torrents.youtubeJobs.length + ' ' + T.saved" ></ span >
< span class = "torrent-status-pill"
x-show = "$store.torrents.sourceTab === 'files'"
x-text = "$store.torrents.localUploadHistory.length + ' ' + T.saved" ></ span >
2026-05-26 12:55:11 +03:00
</ div >
</ div >
2026-08-14 01:21:51 +01:00
< div class = "torrent-tabs download-source-tabs" >
2026-08-14 10:54:56 +01:00
{% if youtube_downloads_enabled %}
2026-05-28 17:34:37 +03:00
< button class = "torrent-tab-btn"
2026-08-14 01:21:51 +01:00
:class = "{ active: $store.torrents.sourceTab === 'youtube' }"
@ click = "$store.torrents.showSourceTab('youtube')" > {{ t.player_youtube }}</ button >
2026-08-14 10:54:56 +01:00
{% endif %}
{% if torrent_downloads_enabled %}
2026-05-28 17:34:37 +03:00
< button class = "torrent-tab-btn"
2026-08-14 01:21:51 +01:00
:class = "{ active: $store.torrents.sourceTab === 'torrents' }"
@ click = "$store.torrents.showSourceTab('torrents')" > {{ t.player_torrents }}</ button >
2026-08-14 10:54:56 +01:00
{% endif %}
2026-08-14 01:21:51 +01:00
< button class = "torrent-tab-btn"
:class = "{ active: $store.torrents.sourceTab === 'files' }"
@ click = "$store.torrents.showSourceTab('files')" > {{ t.player_files }}</ button >
< button class = "torrent-tab-btn"
:class = "{ active: $store.torrents.sourceTab === 'uploads' }"
@ click = "$store.torrents.showSourceTab('uploads')" >
2026-06-01 18:33:39 +03:00
< span > {{ t.player_my_uploads }}</ span >
2026-05-28 17:34:37 +03:00
< span class = "torrent-tab-count"
x-show = "$store.torrents.uploadPendingTotal + $store.torrents.uploadQueuedTotal > 0"
x-text = "$store.torrents.uploadPendingTotal + $store.torrents.uploadQueuedTotal" ></ span >
</ button >
</ div >
2026-08-14 01:21:51 +01:00
< div class = "youtube-manager-panel" x-show = "$store.torrents.sourceTab === 'youtube'" >
< form class = "youtube-download-form" @ submit . prevent = "$store.torrents.previewYoutubeUrl()" >
< label for = "youtube-download-url" > {{ t.player_youtube_url }}</ label >
< div class = "youtube-download-form-row" >
< input id = "youtube-download-url"
type = "text"
inputmode = "url"
autocomplete = "url"
x-model = "$store.torrents.youtubeUrl"
@ input = "$store.torrents.clearYoutubePreview()"
placeholder = "https://www.youtube.com/watch?v=..." >
< button type = "submit"
class = "modal-btn modal-btn-primary"
:disabled = "$store.torrents.youtubePreviewLoading || $store.torrents.youtubeSubmitting || !$store.torrents.youtubeUrl.trim()" >
< span x-text = "$store.torrents.youtubePreviewLoading ? T.youtubeParsing : T.youtubeParse" ></ span >
</ button >
</ div >
< p class = "youtube-download-hint" > {{ t.player_youtube_url_hint }}</ p >
</ form >
< template x-if = "$store.torrents.youtubePreview" >
< section class = "youtube-preview-card" >
< div class = "youtube-preview-head" >
< div >
< h4 > {{ t.player_youtube_preview_title }}</ h4 >
< p >
< strong x-text = "$store.torrents.youtubePreview.title" ></ strong >
< span > · </ span >
< span x-text = "$store.torrents.youtubePreview.items.length + ' ' + T.youtubeItems" ></ span >
</ p >
</ div >
< div class = "youtube-preview-controls" >
< button type = "button" class = "modal-btn modal-btn-ghost"
@ click = "$store.torrents.selectAllYoutubePreview()" > {{ t.player_youtube_select_all }}</ button >
< button type = "button" class = "modal-btn modal-btn-ghost"
@ click = "$store.torrents.clearYoutubePreviewSelection()" > {{ t.player_youtube_clear_selection }}</ button >
</ div >
</ div >
< div class = "youtube-preview-list" >
< template x-for = "item in $store.torrents.youtubePreview.items" :key = "item.source_id" >
< label class = "youtube-preview-row"
:class = "{ selected: $store.torrents.youtubePreviewIsSelected(item.source_id) }" >
< input type = "checkbox"
:checked = "$store.torrents.youtubePreviewIsSelected(item.source_id)"
@ change = "$store.torrents.toggleYoutubePreviewItem(item.source_id)" >
< span class = "youtube-item-index" x-text = "String(item.playlist_index).padStart(2, '0')" ></ span >
< span class = "youtube-preview-item-title" x-text = "item.title" ></ span >
</ label >
</ template >
</ div >
2026-09-01 13:52:04 +01:00
< div class = "youtube-preview-destination" >
< label for = "youtube-target-playlist" > {{ t.player_youtube_destination }}</ label >
< div class = "youtube-preview-destination-fields"
:class = "{ creating: $store.torrents.youtubePlaylistChoice === '__new__' }" >
< select id = "youtube-target-playlist"
x-model = "$store.torrents.youtubePlaylistChoice"
@ change = "$store.torrents.youtubePlaylistChoiceChanged()" >
< option value = "" > {{ t.player_youtube_no_destination }}</ option >
< template x-for = "playlist in $store.torrents.youtubeOwnedPlaylists()" :key = "playlist.id" >
< option :value = "String(playlist.id)" x-text = "playlist.title" ></ option >
</ template >
< option value = "__new__" > {{ t.player_youtube_create_playlist }}</ option >
</ select >
< template x-if = "$store.torrents.youtubePlaylistChoice === '__new__'" >
< input type = "text"
maxlength = "255"
autocomplete = "off"
x-model = "$store.torrents.youtubeNewPlaylistTitle"
placeholder = "{{ t.player_youtube_new_playlist_name }}" >
</ template >
</ div >
< p > {{ t.player_youtube_destination_hint }}</ p >
</ div >
2026-08-14 01:21:51 +01:00
< div class = "youtube-preview-footer" >
< span x-text = "$store.torrents.youtubePreviewSelectedCount() + ' ' + T.youtubeSelectedCount" ></ span >
< div >
< button type = "button" class = "modal-btn modal-btn-ghost"
@ click = "$store.torrents.clearYoutubePreview()" > {{ t.player_cancel }}</ button >
< button type = "button" class = "modal-btn modal-btn-primary"
@ click = "$store.torrents.startYoutubeDownload()"
2026-09-01 13:52:04 +01:00
:disabled = "$store.torrents.youtubeSubmitting || $store.torrents.youtubePreviewSelectedCount() === 0 || !$store.torrents.youtubeDestinationValid()" >
2026-08-14 01:21:51 +01:00
{{ t.player_youtube_start_import }}
</ button >
</ div >
</ div >
</ section >
</ template >
< div class = "youtube-download-list-head" >
< span > {{ t.player_youtube_downloads }}</ span >
< button class = "modal-btn modal-btn-ghost"
@ click = "$store.torrents.loadYoutubeJobs()"
:disabled = "$store.torrents.youtubeLoading" > {{ t.player_refresh }}</ button >
</ div >
< div class = "youtube-download-list" >
< template x-if = "!$store.torrents.youtubeLoading && $store.torrents.youtubeJobs.length === 0" >
< div class = "empty-state youtube-empty-state" >
< p > {{ t.player_no_youtube_downloads }}</ p >
</ div >
</ template >
< template x-for = "job in $store.torrents.youtubeJobs" :key = "job.id" >
2026-09-01 13:52:04 +01:00
< article class = "youtube-job-card"
:class = "{ collapsed: !$store.torrents.youtubeJobExpanded(job.id) }" >
< button type = "button"
class = "youtube-job-summary"
:aria-expanded = "$store.torrents.youtubeJobExpanded(job.id)"
:title = "$store.torrents.youtubeJobExpanded(job.id) ? T.collapse : T.expand"
@ click = "$store.torrents.toggleYoutubeJob(job.id)" >
< span class = "youtube-job-chevron" aria-hidden = "true" ></ span >
2026-08-14 01:21:51 +01:00
< div class = "youtube-job-heading" >
< div class = "youtube-job-title" x-text = "job.title" ></ div >
< div class = "youtube-job-meta" x-text = "$store.torrents.youtubeJobMeta(job)" ></ div >
</ div >
2026-09-01 13:52:04 +01:00
< span class = "youtube-job-compact-progress"
x-text = "$store.torrents.youtubeJobProgress(job) + '%'" >
</ span >
2026-08-14 01:21:51 +01:00
< span class = "torrent-status-badge"
:class = "$store.torrents.youtubeStatusClass(job.status)"
x-text = "$store.torrents.youtubeStatusLabel(job.status)" ></ span >
2026-09-01 13:52:04 +01:00
</ button >
< div class = "youtube-job-details"
x-show = "$store.torrents.youtubeJobExpanded(job.id)"
x-cloak >
2026-08-14 01:21:51 +01:00
< div class = "youtube-job-progress" >
< div class = "torrent-session-progress" >
< div class = "torrent-session-progress-bar"
:style = "'width:' + $store.torrents.youtubeJobProgress(job) + '%'" >
</ div >
</ div >
< span x-text = "$store.torrents.youtubeJobProgressText(job)" ></ span >
</ div >
< p class = "youtube-job-error" x-show = "job.error" x-text = "job.error" ></ p >
< div class = "youtube-item-list" >
< template x-for = "item in job.items" :key = "item.id" >
< div class = "youtube-item-row" :class = "{ failed: $store.torrents.youtubeIsError(item.status) }" >
< div class = "youtube-item-head" >
< span class = "youtube-item-index" x-text = "String(item.playlist_index).padStart(2, '0')" ></ span >
< div class = "youtube-item-main" >
< div class = "youtube-item-title" x-text = "item.title" ></ div >
< div class = "youtube-item-meta" x-text = "$store.torrents.youtubeItemMeta(item)" ></ div >
</ div >
< span class = "torrent-status-badge"
:class = "$store.torrents.youtubeStatusClass(item.status)"
x-text = "$store.torrents.youtubeStatusLabel(item.status)" ></ span >
</ div >
< div class = "youtube-item-download-progress" x-show = "item.status === 'downloading'" >
< div class = "torrent-session-progress" >
< div class = "torrent-session-progress-bar"
:style = "'width:' + Number(item.progress_percent || 0) + '%'" >
</ div >
</ div >
< span x-text = "$store.torrents.youtubeDownloadMeta(item)" ></ span >
</ div >
< div class = "youtube-step-list" aria-label = "{{ t.player_download_steps }}" >
< span class = "youtube-step" :class = "$store.torrents.youtubeStepClass(item, 1)" >
< i ></ i >< b > {{ t.player_downloading }}</ b >
</ span >
< span class = "youtube-step" :class = "$store.torrents.youtubeStepClass(item, 2)" >
< i ></ i >< b > FFmpeg</ b >
</ span >
< span class = "youtube-step" :class = "$store.torrents.youtubeStepClass(item, 3)" >
< i ></ i >< b > {{ t.player_ai_prefix }}</ b >
</ span >
< span class = "youtube-step" :class = "$store.torrents.youtubeStepClass(item, 4)" >
< i ></ i >< b x-text = "$store.torrents.youtubeFinalStepLabel(item)" ></ b >
</ span >
</ div >
< p class = "youtube-item-error"
x-show = "item.error"
x-text = "item.error" ></ p >
</ div >
</ template >
</ div >
< div class = "youtube-job-actions" >
< button class = "modal-btn modal-btn-ghost"
x-show = "job.review_items > 0 || job.items.some(item => item.status === 'ai_failed')"
@ click = "$store.torrents.openYoutubeReviews()" > {{ t.player_my_uploads }}</ button >
< button class = "modal-btn modal-btn-pause"
x-show = "$store.torrents.youtubeJobCancellable(job.status)"
:disabled = "$store.torrents.youtubeCancellingIds.has(job.id)"
@ click = "$store.torrents.cancelYoutubeJob(job.id)" > {{ t.player_youtube_stop }}</ button >
< button class = "modal-btn modal-btn-pause"
x-show = "job.status !== 'cancelled' && (job.items.some(item => item.status === 'failed') || (job.status === 'failed' && job.total_items === 0))"
@ click = "$store.torrents.retryYoutubeJob(job.id)" > {{ t.player_retry_failed }}</ button >
< button class = "modal-btn modal-btn-danger"
x-show = "$store.torrents.youtubeJobTerminal(job.status)"
@ click = "$store.torrents.removeYoutubeJob(job.id)" > {{ t.player_remove_from_history }}</ button >
</ div >
2026-09-01 13:52:04 +01:00
</ div >
2026-08-14 01:21:51 +01:00
</ article >
</ template >
</ div >
</ div >
< div class = "download-torrent-panel" x-show = "$store.torrents.sourceTab === 'torrents'" >
2026-05-26 12:55:11 +03:00
< div class = "torrent-manager-layout" >
< aside class = "torrent-manager-sidebar" >
< div class = "torrent-manager-title" >
2026-05-26 14:47:10 +03:00
< span > {{ t.player_saved_torrents }}</ span >
2026-05-26 12:55:11 +03:00
< button class = "modal-btn modal-btn-ghost" style = "padding:4px 8px"
@ click = "$store.torrents.loadSessions()"
2026-05-26 14:47:10 +03:00
:disabled = "$store.torrents.loading" > {{ t.player_refresh }}</ button >
2026-05-26 12:55:11 +03:00
</ div >
< div class = "torrent-session-list" >
< template x-if = "!$store.torrents.loadingSessions && $store.torrents.sessions.length === 0" >
< div class = "empty-state" style = "padding:28px 12px" >
2026-05-26 14:47:10 +03:00
< p > {{ t.player_no_saved_torrents }}</ p >
2026-05-26 12:55:11 +03:00
</ div >
</ template >
< template x-for = "job in $store.torrents.sessions" :key = "job.id" >
< div class = "torrent-session-row"
2026-05-26 16:21:21 +03:00
:class = "{ active: $store.torrents.workspaceMode === 'session' && $store.torrents.previewData && $store.torrents.previewData.id === job.id }"
2026-05-26 12:55:11 +03:00
@ click = "$store.torrents.openSession(job.id)" >
2026-05-26 14:47:10 +03:00
< div class = "torrent-session-main" >
< div class = "torrent-session-topline" >
< div class = "torrent-session-name" x-text = "job.name" ></ div >
< span class = "torrent-status-badge"
:class = "$store.torrents.statusBadgeClass(job)"
x-text = "$store.torrents.statusLabel(job)" ></ span >
</ div >
2026-05-26 12:55:11 +03:00
< div class = "torrent-session-meta" x-text = "$store.torrents.sessionMeta(job)" ></ div >
2026-05-26 14:47:10 +03:00
< div class = "torrent-session-progress" >
< div class = "torrent-session-progress-bar"
:style = "'width:' + $store.torrents.progressValue(job) + '%'" ></ div >
</ div >
2026-05-26 12:55:11 +03:00
</ div >
</ div >
</ template >
2026-05-26 16:21:21 +03:00
< button type = "button"
class = "torrent-session-row torrent-session-add"
:class = "{ active: $store.torrents.isImporting() }"
@ click = "$store.torrents.addNew()"
:disabled = "$store.torrents.loading" >
< span class = "torrent-session-add-icon" > +</ span >
2026-08-14 01:21:51 +01:00
< span > {{ t.player_add_torrent }}</ span >
2026-05-26 16:21:21 +03:00
</ button >
2026-05-26 12:55:11 +03:00
</ div >
</ aside >
< section class = "torrent-workspace" >
2026-05-26 16:21:21 +03:00
< template x-if = "$store.torrents.workspaceMode === 'empty'" >
< div class = "empty-state torrent-workspace-empty" >
< p x-text = "T.chooseSavedOrAddTorrent" ></ p >
2026-05-26 12:55:11 +03:00
</ div >
2026-05-26 16:21:21 +03:00
</ template >
< template x-if = "$store.torrents.isImporting()" >
< div class = "torrent-import-panel" >
< div class = "torrent-modal-grid" >
< div >
< label for = "torrent-magnet-input" > {{ t.player_magnet_link }}</ label >
< input id = "torrent-magnet-input" type = "text"
x-model = "$store.torrents.magnet"
placeholder = "magnet:?xt=urn:btih:..." >
</ div >
2026-05-26 16:59:36 +03:00
< div >
< label for = "torrent-file-input" > {{ t.player_torrent_file }}</ label >
< input id = "torrent-file-input" type = "file" accept = ".torrent,application/x-bittorrent"
@ change = "$store.torrents.file = $event.target.files[0] || null" >
</ div >
</ div >
2026-05-26 16:21:21 +03:00
< div class = "torrent-actions" >
< button class = "modal-btn modal-btn-primary" @ click = "$store.torrents.preview()" :disabled = "$store.torrents.loading" >
2026-05-26 16:59:36 +03:00
{{ t.player_upload_content }}
2026-05-26 16:21:21 +03:00
</ button >
</ div >
2026-05-26 12:55:11 +03:00
</ div >
2026-05-26 16:21:21 +03:00
</ template >
2026-05-26 12:55:11 +03:00
< template x-if = "$store.torrents.currentJob" >
< div class = "torrent-progress-card" >
< div class = "torrent-progress-head" >
< span x-text = "$store.torrents.statusText($store.torrents.currentJob)" ></ span >
2026-05-26 14:47:10 +03:00
< span x-text = "$store.torrents.progressValue($store.torrents.currentJob).toFixed(1) + '%'" ></ span >
2026-05-26 12:55:11 +03:00
</ div >
< div class = "torrent-progress-track" >
< div class = "torrent-progress-bar"
2026-05-26 14:47:10 +03:00
:style = "'width:' + $store.torrents.progressValue($store.torrents.currentJob) + '%'" ></ div >
2026-05-26 12:55:11 +03:00
</ div >
2026-05-26 16:21:21 +03:00
< div class = "torrent-progress-details"
:class = "{ completed: $store.torrents.isCompleted($store.torrents.currentJob) }" >
< span class = "torrent-progress-metric" >
< span class = "torrent-progress-label"
x-text = "$store.torrents.isCompleted($store.torrents.currentJob) ? T.size : T.downloaded" ></ span >
< span class = "torrent-progress-value"
x-text = "$store.torrents.progressDetailText($store.torrents.currentJob)" ></ span >
</ span >
< span class = "torrent-progress-metric"
x-show = "!$store.torrents.isCompleted($store.torrents.currentJob)" >
< span class = "torrent-progress-label" x-text = "T.speed" ></ span >
< span class = "torrent-progress-value"
x-text = "$store.torrents.speedText($store.torrents.currentJob)" ></ span >
</ span >
< span class = "torrent-progress-metric"
x-show = "!$store.torrents.isCompleted($store.torrents.currentJob)" >
< span class = "torrent-progress-label" x-text = "T.peers" ></ span >
< span class = "torrent-progress-value"
x-text = "$store.torrents.peerText($store.torrents.currentJob)" ></ span >
</ span >
< span class = "torrent-progress-metric"
x-show = "!$store.torrents.isCompleted($store.torrents.currentJob) && $store.torrents.etaText($store.torrents.currentJob)" >
< span class = "torrent-progress-label" x-text = "T.eta" ></ span >
< span class = "torrent-progress-value"
x-text = "$store.torrents.etaText($store.torrents.currentJob)" ></ span >
</ span >
2026-05-26 12:55:11 +03:00
</ div >
</ div >
</ template >
< template x-if = "$store.torrents.previewData" >
< div class = "torrent-preview-panel" >
< div class = "torrent-preview-head" >
< div style = "min-width:0" >
< div class = "torrent-preview-title" x-text = "$store.torrents.previewData.name" ></ div >
< div class = "torrent-preview-meta"
2026-05-26 14:47:10 +03:00
x-text = "$store.torrents.previewData.files.length + ' {{ t.player_files_count }} - ' + $store.torrents.bytes($store.torrents.previewData.total_size)" ></ div >
2026-05-26 12:55:11 +03:00
</ div >
2026-05-26 16:59:36 +03:00
< div class = "torrent-preview-actions" >
< button class = "modal-btn"
:class = "$store.torrents.actionButtonClass()"
@ click = "$store.torrents.toggleDownloadAction()"
:disabled = "$store.torrents.actionButtonDisabled()" >
< span x-text = "$store.torrents.actionButtonText()" ></ span >
</ button >
< button class = "modal-btn modal-btn-danger"
@ click = "$store.torrents.removeSession($store.torrents.previewData.id)"
:disabled = "$store.torrents.loading" >
2026-08-14 01:21:51 +01:00
{{ t.player_remove_from_history }}
2026-05-26 16:59:36 +03:00
</ button >
</ div >
2026-05-26 12:55:11 +03:00
</ div >
2026-11-12 11:52:38 +00:00
< div class = "youtube-preview-destination" >
< label for = "torrent-target-playlist" > {{ t.player_import_destination }}</ label >
< div class = "youtube-preview-destination-fields" :class = "{ creating: $store.torrents.torrentPlaylistChoice === '__new__' }" >
< select id = "torrent-target-playlist" x-model = "$store.torrents.torrentPlaylistChoice" @ change = "$store.torrents.importPlaylistChoiceChanged('torrent')" :disabled = "$store.torrents.torrentDestinationLocked()" >
< option value = "" > {{ t.player_youtube_no_destination }}</ option >
< template x-for = "playlist in $store.torrents.youtubeOwnedPlaylists()" :key = "playlist.id" >< option :value = "String(playlist.id)" x-text = "playlist.title" ></ option ></ template >
< option value = "__new__" > {{ t.player_youtube_create_playlist }}</ option >
</ select >
< template x-if = "$store.torrents.torrentPlaylistChoice === '__new__'" >< input type = "text" maxlength = "255" autocomplete = "off" x-model = "$store.torrents.torrentNewPlaylistTitle" placeholder = "{{ t.player_youtube_new_playlist_name }}" :disabled = "$store.torrents.torrentDestinationLocked()" ></ template >
</ div >
< p > {{ t.player_import_destination_hint }}</ p >
</ div >
2026-05-26 12:55:11 +03:00
< div class = "torrent-tree-toolbar" >
< div class = "torrent-selected-summary"
2026-05-26 14:47:10 +03:00
x-text = "$store.torrents.selected.size + ' {{ t.player_selected }} - ' + $store.torrents.bytes($store.torrents.selectedBytes())" ></ div >
2026-05-26 12:55:11 +03:00
< div class = "torrent-actions" style = "margin-top:0" >
2026-05-26 14:47:10 +03:00
< button class = "modal-btn modal-btn-ghost" @ click = "$store.torrents.expandAll(true)" > {{ t.player_expand_all }}</ button >
< button class = "modal-btn modal-btn-ghost" @ click = "$store.torrents.expandAll(false)" > {{ t.player_collapse }}</ button >
2026-05-26 12:55:11 +03:00
</ div >
</ div >
< div class = "torrent-file-tree" >
< template x-for = "node in $store.torrents.visibleNodes()" :key = "node.key" >
< div class = "torrent-tree-row" :style = "'--indent:' + $store.torrents.rowIndent(node) + 'px'" >
< button class = "torrent-tree-toggle"
:class = "{ expanded: $store.torrents.expanded.has(node.key) }"
@ click = "$store.torrents.toggleExpand(node)"
:style = "node.type === 'folder' ? '' : 'visibility:hidden'" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" >
< polyline points = "9 18 15 12 9 6" />
</ svg >
</ button >
< button class = "torrent-tree-check"
:class = "$store.torrents.nodeCheckClass(node)"
@ click = "$store.torrents.toggleNode(node)" >
< template x-if = "$store.torrents.nodeState(node) === 'checked'" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >
< polyline points = "20 6 9 17 4 12" />
</ svg >
</ template >
< template x-if = "$store.torrents.nodeState(node) === 'partial'" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >
< line x1 = "5" y1 = "12" x2 = "19" y2 = "12" />
</ svg >
</ template >
</ button >
< div class = "torrent-tree-label" :title = "node.name" >
< template x-if = "node.type === 'folder'" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" >
< path d = "M3 7a2 2 0 012-2h5l2 2h7a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z" />
</ svg >
</ template >
< template x-if = "node.type === 'file'" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" >
< path d = "M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z" />
< polyline points = "14 2 14 8 20 8" />
</ svg >
</ template >
< span class = "torrent-file-name" x-text = "node.name" ></ span >
</ div >
< span class = "torrent-file-size" x-text = "$store.torrents.bytes(node.size)" ></ span >
</ div >
</ template >
</ div >
</ div >
</ template >
</ section >
</ div >
2026-08-14 01:21:51 +01:00
</ div >
2026-05-28 17:34:37 +03:00
2026-08-14 01:21:51 +01:00
< section class = "file-upload-panel" x-show = "$store.torrents.sourceTab === 'files'" >
< input id = "direct-audio-file-input"
class = "file-upload-input"
type = "file"
multiple
accept = "audio/*,.mp3,.flac,.wav,.m4a,.ogg,.opus,.aac"
2026-10-15 00:29:37 +01:00
:disabled = "$store.torrents.localFilesUploading"
@ change = "$store.torrents.setLocalFiles($event.target.files); $event.target.value = ''" >
< input id = "direct-audio-folder-input"
class = "file-upload-input"
type = "file"
webkitdirectory
multiple
:disabled = "$store.torrents.localFilesUploading"
2026-08-14 01:21:51 +01:00
@ change = "$store.torrents.setLocalFiles($event.target.files); $event.target.value = ''" >
< label class = "file-drop-zone"
for = "direct-audio-file-input"
:class = "{ dragging: $store.torrents.localFilesDragging }"
@ dragenter . prevent = "$store.torrents.localFilesDragging = true"
@ dragover . prevent = "$store.torrents.localFilesDragging = true"
@ dragleave . prevent = "$store.torrents.leaveLocalFileDrop($event)"
@ drop . prevent = "$store.torrents.dropLocalFiles($event)" >
< span class = "file-drop-icon" aria-hidden = "true" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "1.8" >
< path d = "M12 16V4" />< polyline points = "7 9 12 4 17 9" />
< path d = "M5 14v4a2 2 0 002 2h10a2 2 0 002-2v-4" />
</ svg >
</ span >
< strong > {{ t.player_drop_audio_title }}</ strong >
< span > {{ t.player_drop_audio_hint }}</ span >
< small > {{ t.player_drop_audio_formats }}</ small >
</ label >
2026-10-15 00:29:37 +01:00
< div class = "file-upload-picker-actions" >
< button type = "button" class = "modal-btn modal-btn-ghost"
:disabled = "$store.torrents.localFilesUploading"
@ click = "document.getElementById('direct-audio-file-input').click()" > {{ t.player_choose_audio_files }}</ button >
< button type = "button" class = "modal-btn modal-btn-ghost"
:disabled = "$store.torrents.localFilesUploading"
@ click = "document.getElementById('direct-audio-folder-input').click()" > {{ t.player_choose_audio_folder }}</ button >
< small > {{ t.player_audio_folder_hint }}</ small >
</ div >
2026-08-14 01:21:51 +01:00
2026-11-12 11:52:38 +00:00
< div class = "youtube-preview-destination" x-show = "$store.torrents.localFiles.length > 0" >
< label for = "local-target-playlist" > {{ t.player_import_destination }}</ label >
< div class = "youtube-preview-destination-fields" :class = "{ creating: $store.torrents.localPlaylistChoice === '__new__' }" >
< select id = "local-target-playlist" x-model = "$store.torrents.localPlaylistChoice" @ change = "$store.torrents.importPlaylistChoiceChanged('local')" :disabled = "$store.torrents.localFilesUploading || $store.torrents.localPlaylistLocked" >
< option value = "" > {{ t.player_youtube_no_destination }}</ option >
< template x-for = "playlist in $store.torrents.youtubeOwnedPlaylists()" :key = "playlist.id" >< option :value = "String(playlist.id)" x-text = "playlist.title" ></ option ></ template >
< option value = "__new__" > {{ t.player_youtube_create_playlist }}</ option >
</ select >
< template x-if = "$store.torrents.localPlaylistChoice === '__new__'" >< input type = "text" maxlength = "255" autocomplete = "off" x-model = "$store.torrents.localNewPlaylistTitle" placeholder = "{{ t.player_youtube_new_playlist_name }}" :disabled = "$store.torrents.localFilesUploading || $store.torrents.localPlaylistLocked" ></ template >
</ div >
< p > {{ t.player_import_destination_hint }}</ p >
</ div >
2026-08-14 01:21:51 +01:00
< div class = "file-upload-selection" x-show = "$store.torrents.localFiles.length > 0" >
< span x-text = "$store.torrents.localUploadSummary()" ></ span >
< div >
< button type = "button" class = "modal-btn modal-btn-ghost"
@ click = "$store.torrents.clearLocalFiles()"
:disabled = "$store.torrents.localFilesUploading" > {{ t.player_cancel }}</ button >
< button type = "button" class = "modal-btn modal-btn-primary"
@ click = "$store.torrents.uploadLocalFiles()"
2026-11-12 11:52:38 +00:00
:disabled = "$store.torrents.localFilesUploading || !$store.torrents.importDestinationValid('local')" > {{ t.player_upload_selected_files }}</ button >
2026-08-14 01:21:51 +01:00
</ div >
</ div >
< div class = "torrent-upload-progress"
x-show = "$store.torrents.localFilesUploading || $store.torrents.uploadProgress > 0" >
< div class = "torrent-progress-head" >
< span x-text = "$store.torrents.uploadProgress >= 100 ? T.uploadComplete : T.uploadingFiles" ></ span >
< span x-text = "$store.torrents.uploadProgressText" ></ span >
</ div >
< div class = "torrent-progress-track" >
< div class = "torrent-progress-bar"
:style = "'width:' + $store.torrents.uploadProgress + '%'" ></ div >
</ div >
</ div >
< div class = "youtube-download-list-head file-upload-history-head" >
< span > {{ t.player_upload_history }}</ span >
< button class = "modal-btn modal-btn-ghost"
@ click = "$store.torrents.loadLocalUploadHistory()"
:disabled = "$store.torrents.localUploadHistoryLoading" > {{ t.player_refresh }}</ button >
</ div >
< div class = "file-upload-history" >
< template x-if = "!$store.torrents.localUploadHistoryLoading && $store.torrents.localUploadHistory.length === 0" >
< div class = "empty-state youtube-empty-state" >< p > {{ t.player_no_file_uploads }}</ p ></ div >
</ template >
< template x-for = "item in $store.torrents.localUploadHistory" :key = "item.id" >
< article class = "file-upload-history-row" >
< div class = "file-upload-history-main" >
< div class = "file-upload-history-title" x-text = "item.filename" ></ div >
< div class = "file-upload-history-meta"
x-text = "$store.torrents.bytes(item.size_bytes) + ' · ' + $store.torrents.formatUploadDate(item.created_at)" ></ div >
2026-11-12 11:52:38 +00:00
< div class = "file-upload-history-meta" x-show = "item.target_playlist_id" x-text = "T.youtubePlaylist + ': ' + ($store.torrents.youtubePlaylistTitle(item.target_playlist_id) || '#' + item.target_playlist_id)" ></ div >
2026-08-14 01:21:51 +01:00
< p class = "youtube-item-error" x-show = "item.error" x-text = "item.error" ></ p >
</ div >
< span class = "torrent-status-badge"
:class = "$store.torrents.youtubeStatusClass(item.status)"
x-text = "$store.torrents.youtubeStatusLabel(item.status)" ></ span >
< button class = "modal-btn modal-btn-danger"
@ click = "$store.torrents.removeLocalUploadHistory(item.id)" > {{ t.player_remove_from_history }}</ button >
</ article >
</ template >
</ div >
</ section >
< template x-if = "$store.torrents.sourceTab === 'uploads'" >
2026-05-28 17:34:37 +03:00
< section class = "upload-manager-panel" >
< div class = "upload-manager-head" >
< div >
2026-06-01 18:33:39 +03:00
< h4 > {{ t.player_my_uploaded_tracks }}</ h4 >
2026-05-28 17:34:37 +03:00
< p x-text = "$store.torrents.uploadSummary()" ></ p >
</ div >
< button class = "modal-btn modal-btn-ghost"
@ click = "$store.torrents.loadUploads()"
:disabled = "$store.torrents.uploadHasEditorOpen()" > {{ t.player_refresh }}</ button >
</ div >
< template x-if = "$store.torrents.uploadLoaded && $store.torrents.uploadTracks.length === 0 && $store.torrents.uploadPending.length === 0 && $store.torrents.uploadQueued.length === 0" >
< div class = "empty-state torrent-workspace-empty" >
2026-06-01 18:33:39 +03:00
< p > {{ t.player_no_uploaded_tracks }}</ p >
2026-05-28 17:34:37 +03:00
</ div >
</ template >
< div class = "upload-manager-grid" >
< aside class = "upload-review-column" >
< div class = "upload-panel-card" >
2026-06-01 18:33:39 +03:00
< div class = "upload-panel-title" > {{ t.player_needs_approval }}</ div >
< p class = "upload-panel-subtitle" x-text = "$store.torrents.uploadPendingTotal + ' {{ t.player_pending_or_failed }}'" ></ p >
2026-05-28 17:34:37 +03:00
< template x-if = "$store.torrents.uploadPending.length === 0" >
2026-06-01 18:33:39 +03:00
< div class = "upload-mini-empty" > {{ t.player_no_tracks_need_approval }}</ div >
2026-05-28 17:34:37 +03:00
</ template >
< div class = "upload-review-list" >
< template x-for = "item in $store.torrents.uploadPending" :key = "item.id" >
< button class = "upload-review-row" :class = "{ active: $store.torrents.uploadReviewEditId === item.id, failed: item.status === 'failed' }" @ click = "$store.torrents.editUploadReview(item)" >
2026-06-01 18:33:39 +03:00
< span class = "torrent-status-badge" :class = "'status-' + item.status" x-text = "$store.torrents.uploadStatusLabel(item.status)" ></ span >
2026-05-28 17:34:37 +03:00
< span class = "upload-review-name" x-text = "item.filename" ></ span >
< span class = "upload-review-error" x-show = "item.error_message" x-text = "item.error_message" ></ span >
</ button >
</ template >
</ div >
</ div >
< template x-if = "$store.torrents.uploadQueuedTotal > 0" >
< div class = "upload-panel-card upload-queue-panel" >
2026-06-01 18:33:39 +03:00
< div class = "upload-panel-title upload-panel-title-row" >
< span > {{ t.player_queued_processing }}</ span >
< div class = "upload-queue-nav" x-show = "$store.torrents.uploadQueued.length > $store.torrents.uploadQueuePageSize" >
< span class = "upload-queue-range" x-text = "$store.torrents.uploadQueueRangeText()" ></ span >
< button type = "button"
class = "upload-queue-nav-btn"
@ click = "$store.torrents.uploadQueuePrev()"
:disabled = "!$store.torrents.uploadQueueCanPrev()"
title = "{{ t.player_previous }}" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2.4" >< polyline points = "15 18 9 12 15 6" /></ svg >
</ button >
< button type = "button"
class = "upload-queue-nav-btn"
@ click = "$store.torrents.uploadQueueNext()"
:disabled = "!$store.torrents.uploadQueueCanNext()"
title = "{{ t.player_next }}" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2.4" >< polyline points = "9 18 15 12 9 6" /></ svg >
</ button >
</ div >
</ div >
2026-05-28 17:34:37 +03:00
< template x-for = "item in $store.torrents.compactQueuedUploads()" :key = "item.id" >
2026-06-01 18:33:39 +03:00
< div class = "upload-queue-row" :title = "$store.torrents.uploadQueueTooltip(item)" >
< span class = "torrent-status-badge" :class = "'status-' + item.status" x-text = "$store.torrents.uploadStatusLabel(item.status)" ></ span >
2026-05-28 17:34:37 +03:00
< span class = "upload-queue-name" x-text = "item.filename" ></ span >
</ div >
</ template >
2026-06-01 18:33:39 +03:00
< div class = "upload-mini-empty" x-show = "$store.torrents.uploadQueuedTotal > $store.torrents.uploadQueued.length" x-text = "$store.torrents.uploadQueueOverflowText()" ></ div >
2026-05-28 17:34:37 +03:00
</ div >
</ template >
</ aside >
< section class = "upload-library-column" >
< div class = "upload-bulk-bar" x-show = "$store.torrents.uploadSelectedCount() > 0" >
2026-06-01 18:33:39 +03:00
< div class = "upload-bulk-title" x-text = "$store.torrents.uploadSelectedCount() + ' {{ t.player_selected }}'" ></ div >
< input type = "text" placeholder = "{{ t.player_artists }}" x-model = "$store.torrents.uploadBulkDraft.artists" >
< input type = "text" placeholder = "{{ t.player_featured }}" x-model = "$store.torrents.uploadBulkDraft.featured_artists" >
< input type = "text" placeholder = "{{ t.player_album }}" x-model = "$store.torrents.uploadBulkDraft.release_title" >
< input type = "number" placeholder = "{{ t.player_year }}" x-model = "$store.torrents.uploadBulkDraft.release_year" >
2026-05-28 17:34:37 +03:00
< select x-model = "$store.torrents.uploadBulkDraft.release_type" >
2026-06-01 18:33:39 +03:00
< option value = "" > {{ t.player_type_unchanged }}</ option >< option value = "album" > {{ t.player_release_type_album }}</ option >< option value = "single" > {{ t.player_release_type_single }}</ option >< option value = "ep" > {{ t.player_release_type_ep }}</ option >< option value = "compilation" > {{ t.player_release_type_compilation }}</ option >< option value = "mixtape" > {{ t.player_release_type_mixtape }}</ option >< option value = "live" > {{ t.player_release_type_live }}</ option >< option value = "soundtrack" > {{ t.player_release_type_soundtrack }}</ option >< option value = "remix" > {{ t.player_release_type_remix }}</ option >< option value = "demo" > {{ t.player_release_type_demo }}</ option >
2026-05-28 17:34:37 +03:00
</ select >
< select x-model = "$store.torrents.uploadBulkDraft.hidden" >
2026-06-01 18:33:39 +03:00
< option value = "" > {{ t.player_visibility_unchanged }}</ option >< option value = "false" > {{ t.player_visible }}</ option >< option value = "true" > {{ t.player_hidden }}</ option >
2026-05-28 17:34:37 +03:00
</ select >
2026-06-01 18:33:39 +03:00
< button class = "modal-btn modal-btn-primary" @ click = "$store.torrents.saveUploadBulkEdit()" :disabled = "$store.torrents.uploadBulkSaving" > {{ t.player_apply }}</ button >
< button class = "modal-btn modal-btn-ghost" @ click = "$store.torrents.clearUploadSelection()" > {{ t.player_clear }}</ button >
2026-05-28 17:34:37 +03:00
</ div >
< div class = "upload-release-tree" >
2026-06-01 18:33:39 +03:00
< template x-for = "group in $store.torrents.uploadArtistGroups()" :key = "group.key" >
< section class = "upload-artist-group" >
< div class = "upload-artist-row" >
< div class = "upload-artist-name" x-text = "group.name" ></ div >
< div class = "upload-artist-meta" x-text = "group.releases.length + ' {{ t.player_releases_count }} - ' + group.trackCount + ' {{ t.player_tracks_count }}'" ></ div >
2026-05-28 17:34:37 +03:00
</ div >
2026-06-01 18:33:39 +03:00
< template x-for = "release in group.releases" :key = "release.id" >
< div class = "upload-release-node" :class = "{ hidden: release.is_hidden }" >
< div class = "upload-release-row" >
< button class = "torrent-tree-check" :class = "$store.torrents.uploadReleaseSelectionState(release)" @ click = "$store.torrents.toggleUploadReleaseSelection(release)" >
< template x-if = "$store.torrents.uploadReleaseSelectionState(release) === 'checked'" >< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< polyline points = "20 6 9 17 4 12" /></ svg ></ template >
< template x-if = "$store.torrents.uploadReleaseSelectionState(release) === 'partial'" >< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "3" >< line x1 = "5" y1 = "12" x2 = "19" y2 = "12" /></ svg ></ template >
2026-05-28 17:34:37 +03:00
</ button >
2026-06-01 18:33:39 +03:00
< button class = "torrent-tree-toggle" :class = "{ expanded: $store.torrents.uploadReleaseExpanded(release.id) }" @ click = "$store.torrents.toggleUploadRelease(release.id)" >< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" >< polyline points = "9 18 15 12 9 6" /></ svg ></ button >
< div class = "upload-release-main" >
< div class = "upload-release-title" >< span x-text = "release.title" ></ span >< span class = "upload-hidden-pill" x-show = "release.is_hidden" > {{ t.player_hidden }}</ span ></ div >
< div class = "upload-track-meta" >< span x-text = "$store.torrents.uploadReleaseArtistsText(release)" ></ span >< span > -</ span >< span x-text = "release.year || T.noYear" ></ span >< span > -</ span >< span x-text = "release.tracks.length + ' {{ t.player_tracks_count }}'" ></ span ></ div >
2026-05-28 17:34:37 +03:00
</ div >
2026-06-01 18:33:39 +03:00
< button class = "modal-btn modal-btn-ghost" @ click = "$store.torrents.editUploadRelease(release)" > {{ t.player_edit_release }}</ button >
2026-05-28 17:34:37 +03:00
</ div >
2026-06-01 18:33:39 +03:00
< div class = "upload-track-children" x-show = "$store.torrents.uploadReleaseExpanded(release.id)" >
< template x-for = "item in release.tracks" :key = "item.track.id" >
< div class = "upload-tree-track" :class = "{ hidden: item.is_hidden, selected: $store.torrents.selectedUploadTracks.has(item.track.id) }" >
< 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 >
< 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" > {{ t.player_hidden }}</ span ></ div >
< div class = "upload-track-meta" >< span x-text = "$store.torrents.uploadArtistsText(item)" ></ span >< span x-show = "$store.torrents.uploadFeaturedArtistsText(item)" x-text = "T.featuredShort" ></ 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 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)" > {{ t.player_edit }}</ button >
</ div >
</ div >
</ template >
</ div >
</ div >
</ template >
</ section >
2026-05-28 17:34:37 +03:00
</ template >
</ div >
</ section >
</ div >
< template x-if = "$store.torrents.uploadHasEditorOpen()" >
< div class = "upload-editor-backdrop" @ click . self = "$store.torrents.closeUploadEditor()" >
< aside class = "upload-editor-drawer" >
< div class = "upload-editor-head" >
< div >
< div class = "upload-panel-title" x-text = "$store.torrents.uploadEditorKicker()" ></ div >
< h4 x-text = "$store.torrents.uploadEditorTitle()" ></ h4 >
</ div >
2026-06-01 18:33:39 +03:00
< button class = "track-action-btn" @ click = "$store.torrents.closeUploadEditor()" title = "{{ t.player_close }}" >
2026-05-28 17:34:37 +03:00
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2.4" >
< path d = "M18 6L6 18M6 6l12 12" />
</ svg >
</ button >
</ div >
< template x-if = "$store.torrents.uploadReviewDraft" >
< div class = "upload-editor-form" >
2026-06-01 18:33:39 +03:00
< label class = "upload-field upload-field-half" >< span > {{ t.player_title }}</ span >< input type = "text" x-model = "$store.torrents.uploadReviewDraft.title" ></ label >
< label class = "upload-field upload-field-half" >< span > {{ t.player_artist }}</ span >< input type = "text" x-model = "$store.torrents.uploadReviewDraft.artist" ></ label >
< label class = "upload-field upload-field-half" >< span > {{ t.player_album }}</ span >< input type = "text" x-model = "$store.torrents.uploadReviewDraft.album" ></ label >
< label class = "upload-field upload-field-half" >< span > {{ t.player_featured }}</ span >< input type = "text" x-model = "$store.torrents.uploadReviewDraft.featured_artists" placeholder = "{{ t.player_artists_placeholder }}" ></ label >
< label class = "upload-field upload-field-compact" >< span > {{ t.player_year }}</ span >< input type = "number" x-model = "$store.torrents.uploadReviewDraft.year" ></ label >
< label class = "upload-field upload-field-compact" >< span > {{ t.player_track_number }}</ span >< input type = "number" min = "1" x-model = "$store.torrents.uploadReviewDraft.track_number" ></ label >
< label class = "upload-field upload-field-compact" >< span > {{ t.player_genre }}</ span >< input type = "text" x-model = "$store.torrents.uploadReviewDraft.genre" ></ label >
2026-05-28 17:34:37 +03:00
< label class = "upload-field upload-field-compact" >
2026-06-01 18:33:39 +03:00
< span > {{ t.player_type }}</ span >
2026-05-28 17:34:37 +03:00
< select x-model = "$store.torrents.uploadReviewDraft.release_type" >
2026-06-01 18:33:39 +03:00
< option value = "album" > {{ t.player_release_type_album }}</ option >< option value = "single" > {{ t.player_release_type_single }}</ option >< option value = "ep" > {{ t.player_release_type_ep }}</ option >< option value = "compilation" > {{ t.player_release_type_compilation }}</ option >< option value = "mixtape" > {{ t.player_release_type_mixtape }}</ option >< option value = "live" > {{ t.player_release_type_live }}</ option >< option value = "soundtrack" > {{ t.player_release_type_soundtrack }}</ option >< option value = "remix" > {{ t.player_release_type_remix }}</ option >< option value = "demo" > {{ t.player_release_type_demo }}</ option >
2026-05-28 17:34:37 +03:00
</ select >
</ label >
2026-06-01 18:33:39 +03:00
< label class = "upload-field upload-field-wide" >< span > {{ t.player_notes }}</ span >< textarea rows = "4" x-model = "$store.torrents.uploadReviewDraft.notes" ></ textarea ></ label >
2026-05-28 17:34:37 +03:00
< div class = "upload-editor-actions" >
2026-06-01 18:33:39 +03:00
< button class = "modal-btn modal-btn-danger" @ click = "$store.torrents.deleteUploadReview()" :disabled = "$store.torrents.uploadReviewSavingId === $store.torrents.uploadReviewEditId" > {{ t.player_delete_review }}</ button >
< button class = "modal-btn modal-btn-primary" @ click = "$store.torrents.approveUploadReview()" :disabled = "$store.torrents.uploadReviewSavingId === $store.torrents.uploadReviewEditId" > {{ t.player_approve }}</ button >
2026-05-28 17:34:37 +03:00
</ div >
</ div >
</ template >
< template x-if = "$store.torrents.uploadReleaseDraft" >
< div class = "upload-editor-form" >
2026-06-01 18:33:39 +03:00
< label class = "upload-field upload-field-wide" >< span > {{ t.player_album }}</ span >< input type = "text" x-model = "$store.torrents.uploadReleaseDraft.title" ></ label >
< label class = "upload-field upload-field-wide" >< span > {{ t.player_album_artists }}</ span >< input type = "text" x-model = "$store.torrents.uploadReleaseDraft.artists" ></ label >
< label class = "upload-field upload-field-half" >< span > {{ t.player_year }}</ span >< input type = "number" x-model = "$store.torrents.uploadReleaseDraft.year" ></ label >
< label class = "upload-field upload-field-half" >< span > {{ t.player_type }}</ span >< select x-model = "$store.torrents.uploadReleaseDraft.release_type" >< option value = "album" > {{ t.player_release_type_album }}</ option >< option value = "single" > {{ t.player_release_type_single }}</ option >< option value = "ep" > {{ t.player_release_type_ep }}</ option >< option value = "compilation" > {{ t.player_release_type_compilation }}</ option >< option value = "mixtape" > {{ t.player_release_type_mixtape }}</ option >< option value = "live" > {{ t.player_release_type_live }}</ option >< option value = "soundtrack" > {{ t.player_release_type_soundtrack }}</ option >< option value = "remix" > {{ t.player_release_type_remix }}</ option >< option value = "demo" > {{ t.player_release_type_demo }}</ option ></ select ></ label >
< label class = "upload-field upload-field-toggle" >< input type = "checkbox" x-model = "$store.torrents.uploadReleaseDraft.is_hidden" >< span > {{ t.player_hidden }}</ span ></ label >
2026-05-28 17:34:37 +03:00
< div class = "upload-editor-actions" >
2026-06-01 18:33:39 +03:00
< button class = "modal-btn modal-btn-primary" @ click = "$store.torrents.saveUploadReleaseEdit()" :disabled = "$store.torrents.uploadReleaseSavingId === $store.torrents.uploadReleaseEditId" > {{ t.player_save_release }}</ button >
2026-05-28 17:34:37 +03:00
</ div >
</ div >
</ template >
< template x-if = "$store.torrents.uploadDraft" >
< div class = "upload-editor-form" >
2026-06-01 18:33:39 +03:00
< label class = "upload-field upload-field-wide" >< span > {{ t.player_title }}</ span >< input type = "text" x-model = "$store.torrents.uploadDraft.title" ></ label >
< label class = "upload-field upload-field-half" >< span > {{ t.player_artists }}</ span >< input type = "text" x-model = "$store.torrents.uploadDraft.artists" ></ label >
< label class = "upload-field upload-field-half" >< span > {{ t.player_featured }}</ span >< input type = "text" x-model = "$store.torrents.uploadDraft.featured_artists" ></ label >
< label class = "upload-field upload-field-half" >< span > {{ t.player_album }}</ span >< input type = "text" x-model = "$store.torrents.uploadDraft.release_title" ></ label >
< label class = "upload-field upload-field-half" >< span > {{ t.player_type }}</ span >< select x-model = "$store.torrents.uploadDraft.release_type" >< option value = "album" > {{ t.player_release_type_album }}</ option >< option value = "single" > {{ t.player_release_type_single }}</ option >< option value = "ep" > {{ t.player_release_type_ep }}</ option >< option value = "compilation" > {{ t.player_release_type_compilation }}</ option >< option value = "mixtape" > {{ t.player_release_type_mixtape }}</ option >< option value = "live" > {{ t.player_release_type_live }}</ option >< option value = "soundtrack" > {{ t.player_release_type_soundtrack }}</ option >< option value = "remix" > {{ t.player_release_type_remix }}</ option >< option value = "demo" > {{ t.player_release_type_demo }}</ option ></ select ></ label >
< label class = "upload-field upload-field-compact" >< span > {{ t.player_year }}</ span >< input type = "number" x-model = "$store.torrents.uploadDraft.release_year" ></ label >
< label class = "upload-field upload-field-compact" >< span > {{ t.player_track_number }}</ span >< input type = "number" min = "1" x-model = "$store.torrents.uploadDraft.track_number" ></ label >
< label class = "upload-field upload-field-compact" >< span > {{ t.player_disc_number }}</ span >< input type = "number" min = "1" x-model = "$store.torrents.uploadDraft.disc_number" ></ label >
< label class = "upload-field upload-field-toggle" >< input type = "checkbox" x-model = "$store.torrents.uploadDraft.is_hidden" >< span > {{ t.player_hidden }}</ span ></ label >
2026-05-28 17:34:37 +03:00
< div class = "upload-editor-actions" >
2026-06-01 18:33:39 +03:00
< button class = "modal-btn modal-btn-primary" @ click = "$store.torrents.saveUploadEdit()" :disabled = "$store.torrents.uploadSavingId === $store.torrents.uploadEditId" > {{ t.player_save_track }}</ button >
2026-05-28 17:34:37 +03:00
</ div >
</ div >
</ template >
</ aside >
</ div >
</ template >
< div class = "upload-track-list" x-show = "false" >
< template x-for = "item in $store.torrents.uploadTracks" :key = "item.track.id" >
< div class = "upload-track-card" :class = "{ hidden: item.is_hidden }" >
< template x-if = "$store.torrents.uploadEditId !== item.track.id" >
< div class = "upload-track-display" >
< div class = "upload-track-main" >
< div class = "upload-track-title" >
< span x-text = "item.track.title" ></ span >
2026-06-01 18:33:39 +03:00
< span class = "upload-hidden-pill" x-show = "item.is_hidden" > {{ t.player_hidden }}</ span >
2026-05-28 17:34:37 +03:00
</ div >
< div class = "upload-track-meta" >
< span x-text = "$store.torrents.uploadArtistsText(item)" ></ span >
< span > ·</ span >
< span x-text = "item.track.release_title" ></ span >
< span x-show = "item.track.track_number" > ·</ span >
< span x-show = "item.track.track_number" x-text = "'#' + item.track.track_number" ></ span >
</ div >
</ div >
< div class = "upload-track-actions" >
2026-05-29 01:13:04 +03:00
< 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 >
2026-05-28 17:34:37 +03:00
</ button >
2026-06-01 18:33:39 +03:00
< button class = "modal-btn modal-btn-ghost" @ click = "$store.torrents.editUpload(item)" > {{ t.player_edit }}</ button >
2026-05-28 17:34:37 +03:00
</ div >
</ div >
</ template >
< template x-if = "$store.torrents.uploadEditId === item.track.id" >
< div class = "upload-edit-form" >
< label >
2026-06-01 18:33:39 +03:00
< span > {{ t.player_title }}</ span >
2026-05-28 17:34:37 +03:00
< input type = "text" x-model = "$store.torrents.uploadDraft.title" >
</ label >
< label >
2026-06-01 18:33:39 +03:00
< span > {{ t.player_artists }}</ span >
< input type = "text" x-model = "$store.torrents.uploadDraft.artists" placeholder = "{{ t.player_artist_featured_placeholder }}" >
2026-05-28 17:34:37 +03:00
</ label >
< label >
2026-06-01 18:33:39 +03:00
< span > {{ t.player_release }}</ span >
2026-05-28 17:34:37 +03:00
< input type = "text" x-model = "$store.torrents.uploadDraft.release_title" >
</ label >
< label >
2026-06-01 18:33:39 +03:00
< span > {{ t.player_type }}</ span >
2026-05-28 17:34:37 +03:00
< select x-model = "$store.torrents.uploadDraft.release_type" >
2026-06-01 18:33:39 +03:00
< option value = "album" > {{ t.player_release_type_album }}</ option >
< option value = "single" > {{ t.player_release_type_single }}</ option >
< option value = "ep" > {{ t.player_release_type_ep }}</ option >
< option value = "compilation" > {{ t.player_release_type_compilation }}</ option >
< option value = "mixtape" > {{ t.player_release_type_mixtape }}</ option >
< option value = "live" > {{ t.player_release_type_live }}</ option >
< option value = "soundtrack" > {{ t.player_release_type_soundtrack }}</ option >
< option value = "remix" > {{ t.player_release_type_remix }}</ option >
< option value = "demo" > {{ t.player_release_type_demo }}</ option >
2026-05-28 17:34:37 +03:00
</ select >
</ label >
< label >
2026-06-01 18:33:39 +03:00
< span > {{ t.player_year }}</ span >
2026-05-28 17:34:37 +03:00
< input type = "number" x-model = "$store.torrents.uploadDraft.release_year" >
</ label >
< label >
2026-06-01 18:33:39 +03:00
< span > {{ t.player_track_number }}</ span >
2026-05-28 17:34:37 +03:00
< input type = "number" min = "1" x-model = "$store.torrents.uploadDraft.track_number" >
</ label >
< label >
2026-06-01 18:33:39 +03:00
< span > {{ t.player_disc_number }}</ span >
2026-05-28 17:34:37 +03:00
< input type = "number" min = "1" x-model = "$store.torrents.uploadDraft.disc_number" >
</ label >
< label class = "upload-hidden-toggle" >
< input type = "checkbox" x-model = "$store.torrents.uploadDraft.is_hidden" >
2026-06-01 18:33:39 +03:00
< span > {{ t.player_hidden }}</ span >
2026-05-28 17:34:37 +03:00
</ label >
< div class = "upload-edit-actions" >
< button class = "modal-btn modal-btn-primary"
@ click = "$store.torrents.saveUploadEdit()"
2026-06-01 18:33:39 +03:00
:disabled = "$store.torrents.uploadSavingId === item.track.id" > {{ t.player_save }}</ button >
< button class = "modal-btn modal-btn-ghost" @ click = "$store.torrents.cancelUploadEdit()" > {{ t.player_cancel }}</ button >
2026-05-28 17:34:37 +03:00
</ div >
</ div >
</ template >
</ div >
</ template >
</ div >
</ section >
</ template >
2026-05-26 12:55:11 +03:00
</ div >
</ div >
</ template >
2026-07-27 16:44:16 +01:00
<!-- User Settings Modal -->
< template x-if = "$store.user.settingsOpen" >
< div class = "modal-overlay" @ click . self = "$store.user.closeSettings()" >
< div class = "modal-box user-settings-modal" >
< div class = "user-settings-head" >
< div >
< h3 > User settings</ h3 >
< p > Personal services, listening history and trusted devices.</ p >
</ div >
< button class = "mobile-list-action" @ click = "$store.user.closeSettings()" title = "{{ t.player_close }}" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" >
< line x1 = "18" y1 = "6" x2 = "6" y2 = "18" />
< line x1 = "6" y1 = "6" x2 = "18" y2 = "18" />
</ svg >
</ button >
</ div >
2026-08-10 01:44:40 +01:00
< section class = "user-settings-section" >
< div class = "user-settings-section-head" >
< div >
< h4 > {{ t.player_interface_language }}</ h4 >
< p > {{ t.player_language_description }}</ p >
</ div >
< button class = "settings-secondary-btn"
onclick = "location.href='/set-lang?lang={% if t.lang.code() == " en " %} ru {% else %} en {% endif %}& next = '+encodeURIComponent(location.pathname+location.search+location.hash)">{{ t.player_switch_language }}</button>
</div>
</section>
2026-07-27 16:44:16 +01:00
<section class="user-settings-section">
<div class="user-settings-section-head">
<div>
<h4>Listening history</h4>
<p>Review plays recorded by this web player.</p>
</div>
<button class="settings-secondary-btn" @click="$store.user.openHistoryFromSettings()">Open history</button>
</div>
</section>
<section class="user-settings-section">
<div class="user-settings-section-head">
<div>
<h4>Last.fm</h4>
<p x-text="$store.user.lastfmStatusLabel()"></p>
</div>
<button class="settings-secondary-btn"
:class="$store.user.lastfmClass()"
:disabled="$store.user.lastfmBusy || !$store.user.lastfm?.configured"
@click="$store.user.handleLastfm()"
x-text="$store.user.lastfm?.connected && !$store.user.lastfm?.reauth_required ? ' Disconnect ' : ' Connect '" ></ button >
</ div >
</ section >
< section class = "user-settings-section user-settings-devices" >
< div class = "user-settings-section-head" >
< div >
< h4 > Connected devices</ h4 >
< p x-text = "$store.devices.fedSummary()" ></ p >
</ div >
< button class = "settings-secondary-btn"
:disabled = "$store.devices.fedBusy"
@ click = "$store.devices.syncFedDevices()" > Sync now</ button >
</ div >
< template x-if = "$store.devices.fedError" >
< div class = "fed-device-error" x-text = "$store.devices.fedError" ></ div >
</ template >
< div class = "settings-device-group" >
< div class = "settings-device-label" > Web player sessions</ div >
< template x-for = "device in $store.devices.webDevices()" :key = "'settings-web-' + device.id" >
< div class = "settings-device-row" >
< span class = "device-row-icon" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" >
< rect x = "3" y = "4" width = "18" height = "12" rx = "2" />
< path d = "M8 20h8M12 16v4" />
</ svg >
</ span >
< span class = "fed-device-main" >
< span class = "fed-device-name" x-text = "device.name" ></ span >
< span class = "fed-device-meta"
x-text = "device.is_current ? 'This browser session' : (device.is_active ? 'Active web session' : 'Web session')" ></ span >
</ span >
</ div >
</ template >
</ div >
< div class = "settings-device-group" >
< div class = "settings-device-label" > Trusted federation devices</ div >
< template x-for = "request in $store.devices.fedPending()" :key = "request.request_id" >
< div class = "fed-pairing-card" >
< div class = "fed-pairing-title" x-text = "request.name || request.device_id" ></ div >
< div class = "fed-pairing-meta"
x-text = "request.requester_group_id ? 'Already belongs to another sync group' : (request.client_version || 'Waiting for approval')" ></ div >
< div class = "fed-device-actions" >
< button class = "fed-action-btn primary"
@ click = "$store.devices.answerFedPairing(request, true, !!request.requester_group_id)"
x-text = "request.requester_group_id ? 'Use existing group' : 'Approve'" ></ button >
< button class = "fed-action-btn"
@ click = "$store.devices.answerFedPairing(request, false, false)" > Reject</ button >
</ div >
</ div >
</ template >
< template x-for = "device in $store.devices.fedDevices()" :key = "'settings-fed-' + device.device_id" >
< div class = "settings-device-row federation" >
< span class = "device-row-icon federation-device-icon" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "1.8" >
< circle cx = "12" cy = "12" r = "3" />
< path d = "M5.6 8.5a7.5 7.5 0 000 7M18.4 8.5a7.5 7.5 0 010 7" />
< path d = "M2.8 5.8a11 11 0 000 12.4M21.2 5.8a11 11 0 010 12.4" />
</ svg >
</ span >
< span class = "fed-device-main" >
< span class = "fed-device-name" x-text = "device.name || device.device_id" ></ span >
< span class = "fed-device-meta"
x-text = "device.is_self ? 'This web player' : (device.client_version || 'Trusted device')" ></ span >
</ span >
< button class = "fed-revoke-btn"
x-show = "!device.is_self"
:disabled = "$store.devices.fedBusy"
@ click = "$store.devices.revokeFedDevice(device)" > Revoke</ button >
</ div >
</ template >
</ div >
< div class = "settings-pairing-actions" >
< button class = "settings-primary-btn"
:disabled = "$store.devices.fedBusy"
@ click = "$store.devices.generateFedInvite()" > Invite a device</ button >
< template x-if = "$store.devices.fedInvite" >
< input class = "fed-device-input"
readonly
:value = "$store.devices.fedInvite"
@ focus = "$event.target.select()" >
</ template >
< div class = "fed-connect-row" >
< input class = "fed-device-input"
type = "text"
placeholder = "Paste frid:// invite"
x-model = "$store.devices.fedInviteInput"
@ keydown . enter . prevent = "$store.devices.connectFedInvite()" >
< button class = "settings-secondary-btn"
:disabled = "$store.devices.fedBusy || !$store.devices.fedInviteInput.trim()"
@ click = "$store.devices.connectFedInvite()" > Connect</ button >
</ div >
</ div >
</ section >
</ div >
</ div >
</ template >
2026-05-26 12:55:11 +03:00
<!-- Play History Modal -->
< template x-if = "$store.history.modal" >
< div class = "modal-overlay" @ click . self = "$store.history.close()" >
< div class = "modal-box history-modal" >
2026-05-29 17:04:30 +03:00
< div class = "history-head" >
< div >
< h3 > {{ t.player_play_history }}</ h3 >
< p class = "torrent-message" :class = "{ error: $store.history.error }"
x-text = "$store.history.message" ></ p >
</ div >
< button class = "mobile-list-action" @ click = "$store.history.close()" title = "{{ t.player_close }}" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" >
< line x1 = "18" y1 = "6" x2 = "6" y2 = "18" />
< line x1 = "6" y1 = "6" x2 = "18" y2 = "18" />
</ svg >
</ button >
</ div >
2026-05-26 12:55:11 +03:00
< div class = "history-list" >
< template x-if = "!$store.history.loading && $store.history.items.length === 0" >
< div class = "empty-state" style = "padding:32px 16px" >
2026-05-26 14:47:10 +03:00
< p > {{ t.player_no_plays_yet }}</ p >
2026-05-26 12:55:11 +03:00
</ div >
</ template >
2026-05-29 17:04:30 +03:00
< template x-if = "$store.history.items.length > 0" >
< div class = "history-table-head" >
< span ></ span >
< span > {{ t.player_title }}</ span >
< span > {{ t.player_played_at }}</ span >
< span ></ span >
< span style = "text-align:right" > {{ t.player_listened }}</ span >
</ div >
</ template >
< template x-for = "(item, idx) in $store.history.items" :key = "item.id" >
< div class = "history-row track-row"
:class = "{ playing: $store.player.currentTrack && item.track && $store.player.currentTrack.id === item.track.id }"
@ dblclick = "$store.history.playFrom(idx)" >
< button class = "history-cover"
@ click . stop = "$store.history.playFrom(idx)"
:title = "item.track?.title || item.track_title" >
< template x-if = "item.track && item.track.cover_url" >
2026-08-11 12:26:16 +01:00
< img :src = "item.track.cover_url" alt = "" aria-hidden = "true" loading = "lazy" >
2026-05-29 17:04:30 +03:00
</ template >
< template x-if = "!item.track || !item.track.cover_url" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "1.5" >< rect x = "3" y = "3" width = "18" height = "18" rx = "2" />< circle cx = "12" cy = "12" r = "4" /></ svg >
</ template >
</ button >
< div class = "track-info" >
2026-07-27 23:16:03 +01:00
< div class = "track-title" >
< span x-text = "item.track?.title || item.track_title" ></ span >
< span class = "history-device-badge"
:title = "item.device_id"
x-text = "item.device_name" ></ span >
</ div >
2026-05-29 17:04:30 +03:00
< div class = "track-artists-inline" >
< template x-for = "(artist, artistIdx) in $store.library.trackArtistLinks(item.track)" :key = "artist.label + '-' + artist.id + '-' + artistIdx" >
< span >
< template x-if = "artistIdx > 0" >< span > , </ span ></ template >
< a class = "artist-link" @ click . stop = "$store.history.close(); $store.library.openArtist(artist.id)" x-text = "artist.label" ></ a >
</ span >
</ template >
< template x-if = "!item.track || !$store.library.trackArtistLinks(item.track).length" >
< span x-text = "item.release_title || '{{ t.player_unknown_release }}'" ></ span >
</ template >
</ div >
< div class = "history-release-line" >
< a class = "artist-link"
x-show = "item.track && item.track.release_id"
@ click . stop = "$store.history.close(); $store.library.openRelease(item.track.release_id)"
x-text = "item.track?.release_title || item.release_title || '{{ t.player_unknown_release }}'" ></ a >
</ div >
2026-05-26 12:55:11 +03:00
</ div >
2026-05-29 17:04:30 +03:00
< 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"
: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)"
:title = "$store.library.trackInfoTitle(item.track)"
aria-label = "{{ t.player_track_info }}" >
< span x-show = "$store.library.hasPopularity(item.track)" x-text = "$store.library.popularityLabel(item.track)" ></ span >
< span x-show = "!$store.library.hasPopularity(item.track)" class = "info-letter" > i</ span >
</ button >
< button class = "like-btn" :class = "{ liked: $store.likes.has(item.track_id) }" @ click . stop = "$store.likes.toggle(item.track_id)" title = "{{ t.player_like }}" >
< svg viewBox = "0 0 24 24" :fill = "$store.likes.has(item.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 queue-insert-btn queue-next-btn" @ click . stop = "$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 . stop = "$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 >
2026-06-03 17:35:55 +03:00
< button class = "track-action-btn track-share-btn" @ click . stop = "$store.sharing.copyTrack(item.track || item.track_id, $event.currentTarget)" title = "{{ t.player_share_track }}" aria-label = "{{ t.player_share_track }}" >
< svg viewBox = "0 0 24 24" fill = "none" stroke = "currentColor" stroke-width = "2" >< circle cx = "18" cy = "5" r = "3" />< circle cx = "6" cy = "12" r = "3" />< circle cx = "18" cy = "19" r = "3" />< path d = "M8.6 10.6l6.8-3.9M8.6 13.4l6.8 3.9" /></ svg >
</ button >
2026-05-29 17:04:30 +03:00
< button class = "track-action-btn playlist-add-btn" @ click . stop = "$store.playlists.showPicker([item.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 >
2026-05-26 12:55:11 +03:00
</ div >
2026-05-29 17:04:30 +03:00
< span class = "history-duration" x-text = "$store.history.duration(item.duration_listened)" ></ span >
2026-05-26 12:55:11 +03:00
</ div >
</ template >
</ div >
< div class = "history-pager" >
< button class = "modal-btn modal-btn-ghost"
@ click = "$store.history.load($store.history.page - 1)"
:disabled = "$store.history.loading || $store.history.page <= 1" >
2026-05-26 14:47:10 +03:00
{{ t.player_previous }}
2026-05-26 12:55:11 +03:00
</ button >
< span class = "history-release"
2026-05-26 14:47:10 +03:00
x-text = "'{{ t.player_page }} ' + $store.history.page + ' {{ t.player_of }} ' + $store.history.totalPages()" ></ span >
2026-05-26 12:55:11 +03:00
< button class = "modal-btn modal-btn-primary"
@ click = "$store.history.load($store.history.page + 1)"
:disabled = "$store.history.loading || $store.history.page >= $store.history.totalPages()" >
2026-05-26 14:47:10 +03:00
{{ t.player_next }}
2026-05-26 12:55:11 +03:00
</ button >
</ div >
</ div >
</ div >
</ template >
</ div >