mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-23 02:17:40 -07:00
wip
This commit is contained in:
parent
9cd844bf17
commit
ff4a18da6e
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="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-window>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue