53 lines
3.6 KiB
HTML
53 lines
3.6 KiB
HTML
<div id="track-action-menu" class="track-action-menu" role="dialog" aria-label="{{ t.player_track_actions }}"
|
|
x-data="{get menu() {return $store.trackActions}}" hidden :hidden="!menu.anchor"
|
|
@click.stop @dblclick.stop @keydown.space.stop @keydown.escape.stop.prevent="menu.close(true)"
|
|
@focusout="if ($event.relatedTarget && $event.relatedTarget !== menu.anchor && !$el.contains($event.relatedTarget)) menu.close()"
|
|
@pointerdown.window.capture="if (menu.anchor && !$el.contains($event.target) && !menu.anchor.contains($event.target)) menu.close()"
|
|
@scroll.window.capture="if (menu.anchor && !$el.contains($event.target)) menu.close()"
|
|
@hashchange.window="menu.close()" @resize.window="menu.close()">
|
|
<button type="button" data-action="info" @click="menu.run('info')">
|
|
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="9"/><path d="M12 11v6m0-10v.2"/></svg>
|
|
{{ t.player_track_info }}
|
|
</button>
|
|
{% if !guest %}
|
|
<button data-online-only type="button" data-action="like" :hidden="!menu.historyItem || !menu.localId" @click="menu.run('like')" :aria-pressed="$store.likes.has(menu.localId)">
|
|
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20.8 4.6a5.5 5.5 0 0 0-7.7 0L12 5.7l-1.1-1.1a5.5 5.5 0 0 0-7.7 7.8L12 21l8.8-8.6a5.5 5.5 0 0 0 0-7.8z"/></svg>
|
|
{{ t.player_like }}
|
|
</button>
|
|
{% endif %}
|
|
<button type="button" data-action="next" :hidden="!menu.historyItem" @click="menu.run('next')">
|
|
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 6h13M3 12h9M3 18h13m1-10 5 4-5 4z"/></svg>
|
|
{{ t.player_play_next }}
|
|
</button>
|
|
<button type="button" data-action="queue" @click="menu.run('queue')">
|
|
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 5h16M3 11h16M3 17h8m5-3 5 4-5 4z"/></svg>
|
|
{{ t.player_add_to_queue }}
|
|
</button>
|
|
{% if !guest %}
|
|
<button data-online-only type="button" data-action="playlist" @click="menu.run('playlist')">
|
|
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M3 5h15M3 11h12M3 17h7m8-3v8m-4-4h8"/></svg>
|
|
{{ t.player_add_to_playlist }}
|
|
</button>
|
|
<button data-online-only type="button" data-action="similar" :hidden="!$store.library.similarityTrackId(menu.track)" @click="menu.run('similar')">
|
|
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="10" cy="10" r="7"/><path d="m15 15 6 6M6 10h2l1-3 2 6 1-3h2"/></svg>
|
|
{{ t.player_find_similar }}
|
|
</button>
|
|
<button data-online-only type="button" data-action="share" :hidden="!menu.localId" @click="menu.run('share')">
|
|
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><path d="m9 10.5 6.5-4m-6.5 7 6.5 4"/></svg>
|
|
{{ t.player_share_track }}
|
|
</button>
|
|
{% if share_token.is_empty() %}
|
|
<button type="button" data-online-only data-action="offline"
|
|
:hidden="!menu.localId || !$store.offline.enabled" :disabled="$store.offline.isSaved(menu.track) || $store.offline.busy"
|
|
@click="menu.run('offline')">
|
|
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3v10m-4-4 4 4 4-4M4 14h16l1 6H3z"/></svg>
|
|
<span x-text="$store.offline.isSaved(menu.track) ? '{{ t.player_offline_available }}' : '{{ t.player_offline_save }}'"></span>
|
|
</button>
|
|
{% endif %}
|
|
{% endif %}
|
|
<button data-online-only type="button" data-action="download" :hidden="!menu.localId" @click="menu.run('download')">
|
|
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 3v12m-5-5 5 5 5-5M4 16v4h16v-4"/></svg>
|
|
{{ t.track_download }}
|
|
</button>
|
|
</div>
|