feat(share): library deep links (psysonic2) with paste + toolbar actions (#261)

* feat(share): library deep links (psysonic2) with paste and toolbar actions

Add base64url-encoded payloads for track, album, artist, and ordered queue.
Handle paste outside inputs to switch server, validate entities, navigate or
play. Reuse clipboard helper for context menu, queue panel, album and artist
headers. Tests distinguish server invite strings from library shares.

* fix(share): play partial queue when some shared tracks are missing

Skip unavailable song IDs when pasting a queue share while preserving order.
Toast when some tracks are missing; error only if none resolve. Add
openedQueuePartial and queueAllUnavailable i18n; remove queueTracksMissing.

* feat(settings): paste server invites globally and scroll to add form

Handle psysonic1- magic strings outside inputs: navigate to settings or login
with prefilled add-server fields. Decode invites embedded in surrounding text.
Scroll the add-server block into view when opening from a paste so long server
lists stay oriented.

---------

Co-authored-by: Maxim Isaev <im@friclub.ru>
This commit is contained in:
Frank Stellmacher
2026-04-22 11:21:00 +02:00
committed by GitHub
parent 21d00889aa
commit 7c9a300022
22 changed files with 779 additions and 18 deletions
+22
View File
@@ -122,10 +122,29 @@ export const zhTranslation = {
selectedAlbums: '已选择 {{count}} 个专辑',
selectedArtists: '已选择 {{count}} 个艺术家',
songInfo: '歌曲信息',
shareLink: '复制分享链接',
shareCopied: '分享链接已复制到剪贴板。',
shareCopyFailed: '无法复制到剪贴板。',
},
sharePaste: {
notLoggedIn: '请先登录并添加服务器,再粘贴分享链接。',
noMatchingServer: '没有已保存的服务器与此链接匹配。请添加使用该地址的服务器:{{url}}',
trackUnavailable: '在服务器上找不到此歌曲。',
albumUnavailable: '在服务器上找不到此专辑。',
artistUnavailable: '在服务器上找不到此艺术家。',
openedTrack: '正在播放分享的歌曲。',
openedAlbum: '正在打开分享的专辑。',
openedArtist: '正在打开分享的艺术家。',
openedQueue_one: '正在播放分享队列中的 {{count}} 首曲目。',
openedQueue_other: '正在播放分享队列中的 {{count}} 首曲目。',
openedQueuePartial: '正在播放链接中的 {{played}} / {{total}} 首曲目({{skipped}} 首在此服务器上未找到)。',
queueAllUnavailable: '此链接中的曲目在服务器上均未找到。',
genericError: '无法打开分享链接。',
},
albumDetail: {
back: '返回',
playAll: '全部播放',
shareAlbum: '分享专辑',
enqueue: '加入队列',
enqueueTooltip: '将整张专辑添加到播放队列',
artistBio: '艺术家简介',
@@ -180,6 +199,7 @@ export const zhTranslation = {
albums: '专辑',
album: '专辑',
playAll: '全部播放',
shareArtist: '分享艺人',
shuffle: '随机播放',
radio: '电台',
loading: '加载中…',
@@ -975,6 +995,8 @@ export const zhTranslation = {
hide: '隐藏',
close: '关闭',
nextTracks: '即将播放',
shareQueue: '复制队列分享链接',
shareQueueEmpty: '队列为空,无法分享。',
emptyQueue: '队列为空。',
trackSingular: '首曲目',
trackPlural: '首曲目',