diff options
Diffstat (limited to 'src/client')
| -rw-r--r-- | src/client/pages/my-groups/group.vue | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/client/pages/my-groups/group.vue b/src/client/pages/my-groups/group.vue index 67f5f9754f..c8170a2a57 100644 --- a/src/client/pages/my-groups/group.vue +++ b/src/client/pages/my-groups/group.vue @@ -7,6 +7,7 @@ <div v-if="group" class="_card"> <div class="_content"> <mk-button inline @click="renameGroup()">{{ $t('rename') }}</mk-button> + <mk-button inline @click="transfer()">{{ $t('transfer') }}</mk-button> <mk-button inline @click="deleteGroup()">{{ $t('delete') }}</mk-button> </div> </div> @@ -135,6 +136,25 @@ export default Vue.extend({ this.group.name = name; }, + transfer() { + this.$root.new(MkUserSelect, {}).$once('selected', user => { + this.$root.api('users/groups/transfer', { + groupId: this.group.id, + userId: user.id + }).then(() => { + this.$root.dialog({ + type: 'success', + iconOnly: true, autoClose: true + }); + }).catch(e => { + this.$root.dialog({ + type: 'error', + text: e + }); + }); + }); + }, + async deleteGroup() { const { canceled } = await this.$root.dialog({ type: 'warning', |