mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
FIX: base keyboard shortcuts on touch vs no touch.
This commit is contained in:
parent
bc48094d9a
commit
cbc71e693e
2 changed files with 4 additions and 2 deletions
|
@ -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 a new issue