diff --git a/locales/en-US.yml b/locales/en-US.yml index 272710f3239b..a2fe510f6dd2 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -126,6 +126,7 @@ common: apps: "Apps" tags: "Hashtag" mute-and-block: "Mute / Block" + extended-notification: "Extra notification" blocking: "Block" security: "Security" signin: "Login History" @@ -976,6 +977,11 @@ common/views/components/mute-and-block.vue: muted-words: "Muted keywords" muted-words-description: "Separating with spaces results in AND specifications, and delimiting with line breaks results in OR specifications" save: "Save" +common/views/components/settings/extended-notification.vue: + extended-notification: "Extra notification" + highlighted-words: "Hightlighted words" + highlighted-words-description: "Enter the words you want to notify, one per line" + save: "Save" common/views/components/password-settings.vue: reset: "Change password" enter-current-password: "Enter the current password" diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index fa8deec7d2c9..e1d65cca0ee1 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -136,6 +136,7 @@ common: apps: "アプリ" tags: "ハッシュタグ" mute-and-block: "ミュート/ブロック" + extended-notification: "拡張通知" blocking: "ブロック" security: "セキュリティ" signin: "ログイン履歴" @@ -1079,6 +1080,12 @@ common/views/components/mute-and-block.vue: muted-words-description: "スペースで区切るとAND指定になり、改行で区切るとOR指定になります" save: "保存" +common/views/components/settings/extended-notification.vue: + extended-notification: "拡張通知" + highlighted-words: "ハイライトワード" + highlighted-words-description: "通知したいワードを1行に1つずつ入力します" + save: "保存" + common/views/components/password-settings.vue: reset: "パスワードを変更する" enter-current-password: "現在のパスワードを入力してください" diff --git a/src/client/app/common/scripts/compose-notification.ts b/src/client/app/common/scripts/compose-notification.ts index ec854f2f4d74..4843248853b1 100644 --- a/src/client/app/common/scripts/compose-notification.ts +++ b/src/client/app/common/scripts/compose-notification.ts @@ -64,6 +64,13 @@ export default function(type, data): Notification { icon: data.user.avatarUrl }; + case 'highlight': + return { + title: `${getUserName(data.user)}:`, + body: getNoteSummary(data), + icon: data.user.avatarUrl + }; + default: return null; } diff --git a/src/client/app/common/views/components/settings/extended-notification.vue b/src/client/app/common/views/components/settings/extended-notification.vue new file mode 100644 index 000000000000..71378cdf61d6 --- /dev/null +++ b/src/client/app/common/views/components/settings/extended-notification.vue @@ -0,0 +1,47 @@ + + + diff --git a/src/client/app/common/views/components/settings/settings.vue b/src/client/app/common/views/components/settings/settings.vue index 21436f98157e..e191d57c0bd2 100644 --- a/src/client/app/common/views/components/settings/settings.vue +++ b/src/client/app/common/views/components/settings/settings.vue @@ -183,6 +183,10 @@ + +