diff --git a/frontend/src/kanban-board/kanban-boards.tsx b/frontend/src/kanban-board/kanban-boards.tsx
index 0e6593f..d7aa795 100644
--- a/frontend/src/kanban-board/kanban-boards.tsx
+++ b/frontend/src/kanban-board/kanban-boards.tsx
@@ -4,6 +4,7 @@ import { IPageStore, PageStoreLoadData } from './store';
import { observer } from 'mobx-react-lite';
import * as TopRightMenuNs from '../misc-components/top-right-menu';
import { SetIssuesReadingTimestamp } from '../utils/unreaded-provider';
+import axios from 'axios';
export type Props = {
store: IPageStore
@@ -27,10 +28,20 @@ export const KanbanBoards = observer((props: Props) => {
SetIssuesReadingTimestamp(props.store.issueIds);
PageStoreLoadData(props.store);
};
+ let treeRefreshMenuItem: JSX.Element = <>>;
+ if (props.store.canTreeRefresh) {
+ const onTreeRefreshClick = (e: React.MouseEvent) => {
+ if (e.target !== e.currentTarget) return;
+ e.stopPropagation();
+ axios.get(`/simple-kanban-board/tree/${props.store.name}/refresh`);
+ }
+ treeRefreshMenuItem = ;
+ }
return (
<>
+ {treeRefreshMenuItem}
{list}
>
diff --git a/frontend/src/kanban-board/store.ts b/frontend/src/kanban-board/store.ts
index 148b3f0..2152511 100644
--- a/frontend/src/kanban-board/store.ts
+++ b/frontend/src/kanban-board/store.ts
@@ -78,6 +78,9 @@ export const PageStore = types.model({
}
}
return res;
+ },
+ get canTreeRefresh(): boolean {
+ return (self.type === 'tree');
}
};
});