summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-05-26 21:42:19 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-05-26 21:42:19 +0900
commit99e4b06468bac1546e28e59d6d8f1dbf8c66d0fa (patch)
tree4948ac0f38117abf6d4a97a275edb82fbc52b380 /src/client
parentMerge branch 'develop' (diff)
parent11.19.1 (diff)
downloadmisskey-99e4b06468bac1546e28e59d6d8f1dbf8c66d0fa.tar.gz
misskey-99e4b06468bac1546e28e59d6d8f1dbf8c66d0fa.tar.bz2
misskey-99e4b06468bac1546e28e59d6d8f1dbf8c66d0fa.zip
Merge branch 'develop'
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/common/views/components/mfm.ts5
-rw-r--r--src/client/app/common/views/components/url.vue17
-rw-r--r--src/client/app/desktop/views/home/tag.vue13
-rw-r--r--src/client/app/desktop/views/pages/welcome.vue2
4 files changed, 18 insertions, 19 deletions
diff --git a/src/client/app/common/views/components/mfm.ts b/src/client/app/common/views/components/mfm.ts
index 7de29b2aad..fa798504c7 100644
--- a/src/client/app/common/views/components/mfm.ts
+++ b/src/client/app/common/views/components/mfm.ts
@@ -8,7 +8,7 @@ import { concat, sum } from '../../../../../prelude/array';
import MkFormula from './formula.vue';
import MkCode from './code.vue';
import MkGoogle from './google.vue';
-import { host, url } from '../../../config';
+import { host } from '../../../config';
import { preorderF, countNodesF } from '../../../../../prelude/tree';
function sumTextsLength(ts: MfmForest): number {
@@ -175,9 +175,6 @@ export default Vue.component('misskey-flavored-markdown', {
props: {
url: token.node.props.url,
rel: 'nofollow noopener',
- ...(token.node.props.url.startsWith(url) ? {} : {
- target: '_blank'
- })
},
attrs: {
style: 'color:var(--mfmUrl);'
diff --git a/src/client/app/common/views/components/url.vue b/src/client/app/common/views/components/url.vue
index 2829812f99..078c816523 100644
--- a/src/client/app/common/views/components/url.vue
+++ b/src/client/app/common/views/components/url.vue
@@ -1,5 +1,5 @@
<template>
-<component :is="self ? 'router-link' : 'a'" class="mk-url" :[attr]="self ? url.substr(local.length) : url" :rel="rel" :target="target">
+<component :is="hasRoute ? 'router-link' : 'a'" class="mk-url" :[attr]="hasRoute ? url.substr(local.length) : url" :rel="rel" :target="target">
<template v-if="!self">
<span class="schema">{{ schema }}//</span>
<span class="hostname">{{ hostname }}</span>
@@ -8,7 +8,7 @@
<span class="pathname" v-if="pathname != ''">{{ self ? pathname.substr(1) : pathname }}</span>
<span class="query">{{ query }}</span>
<span class="hash">{{ hash }}</span>
- <fa icon="external-link-square-alt" v-if="!self"/>
+ <fa icon="external-link-square-alt" v-if="target === '_blank'"/>
</component>
</template>
@@ -18,8 +18,13 @@ import { toUnicode as decodePunycode } from 'punycode';
import { url as local } from '../../../config';
export default Vue.extend({
- props: ['url', 'rel', 'target'],
+ props: ['url', 'rel'],
data() {
+ const isSelf = this.url.startsWith(local);
+ const hasRoute =
+ this.url.substr(local.length).startsWith('/@') ||
+ this.url.substr(local.length).startsWith('/notes/') ||
+ this.url.substr(local.length).startsWith('/pages/');
return {
local,
schema: null,
@@ -28,8 +33,10 @@ export default Vue.extend({
pathname: null,
query: null,
hash: null,
- self: this.url.startsWith(local),
- attr: this.url.startsWith(local) ? 'to' : 'href'
+ self: isSelf,
+ hasRoute: hasRoute,
+ attr: hasRoute ? 'to' : 'href',
+ target: hasRoute ? null : '_blank'
};
},
created() {
diff --git a/src/client/app/desktop/views/home/tag.vue b/src/client/app/desktop/views/home/tag.vue
index dd4be06a53..343b4ce951 100644
--- a/src/client/app/desktop/views/home/tag.vue
+++ b/src/client/app/desktop/views/home/tag.vue
@@ -17,20 +17,15 @@ import Progress from '../../../common/scripts/loading';
export default Vue.extend({
i18n: i18n('desktop/views/pages/tag.vue'),
- data() {
- return {
- pagination: {
+ computed: {
+ pagination() {
+ return {
endpoint: 'notes/search-by-tag',
limit: 20,
params: {
tag: this.$route.params.tag
}
- }
- };
- },
- watch: {
- $route() {
- this.$refs.timeline.reload();
+ };
}
},
mounted() {
diff --git a/src/client/app/desktop/views/pages/welcome.vue b/src/client/app/desktop/views/pages/welcome.vue
index 091377181b..8a66728a7b 100644
--- a/src/client/app/desktop/views/pages/welcome.vue
+++ b/src/client/app/desktop/views/pages/welcome.vue
@@ -13,7 +13,7 @@
<div class="body">
<div class="main block">
<div>
- <h1 v-if="name != null">{{ name }}</h1>
+ <h1 v-if="name != null && name != ''">{{ name }}</h1>
<h1 v-else><img svg-inline src="../../../../assets/title.svg" alt="Misskey"></h1>
<div class="info">