diff --git a/src/Dashboard/Components/VillageStateList.vue b/src/Dashboard/Components/VillageStateList.vue index 7cc6136..038e999 100644 --- a/src/Dashboard/Components/VillageStateList.vue +++ b/src/Dashboard/Components/VillageStateList.vue @@ -2,27 +2,45 @@
- + +
{{ village.id }} - {{ village.name }}{{ village.id }} - {{ village.name }} Д: {{ resources(village.id).lumber }} Г: {{ resources(village.id).clay }} Ж: {{ resources(village.id).iron }} З: {{ resources(village.id).crop }} + РЕС +
@@ -37,4 +55,8 @@ export default { border-top: 1px solid #ddd; padding: 4px; } + +.village-table td.active { + font-weight: bold; +} diff --git a/src/Page/VillageBlock.ts b/src/Page/VillageBlock.ts index 0f4be6b..9f097a9 100644 --- a/src/Page/VillageBlock.ts +++ b/src/Page/VillageBlock.ts @@ -40,5 +40,19 @@ function grabVillageInfo($el): Village { const id = getNumber(parsedHref.query.newdid); const name = $el.find('.name').text(); const active = $el.hasClass('active'); - return new Village(id, name, active, new Coordinates(0, 0)); + const x = getNumber( + $el + .find('.coordinateX') + .text() + .replace('−‭', '-') + .replace(/[^0-9-]/gi, '') + ); + const y = getNumber( + $el + .find('.coordinateY') + .text() + .replace('−‭', '-') + .replace(/[^0-9-]/gi, '') + ); + return new Village(id, name, active, new Coordinates(x, y)); }