From 0fc86d5bfe647d4b3f49ab0143edf38222c58efe Mon Sep 17 00:00:00 2001 From: Absturztaube Date: Sat, 3 Jul 2021 17:23:25 +0200 Subject: [PATCH] add tags as buttons to posts --- src/components/status_content/status_content.js | 11 +++++++++++ src/components/status_content/status_content.vue | 16 ++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/src/components/status_content/status_content.js b/src/components/status_content/status_content.js index a6f79d76..b536b91c 100644 --- a/src/components/status_content/status_content.js +++ b/src/components/status_content/status_content.js @@ -90,6 +90,17 @@ const StatusContent = { } return true }, + tagsSorted () { + return this.status.tags.sort((a, b) => { + if (a.name < b.name) { + return -1 + } + if (a.name > b.name) { + return 1 + } + return 0 + }) + }, attachmentSize () { if ((this.mergedConfig.hideAttachments && !this.inConversation) || (this.mergedConfig.hideAttachmentsInConv && this.inConversation) || diff --git a/src/components/status_content/status_content.vue b/src/components/status_content/status_content.vue index 90bfaf40..2544a5e6 100644 --- a/src/components/status_content/status_content.vue +++ b/src/components/status_content/status_content.vue @@ -87,6 +87,17 @@ +
+ + {{ tag.name }} + +
+
@@ -140,6 +151,11 @@ $status-margin: 0.75em; flex: 1; min-width: 0; + .status-tag { + padding: 2px; + margin: 2px; + } + .status-content-wrapper { display: flex; flex-direction: column;