forked from FoundKeyGang/FoundKey
wip
This commit is contained in:
parent
1136457fb8
commit
e1cbaf2c5a
3 changed files with 13 additions and 3 deletions
|
@ -5,9 +5,11 @@ import signup from './signup.vue';
|
||||||
import forkit from './forkit.vue';
|
import forkit from './forkit.vue';
|
||||||
import nav from './nav.vue';
|
import nav from './nav.vue';
|
||||||
import postHtml from './post-html';
|
import postHtml from './post-html';
|
||||||
|
import reactionIcon from './reaction-icon.vue';
|
||||||
|
|
||||||
Vue.component('mk-signin', signin);
|
Vue.component('mk-signin', signin);
|
||||||
Vue.component('mk-signup', signup);
|
Vue.component('mk-signup', signup);
|
||||||
Vue.component('mk-forkit', forkit);
|
Vue.component('mk-forkit', forkit);
|
||||||
Vue.component('mk-nav', nav);
|
Vue.component('mk-nav', nav);
|
||||||
Vue.component('mk-post-html', postHtml);
|
Vue.component('mk-post-html', postHtml);
|
||||||
|
Vue.component('mk-reaction-icon', reactionIcon);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<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 == '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 == '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%">
|
<img v-if="reaction == 'laugh'" src="/assets/reactions/laugh.png" alt="%i18n:common.reactions.laugh%">
|
||||||
|
@ -12,7 +12,15 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import Vue from 'vue';
|
||||||
|
export default Vue.extend({
|
||||||
|
props: ['reaction']
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
|
.mk-reaction-icon
|
||||||
img
|
img
|
||||||
vertical-align middle
|
vertical-align middle
|
||||||
width 1em
|
width 1em
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
<div class="info">
|
<div class="info">
|
||||||
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
|
<span class="app" v-if="p.app">via <b>{{ p.app.name }}</b></span>
|
||||||
<a class="created-at" :href="url">
|
<a class="created-at" :href="url">
|
||||||
<mk-time time="p.created_at"/>
|
<mk-time :time="p.created_at"/>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
@ -188,7 +188,7 @@ export default Vue.extend({
|
||||||
react() {
|
react() {
|
||||||
document.body.appendChild(new MkReactionPicker({
|
document.body.appendChild(new MkReactionPicker({
|
||||||
propsData: {
|
propsData: {
|
||||||
source: this.$refs.menuButton,
|
source: this.$refs.reactButton,
|
||||||
post: this.p
|
post: this.p
|
||||||
}
|
}
|
||||||
}).$mount().$el);
|
}).$mount().$el);
|
||||||
|
|
Loading…
Reference in a new issue