refactor: alerts + admin profile + user create dialog as Vue components
This commit is contained in:
		
							
								
								
									
										21
									
								
								client/js/components/alert.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								client/js/components/alert.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
<template lang="pug">
 | 
			
		||||
  transition(name='alert', enter-active-class="animated zoomIn", leave-active-class="animated fadeOutRight")
 | 
			
		||||
    .alert(v-if='shown', v-bind:class='style')
 | 
			
		||||
      .alert-icon: i(v-bind:class='icon')
 | 
			
		||||
      .alert-msg {{ msg }}
 | 
			
		||||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
  export default {
 | 
			
		||||
    name: 'alert',
 | 
			
		||||
    data () {
 | 
			
		||||
      return {}
 | 
			
		||||
    },
 | 
			
		||||
    computed: {
 | 
			
		||||
      shown() { return this.$store.state.alert.shown },
 | 
			
		||||
      style() { return 'is-' + this.$store.state.alert.style },
 | 
			
		||||
      icon() { return 'icon-' + this.$store.state.alert.icon },
 | 
			
		||||
      msg() { return this.$store.state.alert.msg },
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
</script>
 | 
			
		||||
		Reference in New Issue
	
	Block a user