diff options
| author | NEETzsche <neetzsche@tutanota.com> | 2023-11-15 01:13:46 -0700 |
|---|---|---|
| committer | NEETzsche <neetzsche@tutanota.com> | 2023-11-30 09:00:47 -0700 |
| commit | 730351dcd19540afff89355a2014cd9793fe07bf (patch) | |
| tree | 6e9c974f8c7366701386ec1344630c5ebd105d54 | |
| parent | 18c0cf1845a95db2d0e894d2455cdd4dc545aaf7 (diff) | |
Accommodate scrobble URLs when present
| -rw-r--r-- | changelog.d/create-link-when-url-present.add | 1 | ||||
| -rw-r--r-- | src/components/status/status.vue | 57 |
2 files changed, 43 insertions, 15 deletions
diff --git a/changelog.d/create-link-when-url-present.add b/changelog.d/create-link-when-url-present.add new file mode 100644 index 00000000..11aa3758 --- /dev/null +++ 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 index d66de562..eb10a0b0 100644 --- a/src/components/status/status.vue +++ b/src/components/status/status.vue @@ -249,22 +249,49 @@ </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" + > + <img + :src="faviconUrl" + class="status-rich-presence-favicon" + /> + {{ 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 |
