mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 21:10:17 +08:00
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
Block a user