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'),
|
badgesUrl: Discourse.getURL('/badges'),
|
||||||
|
|
||||||
showKeyboardShortcuts: function(){
|
showKeyboardShortcuts: function(){
|
||||||
return !Discourse.Mobile.mobileView && !Discourse.Mobile.isMobileDevice;
|
return !Discourse.Mobile.mobileView && !Discourse.Capabilities.touch;
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
showMobileToggle: function(){
|
showMobileToggle: function(){
|
||||||
return Discourse.SiteSettings.enable_mobile_theme && Discourse.Mobile.isMobileDevice;
|
return Discourse.SiteSettings.enable_mobile_theme && Discourse.Capabilities.touch;
|
||||||
}.property(),
|
}.property(),
|
||||||
|
|
||||||
mobileViewLinkTextKey: function() {
|
mobileViewLinkTextKey: function() {
|
||||||
|
|
|
@ -28,5 +28,7 @@ export default {
|
||||||
// Inject it
|
// Inject it
|
||||||
application.register('capabilities:main', caps, { instantiate: false });
|
application.register('capabilities:main', caps, { instantiate: false });
|
||||||
application.inject('view', 'capabilities', 'capabilities:main');
|
application.inject('view', 'capabilities', 'capabilities:main');
|
||||||
|
|
||||||
|
Discourse.Capabilities = caps;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue