wip
This commit is contained in:
parent
f8580211ff
commit
697cbc3aa7
4 changed files with 43 additions and 43 deletions
|
@ -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>
|
|
33
src/web/app/desktop/views/components/messaging-window.vue
Normal file
33
src/web/app/desktop/views/components/messaging-window.vue
Normal 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>
|
|
@ -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="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 :class="$style.count" v-if="uploadings.length != 0">{{ '%i18n:desktop.tags.mk-post-form-window.uploading-media%'.replace('{}', uploadings.length) }}<mk-ellipsis/></span>
|
||||||
</span>
|
</span>
|
||||||
<div slot="content">
|
|
||||||
<mk-post-preview v-if="reply" :class="$style.postPreview" :post="reply"/>
|
<mk-post-preview v-if="reply" :class="$style.postPreview" :post="reply"/>
|
||||||
<mk-post-form ref="form"
|
<mk-post-form ref="form"
|
||||||
:reply="reply"
|
:reply="reply"
|
||||||
@posted="onPosted"
|
@posted="onPosted"
|
||||||
@change-uploadings="onChangeUploadings"
|
@change-uploadings="onChangeUploadings"
|
||||||
@change-attached-media="onChangeMedia"/>
|
@change-attached-media="onChangeMedia"/>
|
||||||
</div>
|
|
||||||
</mk-window>
|
</mk-window>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,9 @@
|
||||||
<button class="close" v-if="canClose" @mousedown.stop="() => {}" @click="close" title="閉じる">%fa:times%</button>
|
<button class="close" v-if="canClose" @mousedown.stop="() => {}" @click="close" title="閉じる">%fa:times%</button>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div class="content"><slot name="content"></slot></div>
|
<div class="content">
|
||||||
|
<slot></slot>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="handle top" v-if="canResize" @mousedown.prevent="onTopHandleMousedown"></div>
|
<div class="handle top" v-if="canResize" @mousedown.prevent="onTopHandleMousedown"></div>
|
||||||
<div class="handle right" v-if="canResize" @mousedown.prevent="onRightHandleMousedown"></div>
|
<div class="handle right" v-if="canResize" @mousedown.prevent="onRightHandleMousedown"></div>
|
||||||
|
|
Loading…
Reference in a new issue