2018-02-14 21:36:42 -06:00
|
|
|
<template>
|
|
|
|
<div class="mkw-messaging">
|
2019-02-15 00:35:52 -06:00
|
|
|
<ui-container :show-header="props.design == 0">
|
2019-03-19 03:45:46 -05:00
|
|
|
<template #header><fa icon="comments"/>{{ $t('@.messaging') }}</template>
|
2019-02-17 20:13:56 -06:00
|
|
|
<template #func><button @click="add"><fa icon="plus"/></button></template>
|
2018-04-19 17:45:37 -05:00
|
|
|
|
2018-11-11 14:35:09 -06:00
|
|
|
<x-messaging ref="index" compact @navigate="navigate"/>
|
2019-02-15 00:35:52 -06:00
|
|
|
</ui-container>
|
2018-02-14 21:36:42 -06:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2018-02-24 09:18:09 -06:00
|
|
|
import define from '../../../common/define-widget';
|
2018-11-08 12:44:35 -06:00
|
|
|
import i18n from '../../../i18n';
|
2018-02-24 09:18:09 -06:00
|
|
|
import MkMessagingRoomWindow from '../components/messaging-room-window.vue';
|
2018-04-19 22:18:50 -05:00
|
|
|
import MkMessagingWindow from '../components/messaging-window.vue';
|
2018-02-21 10:08:49 -06:00
|
|
|
|
2018-02-14 21:36:42 -06:00
|
|
|
export default define({
|
|
|
|
name: 'messaging',
|
2018-02-21 00:30:03 -06:00
|
|
|
props: () => ({
|
2018-02-14 21:36:42 -06:00
|
|
|
design: 0
|
2018-02-21 00:30:03 -06:00
|
|
|
})
|
2018-02-14 21:36:42 -06:00
|
|
|
}).extend({
|
2019-03-19 03:45:46 -05:00
|
|
|
i18n: i18n(''),
|
2018-11-11 14:35:09 -06:00
|
|
|
components: {
|
|
|
|
XMessaging: () => import('../../../common/views/components/messaging.vue').then(m => m.default)
|
|
|
|
},
|
2018-02-14 21:36:42 -06:00
|
|
|
methods: {
|
|
|
|
navigate(user) {
|
2018-11-08 17:13:34 -06:00
|
|
|
this.$root.new(MkMessagingRoomWindow, {
|
2018-02-22 08:53:07 -06:00
|
|
|
user: user
|
|
|
|
});
|
2018-02-14 21:36:42 -06:00
|
|
|
},
|
2018-04-19 22:18:50 -05:00
|
|
|
add() {
|
2018-11-08 17:13:34 -06:00
|
|
|
this.$root.new(MkMessagingWindow);
|
2018-04-19 22:18:50 -05:00
|
|
|
},
|
2018-02-14 21:36:42 -06:00
|
|
|
func() {
|
|
|
|
if (this.props.design == 1) {
|
|
|
|
this.props.design = 0;
|
|
|
|
} else {
|
|
|
|
this.props.design++;
|
|
|
|
}
|
2018-04-29 03:17:15 -05:00
|
|
|
this.save();
|
2018-02-14 21:36:42 -06:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.mkw-messaging
|
2018-04-19 18:05:57 -05:00
|
|
|
.mk-messaging
|
2018-02-14 21:36:42 -06:00
|
|
|
max-height 250px
|
|
|
|
overflow auto
|
|
|
|
|
|
|
|
</style>
|