From cbc61ba03d6611867c09a29d3fa8a1c3c7378e16 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Acid=20Chicken=20=28=E7=A1=AB=E9=85=B8=E9=B6=8F=29?=
 <root@acid-chicken.com>
Date: Wed, 13 Feb 2019 21:43:58 +0900
Subject: [PATCH] Add GIF badge (#4241)

---
 .../common/views/components/media-image.vue   | 21 ++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/src/client/app/common/views/components/media-image.vue b/src/client/app/common/views/components/media-image.vue
index 4a99b953ef..bd6c974def 100644
--- a/src/client/app/common/views/components/media-image.vue
+++ b/src/client/app/common/views/components/media-image.vue
@@ -10,7 +10,9 @@
 	:style="style"
 	:title="image.name"
 	@click.prevent="onClick"
-></a>
+>
+	<div v-if="image.type === 'image/gif'">GIF</div>
+</a>
 </template>
 
 <script lang="ts">
@@ -76,6 +78,23 @@ export default Vue.extend({
 	background-size contain
 	background-repeat no-repeat
 
+	> div
+		background-color var(--text)
+		border-radius var(--round)
+		color var(--secondary)
+		display inline-block
+		font-size 14px
+		font-weight 900
+		height 24px
+		left calc(var(--round) * 2)
+		line-height 1
+		opacity .5
+		padding 5px 0
+		text-align center
+		top calc(var(--round) * 2)
+		vertical-align middle
+		width 36px
+
 .qjewsnkgzzxlxtzncydssfbgjibiehcy
 	display flex
 	justify-content center