Files
gods-eye-view/src/ui/recentImagery/RecentImageryCard.vue
T
Sameh Khamis e949584c0a feat(ui): render the Recent imagery readout as components
createRecentImageryPanel() computes the readout from the layer snapshot
and renders RecentImageryReadout and its day cards synchronously; its
delegated listeners stay on the stable root and the mode buttons keep their
segmented control. Rail card actions take optional pressed and reserved
states, replacing the owner's patches after render. Thumbnails, focus,
scroll preservation, the DETAILS reveal and export behave as before, and
nothing paints after teardown.
2026-10-30 18:58:32 -07:00

68 lines
1.8 KiB
Vue

<script setup>
import { t } from '../../i18n/index.js';
// One imagery day in the strip. The owner computes every value; clicks reach
// it through the readout's delegated listener.
defineProps({
card: { type: Object, required: true },
});
</script>
<template>
<div
:id="card.id"
:class="[
'ri-card',
{
focused: card.focused,
pinned: card.pinned,
preview: card.preview,
},
]"
:data-key="card.key"
role="option"
:aria-selected="String(card.focused)"
:aria-label="card.ariaLabel"
><div class="ri-thumb" :data-status="card.status"
><img
v-if="card.image"
class="ri-thumb-img"
alt=""
decoding="async"
:src="card.image.src"
:hidden="card.image.hidden"
/><span
class="ri-thumb-text"
:hidden="Boolean(card.image && !card.image.hidden)"
>{{ card.placeholder }}</span
><span class="ri-card-flag" :hidden="!card.flag">{{ card.flag }}</span
><span
class="ri-card-start"
:hidden="!card.start"
:title="card.start || undefined"
>{{ t('START HERE') }}</span
></div
><div class="ri-card-date">{{ card.date }}</div
><div class="ri-card-sensor">{{ card.sensor }}</div
><div class="ri-card-cloud">{{ card.cloud }}</div
><div class="ri-card-chips"
><button
v-for="chip in card.chips"
:key="chip.slot"
type="button"
:class="[
'data-toggle-chip ri-chip',
{ active: chip.active, 'is-reserved': chip.reserved },
]"
tabindex="-1"
:data-slot="chip.slot"
:disabled="chip.disabled"
:aria-pressed="String(chip.active)"
:aria-hidden="String(chip.reserved)"
:aria-label="chip.ariaLabel"
>{{ chip.label }}</button
></div
></div
>
</template>