FIX: base keyboard shortcuts on touch vs no touch.

This commit is contained in:
Sam 2014-08-06 15:00:51 +10:00
parent bc48094d9a
commit cbc71e693e
2 changed files with 4 additions and 2 deletions

View file

@ -10,11 +10,11 @@ export default Ember.ArrayController.extend(Discourse.HasCurrentUser, {
badgesUrl: Discourse.getURL('/badges'),
showKeyboardShortcuts: function(){
return !Discourse.Mobile.mobileView && !Discourse.Mobile.isMobileDevice;
return !Discourse.Mobile.mobileView && !Discourse.Capabilities.touch;
}.property(),
showMobileToggle: function(){
return Discourse.SiteSettings.enable_mobile_theme && Discourse.Mobile.isMobileDevice;
return Discourse.SiteSettings.enable_mobile_theme && Discourse.Capabilities.touch;
}.property(),
mobileViewLinkTextKey: function() {

View file

@ -28,5 +28,7 @@ export default {
// Inject it
application.register('capabilities:main', caps, { instantiate: false });
application.inject('view', 'capabilities', 'capabilities:main');
Discourse.Capabilities = caps;
}
};