mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
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:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user