summaryrefslogtreecommitdiff
path: root/packages/frontend/src/scripts
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2023-09-12 15:48:19 +0900
committerGitHub <noreply@github.com>2023-09-12 15:48:19 +0900
commit3456680e1d827bada1009aad7a7247ae17f01184 (patch)
tree39fe8fb7f98b08f4e3b92543652212602cf55ff2 /packages/frontend/src/scripts
parentenhance(backend): configure ratelimit for notification creation apis (diff)
downloadmisskey-3456680e1d827bada1009aad7a7247ae17f01184.tar.gz
misskey-3456680e1d827bada1009aad7a7247ae17f01184.tar.bz2
misskey-3456680e1d827bada1009aad7a7247ae17f01184.zip
新しい実績を追加 (#11817)
* (add) new achievement * (update) changelog * Update test-notification.ts * tweak --------- Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'packages/frontend/src/scripts')
-rw-r--r--packages/frontend/src/scripts/achievements.ts6
-rw-r--r--packages/frontend/src/scripts/test-notification.ts34
2 files changed, 6 insertions, 34 deletions
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 <https://github.com/misskey-dev/misskey/pull/10365#discussion_r1155511107>
} as const satisfies Record<typeof ACHIEVEMENT_TYPES[number], {
img: string;
diff --git a/packages/frontend/src/scripts/test-notification.ts b/packages/frontend/src/scripts/test-notification.ts
deleted file mode 100644
index 0e8289e19e..0000000000
--- a/packages/frontend/src/scripts/test-notification.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * SPDX-FileCopyrightText: syuilo and other misskey contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- */
-
-import * as Misskey from 'misskey-js';
-import * as os from '@/os';
-import { globalEvents } from '@/events';
-
-/**
- * テスト通知を送信
- *
- * - `client` … 通知ポップアップのみを表示
- * - `server` … サーバー側から通知を送信
- *
- * @param type 通知タイプを指定
- */
-export function testNotification(type: 'client' | 'server'): void {
- const notification: Misskey.entities.Notification = {
- id: Math.random().toString(),
- createdAt: new Date().toUTCString(),
- isRead: false,
- type: 'test',
- };
-
- switch (type) {
- case 'server':
- os.api('notifications/test-notification');
- break;
- case 'client':
- globalEvents.emit('clientNotification', notification);
- break;
- }
-}