diff --git a/app/app.vue b/app/app.vue index 26ceff1..a88ee73 100644 --- a/app/app.vue +++ b/app/app.vue @@ -4,9 +4,10 @@ const { user, logout } = useAuth() const notices = useNotices() const route = useRoute() const { current } = useCurrentWorld() +const unreadReports = useUnreadReports() -/** Inside a world (village or map) the header is that world's navigation. */ -const inWorld = computed(() => !!current.value && /^\/(village|map)\//.test(route.path)) +/** Inside a world (village, map or reports) the header is that world's navigation. */ +const inWorld = computed(() => !!current.value && /^\/(village|map|reports)\//.test(route.path)) const home = computed(() => inWorld.value && current.value?.villageId ? `/village/${current.value.villageId}` : '/worlds', ) @@ -57,6 +58,13 @@ useHead({ title: () => t('app.title') }) {{ t('app.map') }} + + + + + {{ unreadReports }} + +
diff --git a/app/components/icon/Building.vue b/app/components/icon/Building.vue index 7424d33..98fe1f2 100644 --- a/app/components/icon/Building.vue +++ b/app/components/icon/Building.vue @@ -76,6 +76,12 @@ defineProps<{ type: BuildingType }>() + + + + + + diff --git a/app/components/icon/Ui.vue b/app/components/icon/Ui.vue index 05eafcc..747e69e 100644 --- a/app/components/icon/Ui.vue +++ b/app/components/icon/Ui.vue @@ -1,5 +1,21 @@ @@ -41,6 +57,26 @@ defineProps<{ name: UiIconName }>() + + + + + + + + + + + + + + + + + + + + diff --git a/app/components/icon/Unit.vue b/app/components/icon/Unit.vue index 02ce40f..f174e6b 100644 --- a/app/components/icon/Unit.vue +++ b/app/components/icon/Unit.vue @@ -36,6 +36,12 @@ defineProps<{ unit: UnitType | 'militia' }>() + + + + + + diff --git a/app/components/map/InfoCard.vue b/app/components/map/InfoCard.vue index e37fcd6..092a28d 100644 --- a/app/components/map/InfoCard.vue +++ b/app/components/map/InfoCard.vue @@ -6,6 +6,7 @@ defineProps<{ at: { x: number; y: number } | null }>() const emit = defineEmits<{ center: [at: { x: number; y: number }] }>() +const { current } = useCurrentWorld() const continentOf = (x: number, y: number) => `K${Math.floor(y / 100)}${Math.floor(x / 100)}` @@ -28,6 +29,14 @@ const continentOf = (x: number, y: number) => `K${Math.floor(y / 100)}${Math.flo
{{ $t('map.info.open') }} + + + {{ $t('map.info.send') }} + diff --git a/app/components/report/Battle.vue b/app/components/report/Battle.vue new file mode 100644 index 0000000..a8f4312 --- /dev/null +++ b/app/components/report/Battle.vue @@ -0,0 +1,110 @@ + + + + diff --git a/app/components/report/Units.vue b/app/components/report/Units.vue new file mode 100644 index 0000000..a6c6043 --- /dev/null +++ b/app/components/report/Units.vue @@ -0,0 +1,39 @@ + + + + diff --git a/app/components/village/Movements.vue b/app/components/village/Movements.vue new file mode 100644 index 0000000..68eabfb --- /dev/null +++ b/app/components/village/Movements.vue @@ -0,0 +1,89 @@ + + + + diff --git a/app/components/village/OverviewSidebar.vue b/app/components/village/OverviewSidebar.vue index b1db347..8749d73 100644 --- a/app/components/village/OverviewSidebar.vue +++ b/app/components/village/OverviewSidebar.vue @@ -13,6 +13,8 @@ const production = computed(() => (['wood', 'clay', 'iron', 'food'] as const).ma const troops = computed(() => (Object.entries(props.village.troops) as [UnitType, number][]).filter(([, n]) => n > 0)) const idle = computed(() => props.village.population.villagers - props.village.population.workers - props.village.levy.militia) const spaceShare = computed(() => props.village.space.used / props.village.space.max) +const incoming = computed(() => props.village.movements.filter((m) => m.direction === 'in' && m.type === 'attack')) +const commands = computed(() => props.village.movements.filter((m) => m.direction !== 'in').length) function order(o: BuildOrder) { const type = t(`buildings.${o.type}`) @@ -24,6 +26,17 @@ function order(o: BuildOrder) {