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