mirror of
https://github.com/kokonect-link/cherrypick
synced 2024-12-23 02:58:22 +09:00
9f5dc2c0df
* wip * Rename * Clean up * Clean up * wip * wip * Enable tree shaking * ✌️ * ✌️ * wip * wip * Clean up
51 lines
1.0 KiB
Vue
51 lines
1.0 KiB
Vue
<template>
|
|
<div class="mkw-messaging">
|
|
<mk-widget-container :show-header="props.design == 0">
|
|
<template slot="header"><fa icon="comments"/>%i18n:@title%</template>
|
|
<button slot="func" @click="add"><fa icon="plus"/></button>
|
|
|
|
<mk-messaging ref="index" compact @navigate="navigate"/>
|
|
</mk-widget-container>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import define from '../../../common/define-widget';
|
|
import MkMessagingRoomWindow from '../components/messaging-room-window.vue';
|
|
import MkMessagingWindow from '../components/messaging-window.vue';
|
|
|
|
export default define({
|
|
name: 'messaging',
|
|
props: () => ({
|
|
design: 0
|
|
})
|
|
}).extend({
|
|
methods: {
|
|
navigate(user) {
|
|
(this as any).os.new(MkMessagingRoomWindow, {
|
|
user: user
|
|
});
|
|
},
|
|
add() {
|
|
(this as any).os.new(MkMessagingWindow);
|
|
},
|
|
func() {
|
|
if (this.props.design == 1) {
|
|
this.props.design = 0;
|
|
} else {
|
|
this.props.design++;
|
|
}
|
|
this.save();
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<style lang="stylus" scoped>
|
|
.mkw-messaging
|
|
.mk-messaging
|
|
max-height 250px
|
|
overflow auto
|
|
|
|
</style>
|