1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-26 04:28:28 +09:00
misskey/src/client/app/desktop/views/widgets/messaging.vue
2019-02-18 11:13:56 +09:00

56 lines
1.2 KiB
Vue

<template>
<div class="mkw-messaging">
<ui-container :show-header="props.design == 0">
<template #header><fa icon="comments"/>{{ $t('title') }}</template>
<template #func><button @click="add"><fa icon="plus"/></button></template>
<x-messaging ref="index" compact @navigate="navigate"/>
</ui-container>
</div>
</template>
<script lang="ts">
import define from '../../../common/define-widget';
import i18n from '../../../i18n';
import MkMessagingRoomWindow from '../components/messaging-room-window.vue';
import MkMessagingWindow from '../components/messaging-window.vue';
export default define({
name: 'messaging',
props: () => ({
design: 0
})
}).extend({
i18n: i18n('desktop/views/widgets/messaging.vue'),
components: {
XMessaging: () => import('../../../common/views/components/messaging.vue').then(m => m.default)
},
methods: {
navigate(user) {
this.$root.new(MkMessagingRoomWindow, {
user: user
});
},
add() {
this.$root.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>