-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvement/revision pagination (#6303)
* #3764 add pagination to item revisions * #3764 add collapse feature to revision date groups * #3764 add pagination to item revisions * #3764 add collapse feature to revision date groups * dont pass a function into a prop and clean up * remove code from divider and clean up code * Use v-detail instead of v-divider Co-authored-by: Nitwel <nitwel@arcor.de> Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
- Loading branch information
1 parent
d3ba3a4
commit 062d99b
Showing
2 changed files
with
71 additions
and
24 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
app/src/views/private/components/revisions-drawer-detail/revisions-date-group.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<template> | ||
<v-detail v-model="expand" :label="group.dateFormatted" class="revisions-date-group"> | ||
<div v-show="expand" class="scroll-container"> | ||
<revision-item | ||
v-for="(item, index) in group.revisions" | ||
:key="item.id" | ||
:revision="item" | ||
:last="index === group.revisions.length - 1" | ||
@click="$emit('click', item.id)" | ||
/> | ||
</div> | ||
</v-detail> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent, ref } from 'vue'; | ||
import RevisionItem from './revision-item.vue'; | ||
export default defineComponent({ | ||
components: { RevisionItem }, | ||
props: { | ||
group: { | ||
type: Object, | ||
required: true, | ||
}, | ||
}, | ||
emits: ['click'], | ||
setup() { | ||
const expand = ref(true); | ||
return { expand }; | ||
}, | ||
}); | ||
</script> | ||
|
||
<style scoped> | ||
.revisions-date-group .scroll-container { | ||
padding-bottom: 24px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters