Add build building task

This commit is contained in:
2020-04-12 20:41:26 +03:00
parent 9d85d07ff5
commit 9fdc573746
8 changed files with 127 additions and 25 deletions

View File

@ -1,5 +1,5 @@
import * as URLParse from 'url-parse';
import { uniqId, waitForLoad } from '../utils';
import { getNumber, toNumber, uniqId, waitForLoad } from '../utils';
import { Scheduler } from '../Scheduler';
import { BuildPage } from '../Page/BuildPage';
import { UpgradeBuildingTask } from '../Task/UpgradeBuildingTask';
@ -77,7 +77,7 @@ export class Dashboard {
}
if (p.pathname === '/build.php') {
new BuildPage(this.scheduler, Number(p.query.id)).run();
new BuildPage(this.scheduler, getNumber(p.query.id), getNumber(p.query.category, 1)).run();
}
this.createControlPanel(state);