Commit afece660 authored by Fatih Acet's avatar Fatih Acet

IssueNotesRefactor: Fix anchor of note timestamp.

parent 116474c5
...@@ -102,7 +102,7 @@ export default { ...@@ -102,7 +102,7 @@ export default {
<issue-note-header <issue-note-header
:author="author" :author="author"
:createdAt="discussion.created_at" :createdAt="discussion.created_at"
:notePath="discussion.path" :noteId="discussion.id"
:includeToggle="true" :includeToggle="true"
:toggleHandler="toggleDiscussion" :toggleHandler="toggleDiscussion"
actionText="started a discussion" /> actionText="started a discussion" />
......
...@@ -112,7 +112,7 @@ export default { ...@@ -112,7 +112,7 @@ export default {
<issue-note-header <issue-note-header
:author="author" :author="author"
:createdAt="note.created_at" :createdAt="note.created_at"
:notePath="note.path" :noteId="note.id"
actionText="commented" /> actionText="commented" />
<issue-note-actions <issue-note-actions
:accessLevel="note.human_access" :accessLevel="note.human_access"
......
...@@ -21,8 +21,8 @@ export default { ...@@ -21,8 +21,8 @@ export default {
required: false, required: false,
default: '', default: '',
}, },
notePath: { noteId: {
type: String, type: Number,
required: true, required: true,
}, },
includeToggle: { includeToggle: {
...@@ -47,6 +47,9 @@ export default { ...@@ -47,6 +47,9 @@ export default {
toggleChevronClass() { toggleChevronClass() {
return this.isExpanded ? 'fa-chevron-up' : 'fa-chevron-down'; return this.isExpanded ? 'fa-chevron-up' : 'fa-chevron-down';
}, },
noteTimestampLink() {
return `#note_${this.noteId}`;
},
}, },
methods: { methods: {
handleToggle() { handleToggle() {
...@@ -76,7 +79,7 @@ export default { ...@@ -76,7 +79,7 @@ export default {
v-if="actionTextHtml" v-if="actionTextHtml"
v-html="actionTextHtml" v-html="actionTextHtml"
class="system-note-message"></span> class="system-note-message"></span>
<a :href="notePath"> <a :href="noteTimestampLink">
<time-ago-tooltip <time-ago-tooltip
:time="createdAt" :time="createdAt"
tooltipPlacement="bottom" /> tooltipPlacement="bottom" />
......
...@@ -31,7 +31,7 @@ export default { ...@@ -31,7 +31,7 @@ export default {
<issue-note-header <issue-note-header
:author="note.author" :author="note.author"
:createdAt="note.created_at" :createdAt="note.created_at"
:notePath="note.path" :noteId="note.id"
:actionTextHtml="note.note_html" /> :actionTextHtml="note.note_html" />
</div> </div>
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment