Skip to content

Commit

Permalink
fix(ui): ensure all changelog links open on new tab
Browse files Browse the repository at this point in the history
Fixes #3520
  • Loading branch information
robertsLando committed Jan 16, 2024
1 parent ac31e2a commit cd1a4f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
14 changes: 11 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,9 @@
Made with ❤️ by
<strong class="ml-1 mr-2">Daniel Lando</strong>-
Enjoying it?&nbsp;
<a href="https://github.com/sponsors/robertsLando"
<a
target="_blank"
href="https://github.com/sponsors/robertsLando"
>Support me &#128591;</a
>
</v-col>
Expand Down Expand Up @@ -1280,7 +1282,7 @@ export default {
.render(release.body)
.replace(
/#(\d+)/g,
'<a href="https://github.com/zwave-js/node-zwave-js/pull/$1">#$1</a>',
'<a target="_blank" href="https://github.com/zwave-js/node-zwave-js/pull/$1">#$1</a>',
)
return `${
Expand Down Expand Up @@ -1312,7 +1314,7 @@ export default {
)
.replace(
/#(\d+)/g,
'<a href="https://github.com/zwave-js/zwave-js-server/pull/$1">#$1</a>',
'<a target="_blank" href="https://github.com/zwave-js/zwave-js-server/pull/$1">#$1</a>',
)
// remove everything after "⬆️ Dependencies"
Expand All @@ -1336,6 +1338,12 @@ export default {
changelog += serverChangelogs.join('')
}
// ensure all links are opened in new tab
changelog = changelog.replace(
/<a href="/g,
'<a target="_blank" href="',
)
// means we never saw the changelog for this version
const result = await this.confirm(
`Changelog`,
Expand Down
4 changes: 3 additions & 1 deletion src/views/ErrorPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@
<v-col class="d-flex pa-0 justify-center py-3 text-caption">
&copy;{{ new Date().getFullYear() }} —
<strong class="ml-1 mr-2"
><a href="https://github.com/sponsors/robertsLando"
><a
target="_blank"
href="https://github.com/sponsors/robertsLando"
>Daniel Lando</a
></strong
>
Expand Down

0 comments on commit cd1a4f3

Please sign in to comment.