Use url if available (#6214)

* Fix #6213

* other link

* fix
This commit is contained in:
MeiMei 2020-04-02 21:59:14 +09:00 committed by GitHub
parent 331305e6c7
commit 356225af14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 33 additions and 8 deletions

View file

@ -517,11 +517,11 @@ export default Vue.extend({
icon: faLink,
text: this.$t('copyLink'),
action: this.copyLink
}, this.appearNote.uri ? {
}, (this.appearNote.url || this.appearNote.uri) ? {
icon: faExternalLinkSquareAlt,
text: this.$t('showOnRemote'),
action: () => {
window.open(this.appearNote.uri, '_blank');
window.open(this.appearNote.url || this.appearNote.uri, '_blank');
}
} : undefined,
null,
@ -585,11 +585,11 @@ export default Vue.extend({
icon: faLink,
text: this.$t('copyLink'),
action: this.copyLink
}, this.appearNote.uri ? {
}, (this.appearNote.url || this.appearNote.uri) ? {
icon: faExternalLinkSquareAlt,
text: this.$t('showOnRemote'),
action: () => {
window.open(this.appearNote.uri, '_blank');
window.open(this.appearNote.url || this.appearNote.uri, '_blank');
}
} : undefined]
.filter(x => x !== undefined);