diff options
| author | かっこかり <67428053+kakkokari-gtyih@users.noreply.github.com> | 2023-11-01 13:34:05 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-01 13:34:05 +0900 |
| commit | 5fb6847419ba75edc33270071f4990244669e262 (patch) | |
| tree | 84e82db8636ca4c6b2abbe1fba254dc461215230 /packages/frontend/src/navbar.ts | |
| parent | enhance(frontend): 「内容を隠す」でリアクションも隠れるよ... (diff) | |
| download | misskey-5fb6847419ba75edc33270071f4990244669e262.tar.gz misskey-5fb6847419ba75edc33270071f4990244669e262.tar.bz2 misskey-5fb6847419ba75edc33270071f4990244669e262.zip | |
Feat: 未読通知数を表示できるように (#11982)
* 未読通知数を表示できるように
* Update Changelog
* オプトインにする
* Fix lint
* (add) テスト通知のプッシュ通知を追加
* add test
* フロントエンドの表示上限を99に変更
* Make it default on
* 共通スタイルをくくりだす
* Update Changelog
* tweak
* Update UserEntityService.ts
* rename
* Update navbar-for-mobile.vue
---------
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'packages/frontend/src/navbar.ts')
| -rw-r--r-- | packages/frontend/src/navbar.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/frontend/src/navbar.ts b/packages/frontend/src/navbar.ts index e72a4dc316..f0ed773f82 100644 --- a/packages/frontend/src/navbar.ts +++ b/packages/frontend/src/navbar.ts @@ -19,6 +19,15 @@ export const navbarItemDef = reactive({ icon: 'ti ti-bell', show: computed(() => $i != null), indicated: computed(() => $i != null && $i.hasUnreadNotification), + indicateValue: computed(() => { + if (!$i || $i.unreadNotificationsCount === 0) return ''; + + if ($i.unreadNotificationsCount > 99) { + return '99+'; + } else { + return $i.unreadNotificationsCount.toString(); + } + }), to: '/my/notifications', }, drive: { |