1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-02 00:38:31 +09:00

Better share template

This commit is contained in:
syuilo 2019-03-12 12:59:26 +09:00
parent c473b62aed
commit 0494c770a1
No known key found for this signature in database
GPG Key ID: BDC4C49D06AB9D69
2 changed files with 6 additions and 4 deletions

View File

@ -28,9 +28,10 @@ export default Vue.extend({
computed: {
template(): string {
let t = '';
if (this.title) t += `${title}\n`;
if (this.title && this.url) t += `【[${title}](${url})】\n`;
if (this.title && !this.url) t += `${title}\n`;
if (this.text) t += `${text}\n`;
if (this.url) t += `${url}`;
if (!this.title && this.url) t += `${url}`;
return t.trim();
}
},

View File

@ -28,9 +28,10 @@ export default Vue.extend({
computed: {
template(): string {
let t = '';
if (this.title) t += `${title}\n`;
if (this.title && this.url) t += `【[${title}](${url})】\n`;
if (this.title && !this.url) t += `${title}\n`;
if (this.text) t += `${text}\n`;
if (this.url) t += `${url}`;
if (!this.title && this.url) t += `${url}`;
return t.trim();
}
},