Skip to content
Snippets Groups Projects

Display Contributor and Author badges on notes

Merged Mycroft Kang requested to merge TaehyeokKang/gitlab:mycroft-note-badge into master
4 unresolved threads
Compare and Show latest version
21 files
+ 84
97
Compare changes
  • Side-by-side
  • Inline
Files
21
@@ -60,7 +60,13 @@ export default {
@@ -60,7 +60,13 @@ export default {
},
},
noteableType: {
noteableType: {
type: String,
type: String,
required: true,
required: false,
 
default: null,
 
},
 
projectName: {
 
type: String,
 
required: false,
 
default: null,
},
},
showReply: {
showReply: {
type: Boolean,
type: Boolean,
@@ -148,16 +154,14 @@ export default {
@@ -148,16 +154,14 @@ export default {
canAssign() {
canAssign() {
return this.getNoteableData.current_user?.can_update && this.isIssue;
return this.getNoteableData.current_user?.can_update && this.isIssue;
},
},
projectName() {
return this.getNoteableData.project_name;
},
displayAuthorBadgeText() {
displayAuthorBadgeText() {
return sprintf(__('This user is the author of this %{noteable}.'), {
return sprintf(__('This user is the author of this %{noteable}.'), {
noteable: this.noteableDisplayName,
noteable: this.noteableDisplayName,
});
});
},
},
displayMemberBadgeText() {
displayMemberBadgeText() {
return sprintf(__('This user is a member of the %{name} project.'), {
return sprintf(__('This user is a %{access} of the %{name} project.'), {
 
access: this.accessLevel.toLowerCase(),
name: this.projectName,
name: this.projectName,
});
});
},
},
Loading