Dodano animację dla listy historii dyżurnych

This commit is contained in:
2022-01-10 19:26:48 +01:00
parent b70cbc8d62
commit 47d6d63d68
+17 -5
View File
@@ -2,7 +2,8 @@
<div class="scenery-history"> <div class="scenery-history">
<h2>{{ $t('journal.title') }}</h2> <h2>{{ $t('journal.title') }}</h2>
<ul> <transition name="history-list-anim" mode="out-in">
<ul :key="dispatcherTimeline.length">
<li v-if="!isLoaded"> <li v-if="!isLoaded">
<h3>{{ $t('journal.loading') }}</h3> <h3>{{ $t('journal.loading') }}</h3>
</li> </li>
@@ -30,21 +31,18 @@
> >
<span class="dispatcher-to text--primary"> {{ timestampToString(dispatcher.dispatcherTo, true) }}</span> <span class="dispatcher-to text--primary"> {{ timestampToString(dispatcher.dispatcherTo, true) }}</span>
</span> </span>
<b>{{ dispatcher.dispatcherName }}</b> <b>{{ dispatcher.dispatcherName }}</b>
</div> </div>
</span> </span>
</li> </li>
</ul> </ul>
</transition>
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts">
import { GETTERS } from '@/constants/storeConstants';
import { useStore } from '@/store';
import axios from 'axios'; import axios from 'axios';
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { useRouter } from 'vue-router';
interface DispatcherTimeline { interface DispatcherTimeline {
date: string; date: string;
@@ -146,6 +144,20 @@ export default defineComponent({
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.history-list-anim {
&-enter-from,
&-leave-to {
opacity: 0;
}
&-enter-active {
transition: all 100ms ease-out;
}
&-leave-active {
transition: all 100ms ease-out 100ms;
}
}
.scenery-history { .scenery-history {
height: 600px; height: 600px;
overflow-y: hidden; overflow-y: hidden;