ユーザーグループ

Resolve #3218
This commit is contained in:
syuilo 2019-05-18 20:36:33 +09:00
parent 61f54f8f74
commit c7cc3dcdfd
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69
65 changed files with 1797 additions and 638 deletions

View file

@ -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();
});
}
}
}
});