mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-23 11:42:21 +00:00
The rail cards, card blocks, settings, chips and row lists are Vue components in src/ui/rail/. createRailCards() and createRailCardBlocks() keep their update and destroy API and patch the components synchronously with render(), so Weather and Recent imagery are unchanged. Controls of a removed block dispatch nothing, a released range keeps its value until the owner's next update, and range values are written only when they differ. Weather's remount state is keyed by its panel. Tests of rendered parts run on happy-dom.
25 lines
626 B
Vue
25 lines
626 B
Vue
<script setup>
|
|
import RailCard from './RailCard.vue';
|
|
|
|
// Keyed cards in the owner's order; the owner owns the open-card choice.
|
|
defineProps({
|
|
cards: { type: Array, default: () => [] },
|
|
cardClassName: { type: String, default: '' },
|
|
badgeClassName: { type: String, default: '' },
|
|
onParams: { type: Function, default: () => {} },
|
|
onOpen: { type: Function, default: () => {} },
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<RailCard
|
|
v-for="card in cards"
|
|
:key="card.id"
|
|
:card="card"
|
|
:card-class-name="cardClassName"
|
|
:badge-class-name="badgeClassName"
|
|
:on-params="onParams"
|
|
:on-open="onOpen"
|
|
/>
|
|
</template>
|