From 342e48ed77a54dbbaad86fe0a8c7962d70df7607 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Tue, 14 May 2019 02:50:23 +0900 Subject: [PATCH] Fix meta tags (#4918) --- src/client/app/admin/views/federation.vue | 2 +- src/client/app/common/views/components/forkit.vue | 2 +- .../common/views/components/integrations.integration.vue | 2 +- .../app/common/views/components/messaging-room.message.vue | 2 +- src/client/app/common/views/components/mfm.ts | 2 ++ src/client/app/common/views/components/nav.vue | 4 ++-- src/client/app/common/views/components/settings/2fa.vue | 2 +- .../app/common/views/components/settings/integration.vue | 6 +++--- src/client/app/common/views/components/settings/theme.vue | 2 +- src/client/app/common/views/components/url-preview.vue | 2 +- src/client/app/common/views/components/url.vue | 4 ++-- src/client/app/common/views/deck/deck.note-column.vue | 2 +- src/client/app/common/views/deck/deck.user-column.vue | 2 +- src/client/app/common/views/widgets/rss.vue | 2 +- src/client/app/desktop/views/components/note-detail.vue | 2 +- src/client/app/desktop/views/components/note.vue | 2 +- src/client/app/desktop/views/home/user/index.vue | 2 +- src/client/app/mobile/views/components/media-video.vue | 1 + src/client/app/mobile/views/components/note-detail.vue | 2 +- src/client/app/mobile/views/components/note.vue | 2 +- src/client/app/mobile/views/pages/user/index.vue | 2 +- src/docs/article.pug | 2 +- src/server/web/views/note.pug | 3 +++ src/server/web/views/user.pug | 3 +++ 24 files changed, 33 insertions(+), 24 deletions(-) diff --git a/src/client/app/admin/views/federation.vue b/src/client/app/admin/views/federation.vue index 6b09a3c28..25400393b 100644 --- a/src/client/app/admin/views/federation.vue +++ b/src/client/app/admin/views/federation.vue @@ -130,7 +130,7 @@ {{ $t('status') }}
- {{ instance.host }} + {{ instance.host }} {{ instance.notesCount | number }} {{ instance.usersCount | number }} {{ instance.followingCount | number }} diff --git a/src/client/app/common/views/components/forkit.vue b/src/client/app/common/views/components/forkit.vue index 5629c5ac2..d652b846a 100644 --- a/src/client/app/common/views/components/forkit.vue +++ b/src/client/app/common/views/components/forkit.vue @@ -1,5 +1,5 @@ diff --git a/src/client/app/common/views/components/messaging-room.message.vue b/src/client/app/common/views/components/messaging-room.message.vue index 256ea760b..908533e0c 100644 --- a/src/client/app/common/views/components/messaging-room.message.vue +++ b/src/client/app/common/views/components/messaging-room.message.vue @@ -9,7 +9,7 @@
- +

{{ message.file.name }}

diff --git a/src/client/app/common/views/components/mfm.ts b/src/client/app/common/views/components/mfm.ts index 78734200a..945917288 100644 --- a/src/client/app/common/views/components/mfm.ts +++ b/src/client/app/common/views/components/mfm.ts @@ -174,6 +174,7 @@ export default Vue.component('misskey-flavored-markdown', { key: Math.random(), props: { url: token.node.props.url, + rel: 'nofollow noopener', target: '_blank' }, attrs: { @@ -187,6 +188,7 @@ export default Vue.component('misskey-flavored-markdown', { attrs: { class: 'link', href: token.node.props.url, + rel: 'nofollow noopener', target: '_blank', title: token.node.props.url, style: 'color:var(--mfmLink);' diff --git a/src/client/app/common/views/components/nav.vue b/src/client/app/common/views/components/nav.vue index a8f9bb928..9d4e7091b 100644 --- a/src/client/app/common/views/components/nav.vue +++ b/src/client/app/common/views/components/nav.vue @@ -2,9 +2,9 @@
{{ $t('about') }} - {{ $t('repository') }} + {{ $t('repository') }} - {{ $t('feedback') }} + {{ $t('feedback') }} {{ $t('develop') }} diff --git a/src/client/app/common/views/components/settings/2fa.vue b/src/client/app/common/views/components/settings/2fa.vue index 07a149315..6e8d19d83 100644 --- a/src/client/app/common/views/components/settings/2fa.vue +++ b/src/client/app/common/views/components/settings/2fa.vue @@ -9,7 +9,7 @@
    -
  1. {{ $t('authenticator') }}{{ $t('howtoinstall') }}
  2. +
  3. {{ $t('authenticator') }}{{ $t('howtoinstall') }}
  4. {{ $t('scan') }}
  5. {{ $t('done') }}
    {{ $t('token') }} diff --git a/src/client/app/common/views/components/settings/integration.vue b/src/client/app/common/views/components/settings/integration.vue index 8ac0c134c..71ad8b450 100644 --- a/src/client/app/common/views/components/settings/integration.vue +++ b/src/client/app/common/views/components/settings/integration.vue @@ -4,21 +4,21 @@
    Twitter
    -

    {{ $t('connected-to') }}: @{{ $store.state.i.twitter.screenName }}

    +

    {{ $t('connected-to') }}: @{{ $store.state.i.twitter.screenName }}

    {{ $t('disconnect') }} {{ $t('connect') }}
    Discord
    -

    {{ $t('connected-to') }}: @{{ $store.state.i.discord.username }}#{{ $store.state.i.discord.discriminator }}

    +

    {{ $t('connected-to') }}: @{{ $store.state.i.discord.username }}#{{ $store.state.i.discord.discriminator }}

    {{ $t('disconnect') }} {{ $t('connect') }}
    GitHub
    -

    {{ $t('connected-to') }}: @{{ $store.state.i.github.login }}

    +

    {{ $t('connected-to') }}: @{{ $store.state.i.github.login }}

    {{ $t('disconnect') }} {{ $t('connect') }}
    diff --git a/src/client/app/common/views/components/settings/theme.vue b/src/client/app/common/views/components/settings/theme.vue index b1f7b2bc4..3e6b9133c 100644 --- a/src/client/app/common/views/components/settings/theme.vue +++ b/src/client/app/common/views/components/settings/theme.vue @@ -45,7 +45,7 @@ - {{ $t('find-more-theme') }} + {{ $t('find-more-theme') }}
    {{ $t('create-a-theme') }} diff --git a/src/client/app/common/views/components/url-preview.vue b/src/client/app/common/views/components/url-preview.vue index af5f3e4eb..9ca4497ad 100644 --- a/src/client/app/common/views/components/url-preview.vue +++ b/src/client/app/common/views/components/url-preview.vue @@ -9,7 +9,7 @@
- +
diff --git a/src/client/app/common/views/components/url.vue b/src/client/app/common/views/components/url.vue index 2daf79cba..faf439814 100644 --- a/src/client/app/common/views/components/url.vue +++ b/src/client/app/common/views/components/url.vue @@ -1,5 +1,5 @@

{{ $t('@.user-suspended') }}

-
+

{{ $t('@.is-remote-user') }}{{ $t('@.view-on-remote') }}

diff --git a/src/docs/article.pug b/src/docs/article.pug index 38494fec6..48f501d40 100644 --- a/src/docs/article.pug +++ b/src/docs/article.pug @@ -6,4 +6,4 @@ block main block footer p = i18n('docs.edit-this-page-on-github') - a(href=src target="_blank")= i18n('docs.edit-this-page-on-github-link') + a(href=src rel="noopener" target="_blank")= i18n('docs.edit-this-page-on-github-link') diff --git a/src/server/web/views/note.pug b/src/server/web/views/note.pug index 983c731a0..0580e959f 100644 --- a/src/server/web/views/note.pug +++ b/src/server/web/views/note.pug @@ -26,6 +26,9 @@ block meta meta(name='twitter:card' content='summary') // todo + if user.host + meta(name='robots' content='noindex') + if user.twitter meta(name='twitter:creator' content=`@${user.twitter.screenName}`) diff --git a/src/server/web/views/user.pug b/src/server/web/views/user.pug index bff98ba80..9b257afb7 100644 --- a/src/server/web/views/user.pug +++ b/src/server/web/views/user.pug @@ -24,6 +24,9 @@ block meta meta(name='twitter:card' content='summary') + if user.host + meta(name='robots' content='noindex') + if profile.twitter meta(name='twitter:creator' content=`@${profile.twitter.screenName}`)