CHANGELOGへのリンクを追加

This commit is contained in:
Xeltica 2022-06-23 00:21:59 +09:00
parent 44dff73b24
commit eb6b99382c
2 changed files with 11 additions and 1 deletions

View File

@ -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 = () => {
)}
</section>
)}
{meta && (
<section>
<a className="item" href={CHANGELOG_URL} onClick={onClickItem}>
v{meta.version} {t('changelog')}
</a>
</section>
)}
</div>
</>
);

View File

@ -52,6 +52,7 @@
"instanceUrlPlaceholder": "例misskey.io",
"settings": "設定",
"accentColor": "アクセントカラー",
"changelog": "更新履歴",
"_sidebar": {
"dashboard": "ダッシュボード",
"tools": "ツール",