mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-14 20:03:09 +02:00
25a69ec1b6
Refactoring of i18n
52 lines
1.1 KiB
Vue
52 lines
1.1 KiB
Vue
<template>
|
|
<div class="mkw-messaging">
|
|
<mk-widget-container :show-header="props.design == 0">
|
|
<template slot="header"><fa icon="comments"/>{{ $t('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 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'),
|
|
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>
|