2026-11-24 01:39:34 +02:00
|
|
|
{% include "player/track_actions_menu.html" %}
|
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>
|
2026-11-23 01:45:22 +02:00
|
|
|
<template x-if="typeof row.run === 'function'"><button class="info-link" type="button" @click="row.run()" x-text="row.value"></button></template>
|
2026-05-27 15:56:57 +03:00
|
|
|
<template x-if="row.links && row.links.length">
|
|
|
|
|
<div class="info-link-list">
|
2026-11-23 05:41:25 +02:00
|
|
|
<template x-for="(link, idx) in row.links" :key="link.href + '-' + idx">
|
|
|
|
|
<a :class="link.href && 'info-link'" :href="link.href"
|
|
|
|
|
@click="if ($store.library.followsHere($event)) $store.info.close()"
|
|
|
|
|
x-text="link.label"></a>
|
2026-05-27 15:56:57 +03:00
|
|
|
</template>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
2026-11-23 01:45:22 +02:00
|
|
|
<template x-if="(!row.links || !row.links.length) && !row.run">
|
2026-05-27 15:56:57 +03:00
|
|
|
<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">
|
2026-11-24 02:45:38 +02:00
|
|
|
<div data-online-only class="modal-overlay" @click.self="$store.playlists.modal = null">
|
2026-05-26 12:55:11 +03:00
|
|
|
<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">
|
2026-11-24 02:45:38 +02:00
|
|
|
<div data-online-only class="modal-overlay" @click.self="$store.playlists.picker = null">
|
2026-05-26 12:55:11 +03:00
|
|
|
<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-11-24 05:38:57 +02:00
|
|
|
{% if downloads_enabled %}{% include "player/download_manager.html" %}{% endif %}
|
2026-05-26 12:55:11 +03:00
|
|
|
|
2026-07-27 16:44:16 +01:00
|
|
|
<!-- User Settings Modal -->
|
|
|
|
|
<template x-if="$store.user.settingsOpen">
|
2026-11-24 06:02:14 +02:00
|
|
|
<dialog class="player-dialog user-settings-overlay" @dismiss-player-dialog.stop="$store.user.closeSettings()"
|
2026-11-24 03:15:58 +02:00
|
|
|
x-data="{
|
|
|
|
|
managingCache:false, settingsScroll:0,
|
|
|
|
|
openCache() {
|
|
|
|
|
this.settingsScroll = document.getElementById('user-settings-box').scrollTop;
|
|
|
|
|
this.managingCache = true;
|
|
|
|
|
this.$nextTick(() => document.getElementById('offline-cache-title')?.focus());
|
|
|
|
|
},
|
|
|
|
|
backToSettings() {
|
|
|
|
|
const box = document.getElementById('user-settings-box'), scroll = this.settingsScroll;
|
|
|
|
|
this.managingCache = false;
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
if (!box?.isConnected) return;
|
|
|
|
|
box.scrollTop = scroll;
|
|
|
|
|
box.querySelector('#open-offline-cache')?.focus({preventScroll:true});
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}"
|
|
|
|
|
:aria-labelledby="managingCache ? 'offline-cache-title' : 'user-settings-title'"
|
2026-11-24 02:45:38 +02:00
|
|
|
x-init="$nextTick(() => { if ($el.isConnected) { $el.showModal(); document.getElementById($store.user.settingsFocus)?.focus() } })"
|
2026-11-24 03:15:58 +02:00
|
|
|
@cancel.prevent="managingCache ? $dispatch('cache-manager-back') : $store.user.closeSettings()"
|
|
|
|
|
@click.self="$store.user.closeSettings()" @keydown.space.stop>
|
2026-11-24 06:02:14 +02:00
|
|
|
<div class="player-dialog-surface user-settings-modal" id="user-settings-box" :class="{ 'cache-view':managingCache }">
|
2026-11-24 04:55:02 +02:00
|
|
|
<div class="settings-home" x-show="!managingCache">
|
2026-11-24 06:02:14 +02:00
|
|
|
{% let dialog_head_class = "user-settings-head" %}
|
|
|
|
|
{% let dialog_title_id = "user-settings-title" %}
|
|
|
|
|
{% let dialog_title = t.nav_settings %}
|
|
|
|
|
{% let dialog_icon = "M3 7h5m6 0h7M3 17h9m6 0h3M14 7a3 3 0 1 1-6 0 3 3 0 0 1 6 0zm4 10a3 3 0 1 1-6 0 3 3 0 0 1 6 0z" %}
|
|
|
|
|
{% let show_version = true %}
|
|
|
|
|
{% include "player/dialog_header.html" %}
|
2026-11-24 04:55:02 +02:00
|
|
|
<div class="settings-content">
|
|
|
|
|
<div class="settings-preferences" data-online-only>
|
|
|
|
|
<div class="settings-preference">
|
|
|
|
|
<svg class="preference-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" aria-hidden="true">
|
|
|
|
|
<circle cx="12" cy="12" r="9"/><ellipse cx="12" cy="12" rx="4" ry="9"/><path d="M3 12h18"/>
|
|
|
|
|
</svg>
|
|
|
|
|
<label class="preference-label" for="settings-language">{{ t.player_interface_language }}</label>
|
|
|
|
|
<span class="settings-language-control">
|
|
|
|
|
<select id="settings-language" @change="location.href='/set-lang?lang=' + $el.value + '&next=' + encodeURIComponent(location.pathname + location.search + location.hash)">
|
|
|
|
|
<option value="en" lang="en" {% if t.lang.code() == "en" %}selected{% endif %}>English</option>
|
|
|
|
|
<option value="ru" lang="ru" {% if t.lang.code() == "ru" %}selected{% endif %}>Русский</option>
|
|
|
|
|
</select>
|
|
|
|
|
<svg width="12" height="12" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="m4 6 4 4 4-4"/></svg>
|
2026-07-27 16:44:16 +01:00
|
|
|
</span>
|
|
|
|
|
</div>
|
2026-11-24 04:55:02 +02:00
|
|
|
<div class="settings-preference">
|
|
|
|
|
<svg class="preference-icon" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
|
|
|
|
<path d="M2 12h3l2-5 4 11 3-14 3 12 2-4h3"/>
|
|
|
|
|
</svg>
|
|
|
|
|
<div class="preference-account">
|
|
|
|
|
<span class="preference-label">Last.fm</span>
|
|
|
|
|
<span class="preference-account-state" :class="$store.user.lastfmClass()" :title="$store.user.lastfmLabel()"
|
|
|
|
|
x-text="$store.user.lastfmStatusLabel()"></span>
|
2026-07-27 16:44:16 +01:00
|
|
|
</div>
|
2026-11-24 04:55:02 +02:00
|
|
|
<button class="preference-action" type="button"
|
|
|
|
|
:disabled="$store.user.lastfmBusy || !$store.user.lastfm?.configured"
|
|
|
|
|
@click="$store.user.handleLastfm()"
|
|
|
|
|
x-text="$store.user.lastfm?.reauth_required ? '{{ t.player_settings_reconnect }}' : $store.user.lastfm?.connected ? '{{ t.player_settings_disconnect }}' : '{{ t.player_settings_connect }}'"></button>
|
2026-07-27 16:44:16 +01:00
|
|
|
</div>
|
|
|
|
|
</div>
|
2026-11-24 04:55:02 +02:00
|
|
|
{% if !guest && share_token.is_empty() %}{% include "player/offline_settings.html" %}{% endif %}
|
|
|
|
|
{% include "player/settings_devices.html" %}
|
2026-07-27 16:44:16 +01:00
|
|
|
</div>
|
2026-11-24 03:15:58 +02:00
|
|
|
</div>
|
|
|
|
|
{% if !guest && share_token.is_empty() %}
|
|
|
|
|
<template x-if="managingCache">
|
|
|
|
|
{% include "player/offline_cache_manager.html" %}
|
|
|
|
|
</template>
|
|
|
|
|
{% endif %}
|
2026-07-27 16:44:16 +01:00
|
|
|
</div>
|
2026-11-24 02:45:38 +02:00
|
|
|
</dialog>
|
2026-07-27 16:44:16 +01:00
|
|
|
</template>
|
|
|
|
|
|
2026-05-26 12:55:11 +03:00
|
|
|
</div>
|