mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
Gift 1 Get 1 Promo 2018-19! (#10915)
* feat(subscription): promo banner in modal * feat(subscription): promo banner on main page * fix(banners): remove extraneous margin adjustment * fix(banners): various * feat(promotion): gift 1, get 1 * fix(promo): various * chore(promo): add Bailey * fix(promo): use different email template for promo beneficiary * fix(promo): turns out Winter is meaningful
This commit is contained in:
@@ -12,6 +12,10 @@
|
||||
z-index: 1400; // 1400 is above modal backgrounds
|
||||
|
||||
&-top-pos {
|
||||
&-double {
|
||||
top: 145px;
|
||||
}
|
||||
|
||||
&-normal {
|
||||
top: 65px;
|
||||
}
|
||||
@@ -26,6 +30,7 @@
|
||||
<script>
|
||||
import { mapState } from 'client/libs/store';
|
||||
import notification from './notification';
|
||||
import { CONSTANTS, getLocalSetting } from 'client/libs/userlocalManager';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -39,7 +44,9 @@ export default {
|
||||
notificationsTopPos () {
|
||||
const base = 'notifications-top-pos-';
|
||||
let modifier = '';
|
||||
if (this.userSleeping) {
|
||||
if (this.userSleeping && this.giftingShown) {
|
||||
modifier = 'double';
|
||||
} else if (this.userSleeping || this.giftingShown) {
|
||||
modifier = 'sleeping';
|
||||
} else {
|
||||
modifier = 'normal';
|
||||
@@ -47,5 +54,10 @@ export default {
|
||||
return `${base}${modifier}`;
|
||||
},
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
giftingShown: getLocalSetting(CONSTANTS.keyConstants.GIFTING_BANNER_DISPLAY) !== 'dismissed',
|
||||
};
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user