diff --git a/src/components/Profile.vue b/src/components/Profile.vue index f054c3d..031e01e 100644 --- a/src/components/Profile.vue +++ b/src/components/Profile.vue @@ -23,6 +23,7 @@ size="48" color="#e0e0e0" @click="showAvatarPicker" + v-if="isAvatarLoaded" > {{ userAvatarLetter }} @@ -36,6 +37,15 @@ class="d-none" /> + + {{ loadValue }} +
{{ displayName }}
@@ -191,6 +201,8 @@ export default { newPassword2: null, settingPassword: false, passwordErrorMessage: null, + isAvatarLoaded: true, + loadValue: 0 }; }, @@ -326,9 +338,14 @@ export default { reader.readAsDataURL(event.target.files[0]); } }, - setAvatar(image) { + const self = this; + this.isAvatarLoaded = false; return util.setAvatar(this.$matrix, image, function (progress) { + self.loadValue = Math.round(progress.loaded/progress.total * 100); + if(progress.loaded === progress.total) { + self.isAvatarLoaded = true; + } console.log("Progress: " + JSON.stringify(progress)); }); }, diff --git a/src/components/RoomInfoBottomSheet.vue b/src/components/RoomInfoBottomSheet.vue index aa10dce..086749e 100644 --- a/src/components/RoomInfoBottomSheet.vue +++ b/src/components/RoomInfoBottomSheet.vue @@ -5,12 +5,30 @@ >
- - + + {{ roomName.substring(0, 1).toUpperCase() }} + + + {{ loadValue }} +
{{$t('room_info_sheet.this_room')}}
{{ roomName }}