summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-02-10 02:42:06 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-02-10 02:42:06 +0900
commit517ea6a1198bd85f7bc3289e43790bd74119cd6b (patch)
tree690e54abbb6b693dd176a392a6f62581634576d9 /src
parentNew Crowdin translations (#5884) (diff)
downloadmisskey-517ea6a1198bd85f7bc3289e43790bd74119cd6b.tar.gz
misskey-517ea6a1198bd85f7bc3289e43790bd74119cd6b.tar.bz2
misskey-517ea6a1198bd85f7bc3289e43790bd74119cd6b.zip
Refactor
Diffstat (limited to 'src')
-rw-r--r--src/client/components/url.vue23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/client/components/url.vue b/src/client/components/url.vue
index 3b0d814405..219921558c 100644
--- a/src/client/components/url.vue
+++ b/src/client/components/url.vue
@@ -22,7 +22,16 @@ import { toUnicode as decodePunycode } from 'punycode';
import { url as local } from '../config';
export default Vue.extend({
- props: ['url', 'rel'],
+ props: {
+ url: {
+ type: String,
+ required: true,
+ },
+ rel: {
+ type: String,
+ required: false,
+ }
+ },
data() {
const isSelf = this.url.startsWith(local);
const hasRoute = isSelf && (
@@ -32,12 +41,12 @@ export default Vue.extend({
this.url.substr(local.length).startsWith('/tags/'));
return {
local,
- schema: null,
- hostname: null,
- port: null,
- pathname: null,
- query: null,
- hash: null,
+ schema: null as string | null,
+ hostname: null as string | null,
+ port: null as string | null,
+ pathname: null as string | null,
+ query: null as string | null,
+ hash: null as string | null,
self: isSelf,
hasRoute: hasRoute,
attr: hasRoute ? 'to' : 'href',