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