diff --git a/src/components/home/topNavigation.vue b/src/components/home/topNavigation.vue
index 7660aca4..bb8d5495 100644
--- a/src/components/home/topNavigation.vue
+++ b/src/components/home/topNavigation.vue
@@ -45,7 +45,7 @@
diff --git a/src/components/sharing/linkSharing.vue b/src/components/sharing/linkSharing.vue
index 59cc923b..605b43fa 100644
--- a/src/components/sharing/linkSharing.vue
+++ b/src/components/sharing/linkSharing.vue
@@ -52,7 +52,7 @@
- {{ s.sharedBy.username }}
+ {{ s.sharedBy.getDisplayName() }}
|
diff --git a/src/components/sharing/userTeam.vue b/src/components/sharing/userTeam.vue
index b94f0f28..f291ed18 100644
--- a/src/components/sharing/userTeam.vue
+++ b/src/components/sharing/userTeam.vue
@@ -46,7 +46,7 @@
- {{ s.username }} |
+ {{ s.getDisplayName() }} |
You
diff --git a/src/components/tasks/edit-task.vue b/src/components/tasks/edit-task.vue
index 479f6a6b..ea7235ed 100644
--- a/src/components/tasks/edit-task.vue
+++ b/src/components/tasks/edit-task.vue
@@ -107,7 +107,7 @@
-
- {{ a.username }}
+ {{ a.getDisplayName() }}
diff --git a/src/components/tasks/partials/comments.vue b/src/components/tasks/partials/comments.vue
index f5445df0..920c9be8 100644
--- a/src/components/tasks/partials/comments.vue
+++ b/src/components/tasks/partials/comments.vue
@@ -17,7 +17,7 @@
| |
Hi {{ userInfo.username }}!
+Hi {{ userInfo.name !== '' ? userInfo.name : userInfo.username }}!
Click on a list or namespace on the left to get started.
- Created {{ formatDateSince(task.created) }} by {{ task.createdBy.username }} + Created {{ formatDateSince(task.created) }} by {{ task.createdBy.getDisplayName() }}
- {{ m.username }}
+ {{ m.getDisplayName() }}
You
diff --git a/src/views/user/Settings.vue b/src/views/user/Settings.vue
index 48045c3a..a67e680a 100644
--- a/src/views/user/Settings.vue
+++ b/src/views/user/Settings.vue
@@ -106,6 +106,38 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -234,6 +266,8 @@ import EmailUpdateService from '../../services/emailUpdate'
import EmailUpdateModel from '../../models/emailUpdate'
import TotpModel from '../../models/totp'
import TotpService from '../../services/totp'
+import UserNameService from '../../services/userName'
+import UserNameModel from '../../models/userName'
import {mapState} from 'vuex'
@@ -260,6 +294,9 @@ export default {
totpDisablePassword: '',
caldavUrl: '',
+
+ name: '',
+ userNameService: UserNameService,
}
},
components: {
@@ -275,6 +312,9 @@ export default {
this.totpService = new TotpService()
this.totp = new TotpModel()
+ this.userNameService = new UserNameService()
+ this.name = this.$store.state.auth.info.name
+
this.totpStatus()
this.buildCaldavUrl()
},
@@ -359,6 +399,16 @@ export default {
})
.catch(e => this.error(e, this))
},
+ updateName() {
+ const name = new UserNameModel({name: this.name})
+
+ this.userNameService.update(name)
+ .then(() => {
+ this.$store.commit('auth/setUserName', this.name)
+ this.success({message: 'The name was successfully changed.'}, this)
+ })
+ .catch(e => this.error(e, this))
+ },
buildCaldavUrl() {
const apiBase = window.API_URL.replace('/api/v1', '')
this.caldavUrl = `${apiBase}/dav/principals/${this.userInfo.username}/`
diff --git a/src/views/teams/EditTeam.vue b/src/views/teams/EditTeam.vue index 65300c01..42a6683a 100644 --- a/src/views/teams/EditTeam.vue +++ b/src/views/teams/EditTeam.vue @@ -106,7 +106,7 @@
+ Update your name +
+