logo

pleroma-fe

My custom branche(s) on git.pleroma.social/pleroma/pleroma-fe git clone https://hacktivis.me/git/pleroma-fe.git
commit: 730351dcd19540afff89355a2014cd9793fe07bf
parent 18c0cf1845a95db2d0e894d2455cdd4dc545aaf7
Author: NEETzsche <neetzsche@tutanota.com>
Date:   Wed, 15 Nov 2023 01:13:46 -0700

Accommodate scrobble URLs when present

Diffstat:

Achangelog.d/create-link-when-url-present.add1+
Msrc/components/status/status.vue57++++++++++++++++++++++++++++++++++++++++++---------------
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 @@ -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,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