2018-02-15 12:36:42 +09:00
|
|
|
<template>
|
|
|
|
<div class="mkw-messaging">
|
2018-04-20 07:45:37 +09:00
|
|
|
<mk-widget-container :show-header="props.design == 0">
|
|
|
|
<template slot="header">%fa:comments%%i18n:@title%</template>
|
2018-04-20 12:18:50 +09:00
|
|
|
<button slot="func" @click="add">%fa:plus%</button>
|
2018-04-20 07:45:37 +09:00
|
|
|
|
|
|
|
<mk-messaging ref="index" compact @navigate="navigate"/>
|
|
|
|
</mk-widget-container>
|
2018-02-15 12:36:42 +09:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2018-02-25 00:18:09 +09:00
|
|
|
import define from '../../../common/define-widget';
|
|
|
|
import MkMessagingRoomWindow from '../components/messaging-room-window.vue';
|
2018-04-20 12:18:50 +09:00
|
|
|
import MkMessagingWindow from '../components/messaging-window.vue';
|
2018-02-22 01:08:49 +09:00
|
|
|
|
2018-02-15 12:36:42 +09:00
|
|
|
export default define({
|
|
|
|
name: 'messaging',
|
2018-02-21 15:30:03 +09:00
|
|
|
props: () => ({
|
2018-02-15 12:36:42 +09:00
|
|
|
design: 0
|
2018-02-21 15:30:03 +09:00
|
|
|
})
|
2018-02-15 12:36:42 +09:00
|
|
|
}).extend({
|
|
|
|
methods: {
|
|
|
|
navigate(user) {
|
2018-02-22 23:53:07 +09:00
|
|
|
(this as any).os.new(MkMessagingRoomWindow, {
|
|
|
|
user: user
|
|
|
|
});
|
2018-02-15 12:36:42 +09:00
|
|
|
},
|
2018-04-20 12:18:50 +09:00
|
|
|
add() {
|
|
|
|
(this as any).os.new(MkMessagingWindow);
|
|
|
|
},
|
2018-02-15 12:36:42 +09:00
|
|
|
func() {
|
|
|
|
if (this.props.design == 1) {
|
|
|
|
this.props.design = 0;
|
|
|
|
} else {
|
|
|
|
this.props.design++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.mkw-messaging
|
2018-04-20 08:05:57 +09:00
|
|
|
.mk-messaging
|
2018-02-15 12:36:42 +09:00
|
|
|
max-height 250px
|
|
|
|
overflow auto
|
|
|
|
|
|
|
|
</style>
|