summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-02-13 12:32:00 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-02-13 12:32:00 +0900
commite1cbaf2c5a2e14d64e85556b15b9b45ca044ec3e (patch)
treec44a4b09916526c58adb8c7a54f791aa7b817f34
parentwip (diff)
downloadsharkey-e1cbaf2c5a2e14d64e85556b15b9b45ca044ec3e.tar.gz
sharkey-e1cbaf2c5a2e14d64e85556b15b9b45ca044ec3e.tar.bz2
sharkey-e1cbaf2c5a2e14d64e85556b15b9b45ca044ec3e.zip
wip
-rw-r--r--src/web/app/common/views/components/index.ts2
-rw-r--r--src/web/app/common/views/components/reaction-icon.vue10
-rw-r--r--src/web/app/desktop/views/components/posts-post.vue4
3 files changed, 13 insertions, 3 deletions
diff --git a/src/web/app/common/views/components/index.ts b/src/web/app/common/views/components/index.ts
index c4c3475ee2..26213297a8 100644
--- a/src/web/app/common/views/components/index.ts
+++ b/src/web/app/common/views/components/index.ts
@@ -5,9 +5,11 @@ import signup from './signup.vue';
import forkit from './forkit.vue';
import nav from './nav.vue';
import postHtml from './post-html';
+import reactionIcon from './reaction-icon.vue';
Vue.component('mk-signin', signin);
Vue.component('mk-signup', signup);
Vue.component('mk-forkit', forkit);
Vue.component('mk-nav', nav);
Vue.component('mk-post-html', postHtml);
+Vue.component('mk-reaction-icon', reactionIcon);
diff --git a/src/web/app/common/views/components/reaction-icon.vue b/src/web/app/common/views/components/reaction-icon.vue
index 317daf0feb..7d24f4f9e9 100644
--- a/src/web/app/common/views/components/reaction-icon.vue
+++ b/src/web/app/common/views/components/reaction-icon.vue
@@ -1,5 +1,5 @@
<template>
-<span>
+<span class="mk-reaction-icon">
<img v-if="reaction == 'like'" src="/assets/reactions/like.png" alt="%i18n:common.reactions.like%">
<img v-if="reaction == 'love'" src="/assets/reactions/love.png" alt="%i18n:common.reactions.love%">
<img v-if="reaction == 'laugh'" src="/assets/reactions/laugh.png" alt="%i18n:common.reactions.laugh%">
@@ -12,7 +12,15 @@
</span>
</template>
+<script lang="ts">
+import Vue from 'vue';
+export default Vue.extend({
+ props: ['reaction']
+});
+</script>
+
<style lang="stylus" scoped>
+.mk-reaction-icon
img
vertical-align middle
width 1em
diff --git a/src/web/app/desktop/views/components/posts-post.vue b/src/web/app/desktop/views/components/posts-post.vue
index 9991d145e4..cc2d7534a8 100644
--- a/src/web/app/desktop/views/components/posts-post.vue
+++ b/src/web/app/desktop/views/components/posts-post.vue
@@ -24,7 +24,7 @@
<div class="info">
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
<a class="created-at" :href="url">
- <mk-time time="p.created_at"/>
+ <mk-time :time="p.created_at"/>
</a>
</div>
</header>
@@ -188,7 +188,7 @@ export default Vue.extend({
react() {
document.body.appendChild(new MkReactionPicker({
propsData: {
- source: this.$refs.menuButton,
+ source: this.$refs.reactButton,
post: this.p
}
}).$mount().$el);