2018-02-15 05:36:42 +02:00
|
|
|
<template>
|
|
|
|
<div class="mkw-messaging">
|
|
|
|
<p class="title" v-if="props.design == 0">%fa:comments%%i18n:desktop.tags.mk-messaging-home-widget.title%</p>
|
|
|
|
<mk-messaging ref="index" compact @navigate="navigate"/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2018-02-18 16:51:41 +02:00
|
|
|
import define from '../../../../common/define-widget';
|
2018-02-21 18:08:49 +02:00
|
|
|
import MkMessagingRoomWindow from '../messaging-room-window.vue';
|
|
|
|
|
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({
|
|
|
|
methods: {
|
|
|
|
navigate(user) {
|
2018-02-22 16:53:07 +02:00
|
|
|
(this as any).os.new(MkMessagingRoomWindow, {
|
|
|
|
user: user
|
|
|
|
});
|
2018-02-15 05:36:42 +02:00
|
|
|
},
|
|
|
|
func() {
|
|
|
|
if (this.props.design == 1) {
|
|
|
|
this.props.design = 0;
|
|
|
|
} else {
|
|
|
|
this.props.design++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.mkw-messaging
|
|
|
|
overflow hidden
|
|
|
|
background #fff
|
|
|
|
border solid 1px rgba(0, 0, 0, 0.075)
|
|
|
|
border-radius 6px
|
|
|
|
|
|
|
|
> .title
|
|
|
|
z-index 2
|
|
|
|
margin 0
|
|
|
|
padding 0 16px
|
|
|
|
line-height 42px
|
|
|
|
font-size 0.9em
|
|
|
|
font-weight bold
|
|
|
|
color #888
|
|
|
|
box-shadow 0 1px rgba(0, 0, 0, 0.07)
|
|
|
|
|
|
|
|
> [data-fa]
|
|
|
|
margin-right 4px
|
|
|
|
|
2018-02-16 20:01:00 +02:00
|
|
|
> .mk-messaging
|
2018-02-15 05:36:42 +02:00
|
|
|
max-height 250px
|
|
|
|
overflow auto
|
|
|
|
|
|
|
|
</style>
|