refs #1766 Introduce vue-virtual-scroll in Notifications
This commit is contained in:
parent
b673e4df95
commit
2c3e5ed70d
|
@ -2,22 +2,24 @@
|
|||
<div id="notifications" v-shortkey="shortcutEnabled ? { next: ['j'] } : {}" @shortkey="handleKey">
|
||||
<div class="unread">{{ unread.length > 0 ? unread.length : '' }}</div>
|
||||
<div v-shortkey="{ linux: ['ctrl', 'r'], mac: ['meta', 'r'] }" @shortkey="reload()"></div>
|
||||
<transition-group name="timeline" tag="div">
|
||||
<div class="notifications" v-for="message in notifications" v-bind:key="message.id">
|
||||
<DynamicScroller :items="notifications" :min-item-size="20" class="scroller" page-mode>
|
||||
<template v-slot="{ item, index, active }">
|
||||
<DynamicScrollerItem :item="item" :active="active" :size-dependencies="[item.url]" :data-index="index">
|
||||
<notification
|
||||
:message="message"
|
||||
:message="item"
|
||||
:filter="filter"
|
||||
:focused="message.id === focusedId"
|
||||
:focused="item.id === focusedId"
|
||||
:overlaid="modalOpened"
|
||||
v-on:update="updateToot"
|
||||
@focusNext="focusNext"
|
||||
@focusPrev="focusPrev"
|
||||
@focusRight="focusSidebar"
|
||||
@selectNotification="focusNotification(message)"
|
||||
@selectNotification="focusNotification(item)"
|
||||
>
|
||||
</notification>
|
||||
</div>
|
||||
</transition-group>
|
||||
</DynamicScrollerItem>
|
||||
</template>
|
||||
</DynamicScroller>
|
||||
<div class="loading-card" v-loading="lazyLoading" :element-loading-background="backgroundColor"></div>
|
||||
<div :class="openSideBar ? 'upper-with-side-bar' : 'upper'" v-show="!heading">
|
||||
<el-button type="primary" icon="el-icon-arrow-up" @click="upper" circle> </el-button>
|
||||
|
|
Loading…
Reference in New Issue