FIX: base keyboard shortcuts on touch vs no touch.
This commit is contained in:
parent
bc48094d9a
commit
cbc71e693e
|
@ -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() {
|
||||
|
|
|
@ -28,5 +28,7 @@ export default {
|
|||
// Inject it
|
||||
application.register('capabilities:main', caps, { instantiate: false });
|
||||
application.inject('view', 'capabilities', 'capabilities:main');
|
||||
|
||||
Discourse.Capabilities = caps;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue