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 { useTranslation } from 'react-i18next';
import { useDispatch } from 'react-redux'; import { useDispatch } from 'react-redux';
import { NavLink } from 'react-router-dom'; 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'; import { setDrawerShown } from '../store/slices/screen';
const navLinkClassName = (isActive: boolean) => `item ${isActive ? 'active' : ''}`; const navLinkClassName = (isActive: boolean) => `item ${isActive ? 'active' : ''}`;
export const NavigationMenu: React.VFC = () => { export const NavigationMenu: React.VFC = () => {
const { data: session } = useGetSessionQuery(undefined); const { data: session } = useGetSessionQuery(undefined);
const { data: meta } = useGetMetaQuery(undefined);
const {t} = useTranslation(); const {t} = useTranslation();
const dispatch = useDispatch(); const dispatch = useDispatch();
@ -58,6 +60,13 @@ export const NavigationMenu: React.VFC = () => {
)} )}
</section> </section>
)} )}
{meta && (
<section>
<a className="item" href={CHANGELOG_URL} onClick={onClickItem}>
v{meta.version} {t('changelog')}
</a>
</section>
)}
</div> </div>
</> </>
); );

View File

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