From 1c86a4bc26720682f0e75cdffaeb082e30016915 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 3 Dec 2018 19:44:03 +0900 Subject: [PATCH] Refactor --- locales/ja-JP.yml | 22 +---- .../views/components/discord-setting.vue | 64 ------------- .../views/components/github-setting.vue | 64 ------------- .../views/components/integration-settings.vue | 96 +++++++++++++++++++ .../views/components/twitter-setting.vue | 65 ------------- .../app/desktop/views/components/settings.vue | 32 +------ .../app/mobile/views/pages/settings.vue | 41 +------- 7 files changed, 107 insertions(+), 277 deletions(-) delete mode 100644 src/client/app/common/views/components/discord-setting.vue delete mode 100644 src/client/app/common/views/components/github-setting.vue create mode 100644 src/client/app/common/views/components/integration-settings.vue delete mode 100644 src/client/app/common/views/components/twitter-setting.vue diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index d6a0521fe..38921587f 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -440,13 +440,11 @@ common/views/components/stream-indicator.vue: reconnecting: "再接続中" connected: "接続完了" -common/views/components/twitter-setting.vue: - description: "お使いのTwitterアカウントをお使いのMisskeyアカウントに接続しておくと、プロフィールでTwitterアカウント情報が表示されるようになったり、Twitterを用いた便利なサインインを利用できるようになります。" - connected-to: "次のTwitterアカウントに接続されています" - detail: "詳細..." - reconnect: "再接続する" - connect: "Twitterと接続する" +common/views/components/integration-settings.vue: + title: "サービス連携" + connect: "接続する" disconnect: "切断する" + connected-to: "次のアカウントに接続されています" common/views/components/github-setting.vue: description: "お使いのGitHubアカウントをお使いのMisskeyアカウントに接続しておくと、プロフィールでGitHubアカウント情報が表示されるようになったり、GitHubを用いた便利なサインインを利用できるようになります。" @@ -1582,18 +1580,6 @@ mobile/views/pages/settings.vue: disable-via-mobile: "「モバイルからの投稿」フラグを付けない" load-raw-images: "添付された画像を高画質で表示する" load-remote-media: "リモートサーバーのメディアを表示する" - twitter: "Twitter連携" - twitter-connect: "Twitterアカウントに接続する" - twitter-reconnect: "再接続する" - twitter-disconnect: "切断する" - github: "GitHub連携" - github-connect: "GitHubアカウントに接続する" - github-reconnect: "再接続する" - github-disconnect: "切断する" - discord: "Discord連携" - discord-connect: "Discordアカウントに接続する" - discord-reconnect: "再接続する" - discord-disconnect: "切断する" update: "Misskey Update" version: "バージョン:" latest-version: "最新のバージョン:" diff --git a/src/client/app/common/views/components/discord-setting.vue b/src/client/app/common/views/components/discord-setting.vue deleted file mode 100644 index 113df9b0a..000000000 --- a/src/client/app/common/views/components/discord-setting.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - - - diff --git a/src/client/app/common/views/components/github-setting.vue b/src/client/app/common/views/components/github-setting.vue deleted file mode 100644 index 93d7f406f..000000000 --- a/src/client/app/common/views/components/github-setting.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - - - diff --git a/src/client/app/common/views/components/integration-settings.vue b/src/client/app/common/views/components/integration-settings.vue new file mode 100644 index 000000000..1a0af799a --- /dev/null +++ b/src/client/app/common/views/components/integration-settings.vue @@ -0,0 +1,96 @@ + + + + + diff --git a/src/client/app/common/views/components/twitter-setting.vue b/src/client/app/common/views/components/twitter-setting.vue deleted file mode 100644 index f75bbb7fb..000000000 --- a/src/client/app/common/views/components/twitter-setting.vue +++ /dev/null @@ -1,65 +0,0 @@ - - - - - diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index a89982eea..9cb28eb86 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -16,27 +16,7 @@
- - -
{{ $t('twitter') }}
-
- -
-
- - -
{{ $t('github') }}
-
- -
-
- - -
{{ $t('discord') }}
-
- -
-
+
@@ -169,7 +149,7 @@ - +
{{ $t('cache') }}
@@ -292,9 +272,7 @@ import X2fa from './settings.2fa.vue'; import XApps from './settings.apps.vue'; import XSignins from './settings.signins.vue'; import XTags from './settings.tags.vue'; -import XTwitterSetting from '../../../common/views/components/twitter-setting.vue'; -import XGithubSetting from '../../../common/views/components/github-setting.vue'; -import XDiscordSetting from '../../../common/views/components/discord-setting.vue'; +import XIntegrationSettings from '../../../common/views/components/integration-settings.vue'; import XTheme from '../../../common/views/components/theme.vue'; import XDriveSettings from '../../../common/views/components/drive-settings.vue'; import XMuteAndBlock from '../../../common/views/components/mute-and-block.vue'; @@ -313,9 +291,7 @@ export default Vue.extend({ XApps, XSignins, XTags, - XTwitterSetting, - XGithubSetting, - XDiscordSetting, + XIntegrationSettings, XTheme, XDriveSettings, XMuteAndBlock, diff --git a/src/client/app/mobile/views/pages/settings.vue b/src/client/app/mobile/views/pages/settings.vue index de881af3b..3e048a198 100644 --- a/src/client/app/mobile/views/pages/settings.vue +++ b/src/client/app/mobile/views/pages/settings.vue @@ -107,44 +107,7 @@ - -
{{ $t('twitter') }}
- -
- -

- {{ $store.state.i.twitter ? this.$t('twitter-reconnect') : this.$t('twitter-connect') }} - or - {{ $t('twitter-disconnect') }} -

-
-
- - -
{{ $t('github') }}
- -
- -

- {{ $store.state.i.github ? this.$t('github-reconnect') : this.$t('github-connect') }} - or - {{ $t('github-disconnect') }} -

-
-
- - -
{{ $t('discord') }}
- -
- -

- {{ $store.state.i.discord ? this.$t('discord-reconnect') : this.$t('discord-connect') }} - or - {{ $t('discord-disconnect') }} -

-
-
+ @@ -192,6 +155,7 @@ import XPasswordSettings from '../../../common/views/components/password-setting import XProfileEditor from '../../../common/views/components/profile-editor.vue'; import XApiSettings from '../../../common/views/components/api-settings.vue'; import XLanguageSettings from '../../../common/views/components/language-settings.vue'; +import XIntegrationSettings from '../../../common/views/components/integration-settings.vue'; export default Vue.extend({ i18n: i18n('mobile/views/pages/settings.vue'), @@ -204,6 +168,7 @@ export default Vue.extend({ XProfileEditor, XApiSettings, XLanguageSettings, + XIntegrationSettings, }, data() {