aboutsummaryrefslogtreecommitdiff
path: root/src/components/status
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/status')
-rw-r--r--src/components/status/status.js12
-rw-r--r--src/components/status/status.vue20
2 files changed, 29 insertions, 3 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index e722a635..a339694d 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -39,7 +39,8 @@ import {
faThumbtack,
faChevronUp,
faChevronDown,
- faAngleDoubleRight
+ faAngleDoubleRight,
+ faPlay
} from '@fortawesome/free-solid-svg-icons'
library.add(
@@ -59,7 +60,8 @@ library.add(
faThumbtack,
faChevronUp,
faChevronDown,
- faAngleDoubleRight
+ faAngleDoubleRight,
+ faPlay
)
const camelCase = name => name.charAt(0).toUpperCase() + name.slice(1)
@@ -415,6 +417,12 @@ const Status = {
},
shouldDisplayQuote () {
return this.quotedStatus && this.displayQuote
+ },
+ scrobblePresent () {
+ return !this.mergedConfig.hideScrobbles && this.status.user.latestScrobble && this.status.user.latestScrobble.artist
+ },
+ scrobble () {
+ return this.status.user.latestScrobble
}
},
methods: {
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index c49a9e7b..ad625643 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -249,6 +249,25 @@
</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"
+ />
+ </span>
+ </div>
+ </div>
<div
v-if="isReply || hasMentionsLine"
class="heading-reply-row"
@@ -345,7 +364,6 @@
</template>
</i18n-t>
</div>
- </div>
<StatusContent
ref="content"