mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 22:57:21 +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,
|
achievement: true,
|
||||||
label: $t => $t('modalContribAchievement'),
|
label: $t => $t('modalContribAchievement'),
|
||||||
modalId: 'contributor',
|
modalId: 'contributor',
|
||||||
|
sticky: true,
|
||||||
},
|
},
|
||||||
ACHIEVEMENT_ALL_YOUR_BASE: {
|
ACHIEVEMENT_ALL_YOUR_BASE: {
|
||||||
achievement: true,
|
achievement: true,
|
||||||
@@ -552,7 +553,7 @@ export default {
|
|||||||
this.text(config.label(this.$t), () => {
|
this.text(config.label(this.$t), () => {
|
||||||
this.notificationData = data;
|
this.notificationData = data;
|
||||||
this.$root.$emit('bv::show::modal', config.modalId);
|
this.$root.$emit('bv::show::modal', config.modalId);
|
||||||
}, true, 10000);
|
}, !config.sticky, 10000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
debounceCheckUserAchievements: debounce(function debounceCheck () {
|
debounceCheckUserAchievements: debounce(function debounceCheck () {
|
||||||
|
|||||||
Reference in New Issue
Block a user