1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-27 13:08:23 +09:00
misskey/src/client/app/common/views/components/renote.vue

105 lines
1.9 KiB
Vue
Raw Normal View History

2018-11-19 02:04:12 +09:00
<template>
<div class="puqkfets" :class="{ mini: narrow }">
2018-11-19 02:04:12 +09:00
<mk-avatar class="avatar" :user="note.user"/>
<fa icon="retweet"/>
<i18n path="@.renoted-by" tag="span">
<router-link class="name" :to="note.user | userPage" v-user-preview="note.userId" place="user">
2018-12-06 16:09:33 +09:00
<mk-user-name :user="note.user"/>
</router-link>
2018-11-19 02:04:12 +09:00
</i18n>
<div class="info">
2018-11-19 02:09:27 +09:00
<span class="mobile" v-if="note.viaMobile"><fa icon="mobile-alt"/></span>
2018-11-19 02:04:12 +09:00
<mk-time :time="note.createdAt"/>
<span class="visibility" v-if="note.visibility != 'public'">
<fa v-if="note.visibility == 'home'" icon="home"/>
<fa v-if="note.visibility == 'followers'" icon="unlock"/>
<fa v-if="note.visibility == 'specified'" icon="envelope"/>
2018-11-19 02:04:12 +09:00
</span>
<span class="localOnly" v-if="note.localOnly == true"><fa icon="heart"/></span>
</div>
</div>
</template>
<script lang="ts">
import Vue from 'vue';
import i18n from '../../../i18n';
export default Vue.extend({
i18n: i18n(),
props: {
note: {
type: Object,
required: true
}
},
inject: {
narrow: {
2018-11-19 02:04:12 +09:00
default: false
}
},
2018-11-19 02:04:12 +09:00
});
</script>
<style lang="stylus" scoped>
.puqkfets
display flex
align-items center
padding 8px 16px
2018-11-19 02:04:12 +09:00
line-height 28px
white-space pre
color var(--renoteText)
background linear-gradient(to bottom, var(--renoteGradient) 0%, var(--face) 100%)
&:not(.mini)
2018-11-19 02:04:12 +09:00
padding 8px 16px
@media (min-width 500px)
padding 8px 16px
2018-11-19 02:04:12 +09:00
@media (min-width 600px)
padding 16px 32px 8px 32px
2018-11-19 02:04:12 +09:00
> .avatar
flex-shrink 0
display inline-block
width 28px
height 28px
margin 0 8px 0 0
border-radius 6px
> [data-icon]
margin-right 4px
> span
overflow hidden
flex-shrink 1
text-overflow ellipsis
white-space nowrap
> .name
font-weight bold
> .info
margin-left auto
font-size 0.9em
2018-11-19 02:09:27 +09:00
> .mobile
margin-right 8px
2018-11-19 02:04:12 +09:00
> .mk-time
flex-shrink 0
> .visibility
margin-left 8px
[data-icon]
margin-right 0
> .localOnly
margin-left 4px
[data-icon]
margin-right 0
</style>