diff --git a/locales/index.d.ts b/locales/index.d.ts index 36897285c4..6397719d6c 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1467,6 +1467,11 @@ export interface Locale { "description": string; "flavor": string; }; + "_smashTestNotificationButton": { + "title": string; + "description": string; + "flavor": string; + }; }; }; "_role": { diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index f9427e13ec..2f6c6ba13d 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1391,6 +1391,10 @@ _achievements: title: "Brain Diver" description: "Brain Diverへのリンクを投稿した" flavor: "Misskey-Misskey La-Tu-Ma" + _smashTestNotificationButton: + title: "セルフ通知破壊" + description: "通知テストを連打した" + flavor: "ほどほどにしておきましょう" _role: new: "ロールの作成" diff --git a/packages/backend/src/core/AchievementService.ts b/packages/backend/src/core/AchievementService.ts index aa810015ed..a35acd3680 100644 --- a/packages/backend/src/core/AchievementService.ts +++ b/packages/backend/src/core/AchievementService.ts @@ -85,6 +85,7 @@ export const ACHIEVEMENT_TYPES = [ 'setNameToSyuilo', 'cookieClicked', 'brainDiver', + 'smashTestNotificationButton', ] as const; @Injectable() diff --git a/packages/frontend/src/scripts/achievements.ts b/packages/frontend/src/scripts/achievements.ts index 8b3a518830..54242b330d 100644 --- a/packages/frontend/src/scripts/achievements.ts +++ b/packages/frontend/src/scripts/achievements.ts @@ -81,6 +81,7 @@ export const ACHIEVEMENT_TYPES = [ 'setNameToSyuilo', 'cookieClicked', 'brainDiver', + 'smashTestNotificationButton', ] as const; export const ACHIEVEMENT_BADGES = { @@ -454,6 +455,11 @@ export const ACHIEVEMENT_BADGES = { bg: 'linear-gradient(0deg, rgb(144, 224, 255), rgb(255, 168, 252))', frame: 'bronze', }, + 'smashTestNotificationButton': { + img: '/fluent-emoji/1f514.png', + bg: 'linear-gradient(0deg, rgb(187 183 59), rgb(255 143 77))', + frame: 'bronze', + }, /* @see } as const satisfies Record= 7) { + claimAchievement('smashTestNotificationButton'); + smashCount = 0; + } + if (smashTimer) { + clearTimeout(smashTimer); + } + smashTimer = window.setTimeout(() => { + smashCount = 0; + }, 300); }