diff --git a/resources/assets/components/groups/GroupSettings.vue b/resources/assets/components/groups/GroupSettings.vue index 099d598f2..303269ced 100644 --- a/resources/assets/components/groups/GroupSettings.vue +++ b/resources/assets/components/groups/GroupSettings.vue @@ -228,7 +228,7 @@ Update · - + Delete

@@ -256,7 +256,7 @@ Update · - + Delete

@@ -983,6 +983,30 @@ return `/groups/${this.groupId}/members?a=il&pid=${pid}`; }, + handleDeleteAvatar() { + if(!window.confirm('Are you sure you want to delete your group avatar image?')) { + return; + } + this.savingChanges = true; + axios.post('/api/v0/groups/' + this.group.id + '/settings/delete-avatar') + .then(res => { + this.savingChanges = false; + this.group = res.data; + }); + }, + + handleDeleteHeader() { + if(!window.confirm('Are you sure you want to delete your group header image?')) { + return; + } + this.savingChanges = true; + axios.post('/api/v0/groups/' + this.group.id + '/settings/delete-header') + .then(res => { + this.savingChanges = false; + this.group = res.data; + }); + }, + undoBlock(type, val) { let action = type == 'moderate' ? `unblock ${val}?` : `allow anyone to join without approval from ${val}?`; swal({