This commit is contained in:
こぴなたみぽ 2018-02-16 17:01:36 +09:00
parent f8580211ff
commit 697cbc3aa7
4 changed files with 43 additions and 43 deletions

View File

@ -1,34 +0,0 @@
<mk-messaging-window>
<mk-window ref="window" is-modal={ false } width={ '500px' } height={ '560px' }>
<yield to="header">%fa:comments%メッセージ</yield>
<yield to="content">
<mk-messaging ref="index"/>
</yield>
</mk-window>
<style lang="stylus" scoped>
:scope
> mk-window
[data-yield='header']
> [data-fa]
margin-right 4px
[data-yield='content']
> mk-messaging
height 100%
overflow auto
</style>
<script lang="typescript">
this.on('mount', () => {
this.$refs.window.on('closed', () => {
this.$destroy();
});
this.$refs.window.refs.index.on('navigate-user', user => {
riot.mount(document.body.appendChild(document.createElement('mk-messaging-room-window')), {
user: user
});
});
});
</script>
</mk-messaging-window>

View File

@ -0,0 +1,33 @@
<template>
<mk-window ref="window" width='500px' height='560px' @closed="$destroy">
<span slot="header" :class="$style.header">%fa:comments%メッセージ</span>
<mk-messaging :class="$style.content" @navigate="navigate"/>
</mk-window>
</template>
<script lang="ts">
import Vue from 'vue';
export default Vue.extend({
methods: {
navigate(user) {
document.body.appendChild(new MkMessagingRoomWindow({
parent: this,
propsData: {
user: user
}
}).$mount().$el);
}
}
});
</script>
<style lang="stylus" module>
.header
> [data-fa]
margin-right 4px
.content
height 100%
overflow auto
</style>

View File

@ -6,14 +6,13 @@
<span :class="$style.count" v-if="media.length != 0">{{ '%i18n:desktop.tags.mk-post-form-window.attaches%'.replace('{}', media.length) }}</span>
<span :class="$style.count" v-if="uploadings.length != 0">{{ '%i18n:desktop.tags.mk-post-form-window.uploading-media%'.replace('{}', uploadings.length) }}<mk-ellipsis/></span>
</span>
<div slot="content">
<mk-post-preview v-if="reply" :class="$style.postPreview" :post="reply"/>
<mk-post-form ref="form"
:reply="reply"
@posted="onPosted"
@change-uploadings="onChangeUploadings"
@change-attached-media="onChangeMedia"/>
</div>
<mk-post-preview v-if="reply" :class="$style.postPreview" :post="reply"/>
<mk-post-form ref="form"
:reply="reply"
@posted="onPosted"
@change-uploadings="onChangeUploadings"
@change-attached-media="onChangeMedia"/>
</mk-window>
</template>

View File

@ -10,7 +10,9 @@
<button class="close" v-if="canClose" @mousedown.stop="() => {}" @click="close" title="閉じる">%fa:times%</button>
</div>
</header>
<div class="content"><slot name="content"></slot></div>
<div class="content">
<slot></slot>
</div>
</div>
<div class="handle top" v-if="canResize" @mousedown.prevent="onTopHandleMousedown"></div>
<div class="handle right" v-if="canResize" @mousedown.prevent="onRightHandleMousedown"></div>