This commit is contained in:
@@ -129,7 +129,7 @@ const TopNav: React.FC = ({ user, setUser }: Props) => {
|
|||||||
{/^\/wiki\/(?!new|changes)[^\/]+/.test (location.pathname) &&
|
{/^\/wiki\/(?!new|changes)[^\/]+/.test (location.pathname) &&
|
||||||
<>
|
<>
|
||||||
<Separator />
|
<Separator />
|
||||||
<Link to={`/posts?tags=${ location.pathname.split ('/')[2] }`} className={subClass}>投稿</Link>
|
<Link to={`/posts?tags=${ location.pathname.split ('/')[2] }`} className={subClass}>広場</Link>
|
||||||
<Link to={`/wiki/changes?id=${ wikiId }`} className={subClass}>履歴</Link>
|
<Link to={`/wiki/changes?id=${ wikiId }`} className={subClass}>履歴</Link>
|
||||||
<Link to={`/wiki/${ wikiId || location.pathname.split ('/')[2] }/edit`} className={subClass}>編輯</Link>
|
<Link to={`/wiki/${ wikiId || location.pathname.split ('/')[2] }/edit`} className={subClass}>編輯</Link>
|
||||||
</>}
|
</>}
|
||||||
|
|||||||
@@ -33,9 +33,12 @@ export default () => {
|
|||||||
<tbody>
|
<tbody>
|
||||||
{changes.map (change => (
|
{changes.map (change => (
|
||||||
<tr key={change.sha}>
|
<tr key={change.sha}>
|
||||||
<td>差分</td>
|
<td>{change.change_type === 'update' && (
|
||||||
|
<Link>
|
||||||
|
差分
|
||||||
|
</Link>)}</td>
|
||||||
<td className="p-2">
|
<td className="p-2">
|
||||||
<Link to={`/wiki/${ encodeURIComponent (change.wiki_page.title) }`}
|
<Link to={`/wiki/${ encodeURIComponent (change.wiki_page.title) }?version=${ change.sha }`}
|
||||||
className="text-blue-400 hover:underline">
|
className="text-blue-400 hover:underline">
|
||||||
{change.wiki_page.title}
|
{change.wiki_page.title}
|
||||||
</Link>
|
</Link>
|
||||||
@@ -44,9 +47,12 @@ export default () => {
|
|||||||
{(() => {
|
{(() => {
|
||||||
switch (change.change_type)
|
switch (change.change_type)
|
||||||
{
|
{
|
||||||
case 'create': return '新規'
|
case 'create':
|
||||||
case 'update': return '更新'
|
return '新規'
|
||||||
case 'delete': return '削除'
|
case 'update':
|
||||||
|
return '更新'
|
||||||
|
case 'delete':
|
||||||
|
return '削除'
|
||||||
}
|
}
|
||||||
}) ()}
|
}) ()}
|
||||||
</td>
|
</td>
|
||||||
|
|||||||
Reference in New Issue
Block a user