mirror of
https://github.com/SecurityBrewery/catalyst.git
synced 2025-12-06 23:32:47 +01:00
Autocreate links to other tickets (#27)
This commit is contained in:
@@ -219,7 +219,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</v-card-subtitle>
|
</v-card-subtitle>
|
||||||
<v-card-text class="mb-0 mt-2">
|
<v-card-text class="mb-0 mt-2">
|
||||||
<vue-markdown>{{ comment.message }}</vue-markdown>
|
<vue-markdown>{{ replacelinks(comment.message) }}</vue-markdown>
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</v-card>
|
</v-card>
|
||||||
</div>
|
</div>
|
||||||
@@ -1535,6 +1535,11 @@ export default Vue.extend({
|
|||||||
},
|
},
|
||||||
logs: function(ticket: TicketWithTickets) {
|
logs: function(ticket: TicketWithTickets) {
|
||||||
return this.lodash.reverse(this.lodash.sortBy(this.lodash.union(ticket.comments, ticket.logs), ['created']))
|
return this.lodash.reverse(this.lodash.sortBy(this.lodash.union(ticket.comments, ticket.logs), ['created']))
|
||||||
|
},
|
||||||
|
replacelinks: function (text: string): string {
|
||||||
|
return text.replace(/#(\d+)\b/, (match, p1) => {
|
||||||
|
return "[" + match + "](/tickets/" + p1 + ")";
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|||||||
Reference in New Issue
Block a user