* FadeIn for Dialog fix #6
This commit is contained in:
		
							parent
							
								
									926947e7c9
								
							
						
					
					
						commit
						9e4e7d4697
					
				@ -127,7 +127,11 @@
 | 
				
			|||||||
      </router-view>
 | 
					      </router-view>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div id="popup-collection">
 | 
					    <div id="popup-collection">
 | 
				
			||||||
      <PopUp v-for="(popup, i) in $store.state.popups" :key="i" :item="popup" />
 | 
					      <PopUp
 | 
				
			||||||
 | 
					        v-for="popup in $store.state.popups"
 | 
				
			||||||
 | 
					        :key="popup.time"
 | 
				
			||||||
 | 
					        :item="popup"
 | 
				
			||||||
 | 
					      />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <Player ref="player" />
 | 
					    <Player ref="player" />
 | 
				
			||||||
    <Users ref="dialogUsers" />
 | 
					    <Users ref="dialogUsers" />
 | 
				
			||||||
 | 
				
			|||||||
@ -299,7 +299,7 @@ export default {
 | 
				
			|||||||
  right: 0;
 | 
					  right: 0;
 | 
				
			||||||
  bottom: 0;
 | 
					  bottom: 0;
 | 
				
			||||||
  z-index: 1000;
 | 
					  z-index: 1000;
 | 
				
			||||||
  animation: fadeIn ease 0.15s;
 | 
					  animation: fadeIn ease 0.20s;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.dialog-window {
 | 
					.dialog-window {
 | 
				
			||||||
  box-shadow: 0px 8px 32px var(--shadow);
 | 
					  box-shadow: 0px 8px 32px var(--shadow);
 | 
				
			||||||
 | 
				
			|||||||
@ -1,5 +1,5 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="popup-control flex-column shadow ma8">
 | 
					  <div class="popup-control flex-column shadow ma8" :class="{fadeOut: fadeout}">
 | 
				
			||||||
    <div class="flex-row" :class="item.type">
 | 
					    <div class="flex-row" :class="item.type">
 | 
				
			||||||
      <awesome-icon icon="circle-info" size="2x" class="ma" />
 | 
					      <awesome-icon icon="circle-info" size="2x" class="ma" />
 | 
				
			||||||
      <div class="flex-column pa8-top ma8-bottom ma8-right">
 | 
					      <div class="flex-column pa8-top ma8-bottom ma8-right">
 | 
				
			||||||
@ -11,6 +11,11 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      fadeout: false,
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    item: {
 | 
					    item: {
 | 
				
			||||||
      type: Object,
 | 
					      type: Object,
 | 
				
			||||||
@ -23,8 +28,11 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    setTimeout(() => {
 | 
					    setTimeout(() => {
 | 
				
			||||||
      this.$store.dispatch("removePopUp", this.item);
 | 
					      this.fadeout = true;
 | 
				
			||||||
    }, 5000);
 | 
					      setTimeout(() => {
 | 
				
			||||||
 | 
					        this.$store.dispatch("removePopUp", this.item);
 | 
				
			||||||
 | 
					      }, 1000);
 | 
				
			||||||
 | 
					    }, 4000);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
@ -53,4 +61,16 @@ export default {
 | 
				
			|||||||
  border-radius: 8px;
 | 
					  border-radius: 8px;
 | 
				
			||||||
  background-color: var(--success);
 | 
					  background-color: var(--success);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					.fadeOut {
 | 
				
			||||||
 | 
					  animation: fadeOut ease 1s;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					@keyframes fadeOut {
 | 
				
			||||||
 | 
					  from {
 | 
				
			||||||
 | 
					    opacity: 1;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  to {
 | 
				
			||||||
 | 
					    opacity: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
@ -27,7 +27,8 @@ export default {
 | 
				
			|||||||
    state.serverInfo = info;
 | 
					    state.serverInfo = info;
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  addPopUp(state, item) {
 | 
					  addPopUp(state, item) {
 | 
				
			||||||
    state.popups.push(item);
 | 
					    item.time = Date.now();
 | 
				
			||||||
 | 
					    state.popups.unshift(item);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  removePopUp(state, item) {
 | 
					  removePopUp(state, item) {
 | 
				
			||||||
    let index = state.popups.indexOf(item);
 | 
					    let index = state.popups.indexOf(item);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user