wip
This commit is contained in:
@@ -15,9 +15,7 @@ import specialMessage from './special-message.vue';
|
||||
import streamIndicator from './stream-indicator.vue';
|
||||
import ellipsis from './ellipsis.vue';
|
||||
import messaging from './messaging.vue';
|
||||
import messagingForm from './messaging-form.vue';
|
||||
import messagingRoom from './messaging-room.vue';
|
||||
import messagingMessage from './messaging-message.vue';
|
||||
import urlPreview from './url-preview.vue';
|
||||
|
||||
Vue.component('mk-signin', signin);
|
||||
@@ -35,7 +33,5 @@ Vue.component('mk-special-message', specialMessage);
|
||||
Vue.component('mk-stream-indicator', streamIndicator);
|
||||
Vue.component('mk-ellipsis', ellipsis);
|
||||
Vue.component('mk-messaging', messaging);
|
||||
Vue.component('mk-messaging-form', messagingForm);
|
||||
Vue.component('mk-messaging-room', messagingRoom);
|
||||
Vue.component('mk-messaging-message', messagingMessage);
|
||||
Vue.component('mk-url-preview', urlPreview);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="mk-messaging-message" :data-is-me="isMe">
|
||||
<div class="message" :data-is-me="isMe">
|
||||
<a class="avatar-anchor" :href="`/${message.user.username}`" :title="message.user.username" target="_blank">
|
||||
<img class="avatar" :src="`${message.user.avatar_url}?thumbnail&size=80`" alt=""/>
|
||||
</a>
|
||||
@@ -51,7 +51,7 @@ export default Vue.extend({
|
||||
</script>
|
||||
|
||||
<style lang="stylus" scoped>
|
||||
.mk-messaging-message
|
||||
.message
|
||||
$me-balloon-color = #23A7B6
|
||||
|
||||
padding 10px 12px 10px 12px
|
||||
@@ -181,7 +181,7 @@ export default Vue.extend({
|
||||
> [data-fa]
|
||||
margin-left 4px
|
||||
|
||||
&:not([data-is-me='true'])
|
||||
&:not([data-is-me])
|
||||
> .avatar-anchor
|
||||
float left
|
||||
|
||||
@@ -201,7 +201,7 @@ export default Vue.extend({
|
||||
> footer
|
||||
text-align left
|
||||
|
||||
&[data-is-me='true']
|
||||
&[data-is-me]
|
||||
> .avatar-anchor
|
||||
float right
|
||||
|
||||
@@ -224,14 +224,14 @@ export default Vue.extend({
|
||||
> p.is-deleted
|
||||
color rgba(255, 255, 255, 0.5)
|
||||
|
||||
> [ref='text']
|
||||
> .text
|
||||
&, *
|
||||
color #fff !important
|
||||
|
||||
> footer
|
||||
text-align right
|
||||
|
||||
&[data-is-deleted='true']
|
||||
&[data-is-deleted]
|
||||
> .content-container
|
||||
opacity 0.5
|
||||
|
||||
@@ -8,14 +8,16 @@
|
||||
<template v-if="fetchingMoreMessages">%fa:spinner .pulse .fw%</template>{{ fetchingMoreMessages ? '%i18n:common.loading%' : '%i18n:common.tags.mk-messaging-room.more%' }}
|
||||
</button>
|
||||
<template v-for="(message, i) in _messages">
|
||||
<mk-messaging-message :message="message" :key="message.id"/>
|
||||
<p class="date" :key="message.id + '-time'" v-if="i != messages.length - 1 && message._date != _messages[i + 1]._date"><span>{{ _messages[i + 1]._datetext }}</span></p>
|
||||
<x-message :message="message" :key="message.id"/>
|
||||
<p class="date" v-if="i != messages.length - 1 && message._date != _messages[i + 1]._date">
|
||||
<span>{{ _messages[i + 1]._datetext }}</span>
|
||||
</p>
|
||||
</template>
|
||||
</div>
|
||||
<footer>
|
||||
<div ref="notifications"></div>
|
||||
<div class="grippie" title="%i18n:common.tags.mk-messaging-room.resize-form%"></div>
|
||||
<mk-messaging-form :user="user"/>
|
||||
<x-form :user="user"/>
|
||||
</footer>
|
||||
</div>
|
||||
</template>
|
||||
@@ -23,8 +25,14 @@
|
||||
<script lang="ts">
|
||||
import Vue from 'vue';
|
||||
import MessagingStreamConnection from '../../scripts/streaming/messaging-stream';
|
||||
import XMessage from './messaging-room.message.vue';
|
||||
import XForm from './messaging-room.form.vue';
|
||||
|
||||
export default Vue.extend({
|
||||
components: {
|
||||
XMessage,
|
||||
XForm
|
||||
},
|
||||
props: ['user', 'isNaked'],
|
||||
data() {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user