Files
habitica/website/client/components/snackbars/notifications.vue
pengfluf 6c64a1cd8c Beard and mustache facial hairs now can be bought as a full set for 5 gems (#10338)
* Purchasing All Facial Hairs Fixed

* Notifications z-index fixed

* Notifications z-index fixed x2

* Z-indexes fixed, facial hairs buying corrected

* isPurchaseAllNeeded refactored

* isPurchaseAllNeeded is more generic now

* Linting Passed
2018-05-13 16:04:43 +02:00

52 lines
1.0 KiB
Vue

<template lang="pug">
.notifications(:class="notificationsTopPos")
div(v-for='notification in notificationStore', :key='notification.uuid')
notification(:notification='notification')
</template>
<style lang="scss" scoped>
.notifications {
position: fixed;
right: 10px;
width: 350px;
z-index: 1070; // 1070 is above modal backgrounds
&-top-pos {
&-normal {
top: 65px;
}
&-sleeping {
top: 105px;
}
}
}
</style>
<script>
import { mapState } from 'client/libs/store';
import notification from './notification';
export default {
components: {
notification,
},
computed: {
...mapState({
notificationStore: 'notificationStore',
userSleeping: 'user.data.preferences.sleep',
}),
notificationsTopPos () {
const base = 'notifications-top-pos-';
let modifier = '';
if (this.userSleeping) {
modifier = 'sleeping';
} else {
modifier = 'normal';
}
return `${base}${modifier}`;
},
},
};
</script>