Merge branch 'develop' into vue3

This commit is contained in:
syuilo
2020-08-09 10:32:21 +09:00
32 changed files with 664 additions and 458 deletions

View File

@@ -18,6 +18,7 @@
import { defineComponent } from 'vue';
import { toUnicode } from 'punycode';
import { host as localHost } from '../config';
import { wellKnownServices } from '../../well-known-services';
export default defineComponent({
props: {
@@ -37,12 +38,11 @@ export default defineComponent({
},
computed: {
url(): string {
switch (this.host) {
case 'twitter.com':
case 'github.com':
return `https://${this.host}/${this.username}`;
default:
return `/${this.canonical}`;
const wellKnown = wellKnownServices.find(x => x[0] === this.host);
if (wellKnown) {
return wellKnown[1](this.username);
} else {
return `/${this.canonical}`;
}
},
canonical(): string {