ctucx.git: ctucx.things

simple inventory management web-app

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
<style lang="scss">
@import "../css/_globals";

.lpGlobalAlerts {
	background: $yellow1;
	border: 1px solid $darkYellow;
	border-radius: 0 0 10px 10px;
	border-top: none;
	left: 50%;
	margin: 0;
	padding: 0;
	position: fixed;
	text-align: center;
	top: 0;
	transform: translateX(-50%);
	width: 50%;
	z-index: $aboveDialog;
}

.lpGlobalAlert {
	border-bottom: 1px solid $darkYellow;
	list-style-type: none;
	margin: 0;
	padding: $spacingMedium;

	&:last-child {
		border-bottom: none;
	}
}
</style>

<template>
	<ul v-if="alerts && alerts.length" class="lpGlobalAlerts">
		<li v-for="alert in alerts" class="lpGlobalAlert">
			{{ alert.message }}
		</li>
	</ul>
</template>

<script>

export default {
	name: 'GlobalAlerts',
	computed: {
		alerts() {
			return this.$store.state.globalAlerts;
		},
	},
};
</script>