File tree Expand file tree Collapse file tree
src/components/profile/edit Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717 >
1818 <EditPictureModal
1919 v-if =" showPictureModal"
20- v-bind =" { picture, username: loggedInUser, staffInformation }"
20+ v-bind =" {
21+ picture,
22+ username: loggedInUser.primaryUsername,
23+ staffInformation,
24+ }"
2125 @close =" showPictureModal = false"
2226 />
2327 <header class =" profile__section-header" ref =" header" tabindex =" -1" >
Original file line number Diff line number Diff line change 1717 @change =" handleChangeFile"
1818 />
1919 </label >
20- <button type =" button" class =" button button--secondary" @click =" deleteImg" >
20+ <button
21+ type =" button"
22+ class =" button button--secondary"
23+ :disabled =" imgSrc === null"
24+ @click =" deleteImg"
25+ >
2126 Delete Photo
2227 </button >
2328 </div >
@@ -88,7 +93,7 @@ export default {
8893 methods: {
8994 async deleteImg () {
9095 this .picture .value = ' ' ;
91- this .$emit ( ' close ' ) ;
96+ this .imgSrc = null ;
9297 },
9398 handleChangeFile (event ) {
9499 loadImage (
@@ -110,7 +115,7 @@ export default {
110115 );
111116 },
112117 selectCrop () {
113- if (this .$refs .crop && ! this .imgSrc ) {
118+ if (this .$refs .crop && this .imgSrc !== null ) {
114119 const data = this .$refs .crop .cropper .toDataURL ();
115120 this .resize (data);
116121 } else {
You can’t perform that action at this time.
0 commit comments