[WIP] Play Sounds in the new Client (#9012)

* move audioThemes to content - add audio settings

* copy audioFiles to website/static/audio - playSounds on $emit()

* Play Sounds for Rewards, Purchasing Items / Quests

* remove shop http-api calls

* play reward sound when buying gem

* fix lint / always show mysterybox
This commit is contained in:
negue
2017-09-02 20:24:53 +02:00
committed by GitHub
parent 0424d214c5
commit d051bdf2c9
197 changed files with 92 additions and 71 deletions
+18 -1
View File
@@ -417,6 +417,22 @@ export default {
return;
}
switch (this.task.type) {
case 'habit':
this.$root.$emit('playSound', direction === 'up' ? 'Plus_Habit' : 'Minus_Habit');
break;
case 'todo':
this.$root.$emit('playSound', 'Todo');
break;
case 'daily':
this.$root.$emit('playSound', 'Daily');
break;
case 'reward':
this.$root.$emit('playSound', 'Reward');
break;
}
if (task.group.approval.required) task.group.approval.requested = true;
const response = await axios.post(`/api/v3/tasks/${task._id}/score/${direction}`);
@@ -443,7 +459,8 @@ export default {
if (drop) {
let text;
let type;
// TODO $rootScope.playSound('Item_Drop');
this.$root.$emit('playSound', 'Item_Drop');
// Note: For Mystery Item gear, drop.type will be 'head', 'armor', etc
// so we use drop.notificationType below.