diff --git a/src/frontend/components/NavigationMenu.tsx b/src/frontend/components/NavigationMenu.tsx index 2f4148a..eaef9de 100644 --- a/src/frontend/components/NavigationMenu.tsx +++ b/src/frontend/components/NavigationMenu.tsx @@ -2,13 +2,15 @@ import React from 'react'; import { useTranslation } from 'react-i18next'; import { useDispatch } from 'react-redux'; import { NavLink } from 'react-router-dom'; -import { useGetSessionQuery } from '../services/session'; +import { CHANGELOG_URL } from '../const'; +import { useGetMetaQuery, useGetSessionQuery } from '../services/session'; import { setDrawerShown } from '../store/slices/screen'; const navLinkClassName = (isActive: boolean) => `item ${isActive ? 'active' : ''}`; export const NavigationMenu: React.VFC = () => { const { data: session } = useGetSessionQuery(undefined); + const { data: meta } = useGetMetaQuery(undefined); const {t} = useTranslation(); const dispatch = useDispatch(); @@ -58,6 +60,13 @@ export const NavigationMenu: React.VFC = () => { )} )} + {meta && ( +
+ + v{meta.version} {t('changelog')} + +
+ )} ); diff --git a/src/frontend/langs/ja-JP.json b/src/frontend/langs/ja-JP.json index b512823..4abb2eb 100644 --- a/src/frontend/langs/ja-JP.json +++ b/src/frontend/langs/ja-JP.json @@ -52,6 +52,7 @@ "instanceUrlPlaceholder": "例:misskey.io", "settings": "設定", "accentColor": "アクセントカラー", + "changelog": "更新履歴", "_sidebar": { "dashboard": "ダッシュボード", "tools": "ツール",