parent
61f54f8f74
commit
c7cc3dcdfd
65 changed files with 1797 additions and 638 deletions
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="mk-messaging-room-page">
|
||||
<x-messaging-room v-if="user" :user="user" :is-naked="true"/>
|
||||
<x-messaging-room v-if="user || group" :user="user" :group="group" :is-naked="true"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
|
@ -19,7 +19,8 @@ export default Vue.extend({
|
|||
data() {
|
||||
return {
|
||||
fetching: true,
|
||||
user: null
|
||||
user: null,
|
||||
group: null
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
|
|
@ -47,14 +48,25 @@ export default Vue.extend({
|
|||
Progress.start();
|
||||
this.fetching = true;
|
||||
|
||||
this.$root.api('users/show', parseAcct(this.$route.params.user)).then(user => {
|
||||
this.user = user;
|
||||
this.fetching = false;
|
||||
if (this.$route.params.user) {
|
||||
this.$root.api('users/show', parseAcct(this.$route.params.user)).then(user => {
|
||||
this.user = user;
|
||||
this.fetching = false;
|
||||
|
||||
document.title = this.$t('@.messaging') + ': ' + getUserName(this.user);
|
||||
document.title = this.$t('@.messaging') + ': ' + getUserName(this.user);
|
||||
|
||||
Progress.done();
|
||||
});
|
||||
Progress.done();
|
||||
});
|
||||
} else {
|
||||
this.$root.api('users/groups/show', { groupId: this.$route.params.group }).then(group => {
|
||||
this.group = group;
|
||||
this.fetching = false;
|
||||
|
||||
document.title = this.$t('@.messaging') + ': ' + this.group.name;
|
||||
|
||||
Progress.done();
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue