Make contributor achievement notification "sticky" (#12183)

Add ability to define any notification to be "sticky", so that it will not timeout and stays on screen until clicked.
This commit is contained in:
Carl Vuorinen
2020-05-09 23:02:20 +03:00
committed by GitHub
parent c218b8d56c
commit 1ebe57b114

View File

@@ -170,6 +170,7 @@ const NOTIFICATIONS = {
achievement: true,
label: $t => $t('modalContribAchievement'),
modalId: 'contributor',
sticky: true,
},
ACHIEVEMENT_ALL_YOUR_BASE: {
achievement: true,
@@ -552,7 +553,7 @@ export default {
this.text(config.label(this.$t), () => {
this.notificationData = data;
this.$root.$emit('bv::show::modal', config.modalId);
}, true, 10000);
}, !config.sticky, 10000);
}
},
debounceCheckUserAchievements: debounce(function debounceCheck () {