commit: 02fff5ddd50f19f22f8c3e6278016aef6f507b8c
parent 358f92adfff03f453482fe79ce54633a3a5c18e8
Author: HJ <30-hj@users.noreply.git.pleroma.social>
Date: Thu, 30 Nov 2023 17:51:32 +0000
Merge branch 'neetzsche/accommodate-scrobble-urls' into 'develop'
Accommodate scrobble URLs when present
See merge request pleroma/pleroma-fe!1872
Diffstat:
2 files changed, 39 insertions(+), 15 deletions(-)
diff --git a/changelog.d/create-link-when-url-present.add b/changelog.d/create-link-when-url-present.add
@@ -0,0 +1 @@
+Create a link to the URL of the scrobble when it's present
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
@@ -249,22 +249,45 @@
</button>
</span>
</div>
- <div class="status-rich-presence" v-if="scrobblePresent">
- <FAIcon
- class="fa-scale-110 fa-old-padding"
- icon="music"
- />
- {{ scrobble.artist }} — {{ scrobble.title }}
- <FAIcon
- class="fa-scale-110 fa-old-padding"
- icon="play"
- />
- <span class="status-rich-presence-time">
- <Timeago
- template-key="time.in_past"
- :time="scrobble.created_at"
- :auto-update="60"
+ <div
+ v-if="scrobblePresent"
+ class="status-rich-presence"
+ >
+ <a
+ v-if="scrobble.externalLink"
+ :href="scrobble.externalLink"
+ target="_blank"
+ >
+ {{ scrobble.artist }} — {{ scrobble.title }}
+ <FAIcon
+ class="fa-scale-110 fa-old-padding"
+ icon="play"
/>
+ <span class="status-rich-presence-time">
+ <Timeago
+ template-key="time.in_past"
+ :time="scrobble.created_at"
+ :auto-update="60"
+ />
+ </span>
+ </a>
+ <span v-if="!scrobble.externalLink">
+ <FAIcon
+ class="fa-scale-110 fa-old-padding"
+ icon="music"
+ />
+ {{ scrobble.artist }} — {{ scrobble.title }}
+ <FAIcon
+ class="fa-scale-110 fa-old-padding"
+ icon="play"
+ />
+ <span class="status-rich-presence-time">
+ <Timeago
+ template-key="time.in_past"
+ :time="scrobble.created_at"
+ :auto-update="60"
+ />
+ </span>
</span>
</div>
<div