fix(frontend): デッキでダブルクリックするとウィンドウが2枚開く問題を修正

This commit is contained in:
kakkokari-gtyih 2024-12-09 17:39:04 +09:00
parent dac3b1f405
commit 6df65d4bdd

View file

@ -135,11 +135,19 @@ const columnComponents = {
roleTimeline: XRoleTimelineColumn,
};
// 22
// 2
let routerNavTimer: number | null = null;
mainRouter.navHook = (path, flag): boolean => {
if (flag === 'forcePage') return false;
if (routerNavTimer != null) return true;
const noMainColumn = !deckStore.state.columns.some(x => x.type === 'main');
if (deckStore.state.navWindow || noMainColumn) {
os.pageWindow(path);
routerNavTimer = setTimeout(() => {
routerNavTimer = null;
}, 500);
return true;
}
return false;