feat: toggleable feature flags (#209)
This commit is contained in:
parent
f08777f629
commit
69d009d02a
10 changed files with 111 additions and 12 deletions
|
@ -7,22 +7,26 @@ const { paginator, stream } = defineProps<{
|
|||
paginator: Paginator<any, Status[]>
|
||||
stream?: WsEvents
|
||||
}>()
|
||||
|
||||
const virtualScroller = $(computedEager(() => useFeatureFlags().experimentalVirtualScroll))
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<CommonPaginator v-bind="{ paginator, stream }" virtual-scroller>
|
||||
<CommonPaginator v-bind="{ paginator, stream }" :virtual-scroller="virtualScroller">
|
||||
<template #updater="{ number, update }">
|
||||
<button py-4 border="b base" flex="~ col" p-3 w-full text-primary font-bold @click="update">
|
||||
Show {{ number }} new items
|
||||
</button>
|
||||
</template>
|
||||
<template #default="{ item, active }">
|
||||
<DynamicScrollerItem :item="item" :active="active" tag="article">
|
||||
<StatusCard
|
||||
:status="item"
|
||||
border="b base" py-3
|
||||
/>
|
||||
</DynamicScrollerItem>
|
||||
<template v-if="virtualScroller">
|
||||
<DynamicScrollerItem :item="item" :active="active" tag="article">
|
||||
<StatusCard :status="item" border="b base" py-3 />
|
||||
</DynamicScrollerItem>
|
||||
</template>
|
||||
<template v-else>
|
||||
<StatusCard :status="item" border="b base" py-3 />
|
||||
</template>
|
||||
</template>
|
||||
<template #loading>
|
||||
<StatusCardSkeleton border="b base" py-3 />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue