aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShpuld Shpludson <shp@cock.li>2020-02-10 14:50:42 +0000
committerShpuld Shpludson <shp@cock.li>2020-02-10 14:50:42 +0000
commit6be6241767f13d5a46f2c5455281a03ae2a5e844 (patch)
treeab9d2e2e27c16fae54a7653890f68400cfa57a7a
parent788ff531d680bb4f5c11c6d2bf08db53b4f5641b (diff)
parente36c39be192ce98fe20e11ea8e2d4fec1b3d50fd (diff)
Merge branch 'feature-collapsed-media-indicator' into 'develop'
Indicate whether collapsed statuses contain gallery media or link preview cards Closes #767 See merge request pleroma/pleroma-fe!1056
-rw-r--r--src/components/status/status.js10
-rw-r--r--src/components/status/status.vue16
-rwxr-xr-xstatic/fontello.json8
3 files changed, 32 insertions, 2 deletions
diff --git a/src/components/status/status.js b/src/components/status/status.js
index 81b57667..fc5956ec 100644
--- a/src/components/status/status.js
+++ b/src/components/status/status.js
@@ -256,6 +256,16 @@ const Status = {
file => !fileType.fileMatchesSomeType(this.galleryTypes, file)
)
},
+ hasImageAttachments () {
+ return this.status.attachments.some(
+ file => fileType.fileType(file.mimetype) === 'image'
+ )
+ },
+ hasVideoAttachments () {
+ return this.status.attachments.some(
+ file => fileType.fileType(file.mimetype) === 'video'
+ )
+ },
maxThumbnails () {
return this.mergedConfig.maxThumbnails
},
diff --git a/src/components/status/status.vue b/src/components/status/status.vue
index d5739304..0a82dcbe 100644
--- a/src/components/status/status.vue
+++ b/src/components/status/status.vue
@@ -277,7 +277,21 @@
href="#"
class="cw-status-hider"
@click.prevent="toggleShowMore"
- >{{ $t("general.show_more") }}</a>
+ >
+ {{ $t("general.show_more") }}
+ <span
+ v-if="hasImageAttachments"
+ class="icon-picture"
+ />
+ <span
+ v-if="hasVideoAttachments"
+ class="icon-video"
+ />
+ <span
+ v-if="status.card"
+ class="icon-link"
+ />
+ </a>
<a
v-if="showingMore"
href="#"
diff --git a/static/fontello.json b/static/fontello.json
index 829241b5..5a7086a2 100755
--- a/static/fontello.json
+++ b/static/fontello.json
@@ -339,6 +339,12 @@
"css": "arrow-curved",
"code": 59426,
"src": "iconic"
+ },
+ {
+ "uid": "0ddd3e8201ccc7d41f7b7c9d27eca6c1",
+ "css": "link",
+ "code": 59427,
+ "src": "fontawesome"
}
]
-} \ No newline at end of file
+}