diff --git a/src/assets/css/chat.scss b/src/assets/css/chat.scss
index 45cb7a3..ed7a875 100644
--- a/src/assets/css/chat.scss
+++ b/src/assets/css/chat.scss
@@ -528,10 +528,29 @@ $admin-fg: white;
border-radius: 20px;
}
+ .user-info {
+ display: flex;
+ flex-wrap: nowrap;
+ max-width: 40%;
+ }
+
.show-all {
color: black;
font-size: 14 * $chat-text-size;
font-weight: bold;
margin-left: 10px;
}
+
+ .action {
+ padding: 4px 20px;
+ &::after {
+ content: ' ';
+ display: block;
+ margin: 10px 0px;
+ bottom: 0px;
+ height: 1px;
+ background-color: #e1e1e1;
+ width: 100%;
+ }
+ }
}
\ No newline at end of file
diff --git a/src/assets/css/login.scss b/src/assets/css/login.scss
index 5b9c828..3df951c 100644
--- a/src/assets/css/login.scss
+++ b/src/assets/css/login.scss
@@ -6,9 +6,9 @@
top: 0px;
right: 0px;
bottom: 0px;
- width: 100%;
+ width: 80%;
height: 100%;
padding: 0;
- margin: 0;
+ margin: 10%;
background-color: $background;
}
\ No newline at end of file
diff --git a/src/components/Login.vue b/src/components/Login.vue
index e6b2631..40b9ba8 100644
--- a/src/components/Login.vue
+++ b/src/components/Login.vue
@@ -5,7 +5,7 @@
-
Login
+
Login
{
this.loading = false;
this.message =
- (error.response && error.response.data) ||
+ (error.data && error.data.error) ||
error.message ||
error.toString();
+ console.log("Message set to ", this.message);
}
);
}
diff --git a/src/components/Profile.vue b/src/components/Profile.vue
index 27a8f01..249277d 100644
--- a/src/components/Profile.vue
+++ b/src/components/Profile.vue
@@ -15,25 +15,70 @@
- lockSet password
-
-
+
+
+
+
+
+ {{
+ userAvatarLetter
+ }}
+
+
+
+ {{ displayName }}
+
+ This identity is temporary. Set a password to use it again.
+
+
+
+
+
+ lockSet password
+ editChange name
+
+
+
- Display name
+ Change password
-
+ Not yet implemented.
+
- Cancel
+ Cancel
Ok
+
+
+
+
+
+
+
+ Display name
+
+
+
+
+
+
+ Cancel
+ Ok
@@ -49,16 +94,14 @@ export default {
data() {
return {
memberCount: null,
- showEditDialog: false,
- user: null,
- displayName: "",
+ showEditPasswordDialog: false,
+ showEditDisplaynameDialog: false,
+ editValue: null,
};
},
mounted() {
this.$matrix.on("Room.timeline", this.onEvent);
this.updateMemberCount();
- this.user = this.$matrix.matrixClient.getUser(this.$matrix.currentUserId);
- this.displayName = this.user.displayName;
},
destroyed() {
@@ -69,6 +112,31 @@ export default {
room() {
return this.$matrix.currentRoom;
},
+
+ user() {
+ return this.$matrix.matrixClient.getUser(this.$matrix.currentUserId);
+ },
+
+ displayName() {
+ if (!this.user) {
+ return null;
+ }
+ return (this.user.displayName || this.user.userId);
+ },
+
+ userAvatar() {
+ if (!this.user || !this.user.avatarUrl) {
+ return null;
+ }
+ return this.$matrix.matrixClient.mxcUrlToHttp(this.user.avatarUrl, 80, 80, 'scale', true);
+ },
+
+ userAvatarLetter() {
+ if (!this.user) {
+ return null;
+ }
+ return (this.user.displayName || this.user.userId.substring(1)).substring(0, 1).toUpperCase();
+ }
},
watch: {
@@ -109,8 +177,8 @@ export default {
return null;
},
- viewProfile() {
-
+ setDisplayName(name) {
+ this.$matrix.matrixClient.setDisplayName(name);
},
upgradeAccount() {