Skip to content

Commit

Permalink
fix and add transitions
Browse files Browse the repository at this point in the history
Signed-off-by: dartcafe <github@dartcafe.de>
  • Loading branch information
dartcafe committed Aug 11, 2024
1 parent 18c1346 commit 0b498a5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
const loading = ref(false)

const appClass = computed(() => [
transitionClass, {
transitionClass.value, {
edit: pollStore.permissions.edit,
},
])
Expand Down
20 changes: 11 additions & 9 deletions src/assets/scss/transitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@
transition: all 0.5s ease;
}

.list-enter,
.list-enter-from,
.list-leave-to {
opacity: 0;
}

.list-move {
transition: transform 0.5s;
}

.fade-leave-active .fade-enter-active{
transition: opacity 0.5s;
transition: transform 0.5s ease;
}
}

.fade-enter, .fade-leave-to {
opacity: 0;
}
.v-enter-active,
.v-leave-active {
transition: opacity 0.5s ease;
}

.v-enter-from,
.v-leave-to {
opacity: 0;
}
2 changes: 1 addition & 1 deletion src/components/Activity/Activities.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</script>

<template>
<TransitionGroup name="fade"
<TransitionGroup name="list"
class="activities"
tag="ul">
<ActivityItem v-for="(item) in activityStore.list"
Expand Down
18 changes: 9 additions & 9 deletions src/components/Cards/VoteInfoCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
</script>

<template>
<div class="info-section">
<CardUnpublishedPoll v-if="showUnpublishedPollCard" />
<CardAddProposals v-if="showAddProposalsCard" />
<CardLimitedVotes v-if="showLimitCard" />
<CardClosedPoll v-if="showClosedCard" />
<CardSendConfirmations v-if="showSendConfirmationsCard" />
<CardLocked v-if="pollStore.currentUserStatus.isLocked" />
<CardRegister v-if="showRegisterCard" />
</div>
<TransitionGroup class="info-section">
<CardUnpublishedPoll v-if="showUnpublishedPollCard" :key="0" />
<CardAddProposals v-if="showAddProposalsCard" :key="1" />
<CardLimitedVotes v-if="showLimitCard" :key="2" />
<CardClosedPoll v-if="showClosedCard" :key="3" />
<CardSendConfirmations v-if="showSendConfirmationsCard" :key="4" />
<CardLocked v-if="pollStore.currentUserStatus.isLocked" :key="5" />
<CardRegister v-if="showRegisterCard" :key="6" />
</TransitionGroup>
</template>

2 changes: 1 addition & 1 deletion src/components/Comments/Comments.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

<template>
<TransitionGroup tag="ul"
name="fade"
name="list"
:class="['comments' , { 'alternativestyle': preferencesStore.user.useCommentsAlternativeStyling }]"
:style="cssVar">
<CommentItem v-for="(comment) in commentsStore.groupedComments"
Expand Down

0 comments on commit 0b498a5

Please sign in to comment.