mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-22 11:38:24 +00:00
fix bug switch audio wasn't working
This commit is contained in:
parent
a5f1e30880
commit
d7aaec2262
3 changed files with 15 additions and 10 deletions
|
|
@ -154,7 +154,7 @@
|
|||
.toolbar-notifs-no-messages
|
||||
padding: 0.382em 1em
|
||||
// Settings dropdown
|
||||
.toolbar-settings
|
||||
.toolbar-settings, .toolbar-audio
|
||||
@extend $hrpg-modal-dropdown-left
|
||||
.toolbar-controls
|
||||
@extend $hrpg-modal-controls
|
||||
|
|
@ -166,7 +166,7 @@
|
|||
@media screen and (max-width:768px)
|
||||
.toolbar-toggle
|
||||
display: none
|
||||
.toolbar-mobile, .toolbar-settings
|
||||
.toolbar-mobile, .toolbar-settings, .toolbar-audio
|
||||
.toolbar-submenu
|
||||
padding-left: 1em
|
||||
display: block
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ angular.module('authCtrl', [])
|
|||
// Using controller: 'AuthCtrl' it causes problems
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$scope.passwordReset = function(email){
|
||||
$http.post(API_URL + '/api/v2/user/reset-password', {email:email})
|
||||
|
|
@ -89,10 +89,14 @@ angular.module('authCtrl', [])
|
|||
.error(function(data){
|
||||
alert(data.err);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$scope.expandMenu = function(menu) {
|
||||
$scope._expandedMenu = ($scope._expandedMenu == menu) ? null : menu;
|
||||
}
|
||||
};
|
||||
|
||||
$scope.switchAudio = function(bool) {
|
||||
User.set({"preferences.sound": bool});
|
||||
};
|
||||
}
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -144,12 +144,13 @@ nav.toolbar(ng-controller='AuthCtrl', ng-class='{active: isToolbarHidden}')
|
|||
div
|
||||
ul.toolbar-submenu(ng-click='expandMenu(null)')
|
||||
li
|
||||
a(ng-if='user.preferences.sound', ng-click='set("preferences.sound",false)')
|
||||
i.glyphicon.glyphicon-volume_down(tooltip=env.t('soundOff'))
|
||||
li
|
||||
a(ng-if='!user.preferences.sound', ng-click='set("preferences.sound",true)')
|
||||
i.glyphicon.glyphicon-mute(tooltip=env.t('soundOn'))
|
||||
label=env.t('switchSound')
|
||||
a(ng-if='user.preferences.sound', ng-click='switchAudio(false)')
|
||||
span.glyphicon.glyphicon-volume-down(tooltip=env.t('soundOff'))
|
||||
a(ng-if='!user.preferences.sound', ng-click='switchAudio(true)')
|
||||
span.glyphicon.glyphicon-volume-off(tooltip=env.t('soundOn'))
|
||||
li
|
||||
label(for='audioTheme')=env.t('selectTheme')
|
||||
select#audioTheme(
|
||||
style='width:140px',
|
||||
ng-controller='SettingsCtrl',
|
||||
|
|
|
|||
Loading…
Reference in a new issue