From cce3e526427af324119203f5b570cfa0caa28a45 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 28 Dec 2018 05:06:25 +0900 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E7=9F=A5=E3=81=AE=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E3=82=92=E5=BC=B7=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve #3772 --- locales/ja-JP.yml | 12 +++-- .../components/notification-settings.vue | 44 +++++++++++++++++++ .../app/desktop/views/components/settings.vue | 22 ++-------- .../app/mobile/views/pages/notifications.vue | 2 - .../app/mobile/views/pages/settings.vue | 4 ++ .../i/read_all_messaging_messages.ts | 42 ++++++++++++++++++ 6 files changed, 101 insertions(+), 25 deletions(-) create mode 100644 src/client/app/common/views/components/notification-settings.vue create mode 100644 src/server/api/endpoints/i/read_all_messaging_messages.ts diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index ac56b31883..49d6a836d2 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -445,6 +445,14 @@ common/views/components/stream-indicator.vue: reconnecting: "再接続中" connected: "接続完了" +common/views/components/notification-settings.vue: + title: "通知" + mark-as-read-all-notifications: "すべての通知を既読にする" + mark-as-read-all-unread-notes: "すべての投稿を既読にする" + mark-as-read-all-talk-messages: "すべてのトークを既読にする" + auto-watch: "投稿の自動ウォッチ" + auto-watch-desc: "リアクションしたり返信したりした投稿に関する通知を自動的に受け取るようにします。" + common/views/components/integration-settings.vue: title: "サービス連携" connect: "接続する" @@ -842,7 +850,6 @@ desktop/views/components/settings.vue: 2fa: "二段階認証" other: "その他" license: "ライセンス" - mark-as-read-all-unread-notes: "すべての投稿を既読にする" theme: "テーマ" behaviour: "動作" @@ -904,9 +911,6 @@ desktop/views/components/settings.vue: cache-cleared: "キャッシュを削除しました" cache-cleared-desc: "ページを再度読み込みしてください。" - auto-watch: "投稿の自動ウォッチ" - auto-watch-desc: "リアクションしたり返信したりした投稿に関する通知を自動的に受け取るようにします。" - about: "Misskeyについて" operator: "このサーバーの運営者" diff --git a/src/client/app/common/views/components/notification-settings.vue b/src/client/app/common/views/components/notification-settings.vue new file mode 100644 index 0000000000..566d0b5702 --- /dev/null +++ b/src/client/app/common/views/components/notification-settings.vue @@ -0,0 +1,44 @@ + + + diff --git a/src/client/app/desktop/views/components/settings.vue b/src/client/app/desktop/views/components/settings.vue index 921aa59c5e..741e11db15 100644 --- a/src/client/app/desktop/views/components/settings.vue +++ b/src/client/app/desktop/views/components/settings.vue @@ -170,17 +170,7 @@ - -
{{ $t('notification') }}
-
- - {{ $t('auto-watch') }}{{ $t('auto-watch-desc') }} - -
- {{ $t('mark-as-read-all-unread-notes') }} -
-
-
+
@@ -289,6 +279,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 XNotificationSettings from '../../../common/views/components/notification-settings.vue'; import { url, clientVersion as version } from '../../../config'; import checkForUpdate from '../../../common/scripts/check-for-update'; @@ -308,6 +299,7 @@ export default Vue.extend({ XProfileEditor, XApiSettings, XLanguageSettings, + XNotificationSettings, }, props: { initialPage: { @@ -531,9 +523,6 @@ export default Vue.extend({ }); }, methods: { - readAllUnreadNotes() { - this.$root.api('i/read_all_unread_notes'); - }, customizeHome() { this.$router.push('/i/customize-home'); this.$emit('done'); @@ -552,11 +541,6 @@ export default Vue.extend({ wallpaperId: null }); }, - onChangeAutoWatch(v) { - this.$root.api('i/update', { - autoWatch: v - }); - }, checkForUpdate() { this.checkingForUpdate = true; checkForUpdate(this.$root, true, true).then(newer => { diff --git a/src/client/app/mobile/views/pages/notifications.vue b/src/client/app/mobile/views/pages/notifications.vue index 69f7b902c8..c6e5b646f2 100644 --- a/src/client/app/mobile/views/pages/notifications.vue +++ b/src/client/app/mobile/views/pages/notifications.vue @@ -41,8 +41,6 @@ export default Vue.extend({