This commit is contained in:
syuilo 2018-02-19 00:18:01 +09:00
parent df67bbac9f
commit fed959ae9a
4 changed files with 17 additions and 12 deletions

View file

@ -1,5 +1,5 @@
<template>
<div>
<div class="mk-messaging-form">
<textarea v-model="text" @keypress="onKeypress" @paste="onPaste" placeholder="%i18n:common.input-message-here%"></textarea>
<div class="files"></div>
<mk-uploader ref="uploader"/>

View file

@ -1,23 +1,28 @@
<template>
<div class="mk-messaging-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 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>
<div class="content-container">
<div class="balloon">
<p class="read" v-if="message.is_me && message.is_read">%i18n:common.tags.mk-messaging-message.is-read%</p>
<button class="delete-button" v-if="message.is_me" title="%i18n:common.delete%"><img src="/assets/desktop/messaging/delete.png" alt="Delete"/></button>
<button class="delete-button" v-if="message.is_me" title="%i18n:common.delete%">
<img src="/assets/desktop/messaging/delete.png" alt="Delete"/>
</button>
<div class="content" v-if="!message.is_deleted">
<mk-post-html v-if="message.ast" :ast="message.ast" :i="os.i"/>
<mk-post-html class="text" v-if="message.ast" :ast="message.ast" :i="os.i"/>
<mk-url-preview v-for="url in urls" :url="url" :key="url"/>
<div class="image" v-if="message.file"><img src={ message.file.url } alt="image" title={ message.file.name }/></div>
<div class="image" v-if="message.file">
<img :src="message.file.url" alt="image" :title="message.file.name"/>
</div>
</div>
<div class="content" v-if="message.is_deleted">
<p class="is-deleted">%i18n:common.tags.mk-messaging-message.deleted%</p>
</div>
</div>
<footer>
<mk-time time={ message.created_at }/><template v-if="message.is_edited">%fa:pencil-alt%</template>
<mk-time :time="message.created_at"/>
<template v-if="message.is_edited">%fa:pencil-alt%</template>
</footer>
</div>
</div>
@ -139,7 +144,7 @@ export default Vue.extend({
font-size 1em
color rgba(0, 0, 0, 0.5)
> [ref='text']
> .text
display block
margin 0
padding 8px 16px

View file

@ -3,8 +3,8 @@
<div class="stream">
<p class="init" v-if="init">%fa:spinner .spin%%i18n:common.loading%</p>
<p class="empty" v-if="!init && messages.length == 0">%fa:info-circle%%i18n:common.tags.mk-messaging-room.empty%</p>
<p class="no-history" v-if="!init && messages.length > 0 && !moreMessagesIsInStock">%fa:flag%%i18n:common.tags.mk-messaging-room.no-history%</p>
<button class="more" :class="{ fetching: fetchingMoreMessages }" v-if="moreMessagesIsInStock" @click="fetchMoreMessages" :disabled="fetchingMoreMessages">
<p class="no-history" v-if="!init && messages.length > 0 && !existMoreMessages">%fa:flag%%i18n:common.tags.mk-messaging-room.no-history%</p>
<button class="more" :class="{ fetching: fetchingMoreMessages }" v-if="existMoreMessages" @click="fetchMoreMessages" :disabled="fetchingMoreMessages">
<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">

View file

@ -4,7 +4,7 @@
<p v-if="usage" :class="$style.info"><b>{{ usage.toFixed(1) }}%</b> %i18n:desktop.tags.mk-drive-browser-window.used%</p>
<span :class="$style.title">%fa:cloud%%i18n:desktop.tags.mk-drive-browser-window.drive%</span>
</template>
<mk-drive-browser multiple :folder="folder" ref="browser"/>
<mk-drive multiple :folder="folder" ref="browser"/>
</mk-window>
</template>