feat: rally point tabs, map village popups, report filters, beginner protection bar, keyboard shortcuts
Ideas taken from how Die Stämme works, in our own look: the rally point splits into
commands, troops and simulator; hovering a village on the map shows its owner, points
and distance, a click offers send troops and centre; reports filter by attacks,
defence and support; a dismissible bar counts down beginner protection; one key per
screen (V, H, T, P, W, M, R); resources in the village bar lead to the workforce.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 00:00:13 +00:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
const props = defineProps<{
|
|
|
|
|
until: string
|
|
|
|
|
villageId: number
|
|
|
|
|
secondsUntil: (iso: string) => number
|
|
|
|
|
}>()
|
|
|
|
|
|
|
|
|
|
// Shown until it ends, or until the player closes it for this session.
|
|
|
|
|
const key = computed(() => `vp.protection.hidden.${props.villageId}`)
|
|
|
|
|
const hidden = ref(false)
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
try {
|
|
|
|
|
hidden.value = sessionStorage.getItem(key.value) === '1'
|
|
|
|
|
} catch {
|
|
|
|
|
// no storage: the bar just shows again
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
function close() {
|
|
|
|
|
hidden.value = true
|
|
|
|
|
try {
|
|
|
|
|
sessionStorage.setItem(key.value, '1')
|
|
|
|
|
} catch {
|
|
|
|
|
// only this page view remembers it
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
const left = computed(() => props.secondsUntil(props.until))
|
|
|
|
|
</script>
|
|
|
|
|
|
2026-10-29 00:26:08 +00:00
|
|
|
<!-- A thin notice under the village header while beginner protection lasts, with its countdown and a close cross. -->
|
feat: rally point tabs, map village popups, report filters, beginner protection bar, keyboard shortcuts
Ideas taken from how Die Stämme works, in our own look: the rally point splits into
commands, troops and simulator; hovering a village on the map shows its owner, points
and distance, a click offers send troops and centre; reports filter by attacks,
defence and support; a dismissible bar counts down beginner protection; one key per
screen (V, H, T, P, W, M, R); resources in the village bar lead to the workforce.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 00:00:13 +00:00
|
|
|
<template>
|
2026-10-29 00:26:08 +00:00
|
|
|
<div v-if="!hidden && left > 0" class="border border-wood-700 bg-parchment-50" role="status">
|
|
|
|
|
<div class="flex items-center gap-2 px-2 py-0.5 text-[13px]">
|
feat: rally point tabs, map village popups, report filters, beginner protection bar, keyboard shortcuts
Ideas taken from how Die Stämme works, in our own look: the rally point splits into
commands, troops and simulator; hovering a village on the map shows its owner, points
and distance, a click offers send troops and centre; reports filter by attacks,
defence and support; a dismissible bar counts down beginner protection; one key per
screen (V, H, T, P, W, M, R); resources in the village bar lead to the workforce.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-29 00:00:13 +00:00
|
|
|
<IconUi name="support" class="size-4 shrink-0 text-moss-700" />
|
|
|
|
|
<p class="min-w-0 flex-1">
|
|
|
|
|
{{ $t('village.protection.ends_in') }}
|
|
|
|
|
<span class="font-semibold tabular-nums">{{ formatDuration(left) }}</span>
|
|
|
|
|
<span class="hidden text-ink-500 sm:inline"> · {{ $t('village.protection.hint') }}</span>
|
|
|
|
|
</p>
|
|
|
|
|
<button type="button" class="text-ink-500 hover:text-blood-700" :aria-label="$t('common.close')" @click="close">
|
|
|
|
|
<IconUi name="close" class="size-4" />
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|