This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/components/home-logo.js.es6
2014-09-09 12:57:51 -04:00

31 lines
870 B
JavaScript

export default Ember.Component.extend({
classNames: ["title"],
linkUrl: function() {
return Discourse.getURL('/');
}.property(),
showSmallLogo: function() {
return !Discourse.Mobile.mobileView && this.get("minimized");
}.property("minimized"),
showMobileLogo: function() {
return Discourse.Mobile.mobileView && !Ember.isBlank(this.get('mobileBigLogoUrl'));
}.property(),
smallLogoUrl: Discourse.computed.setting('logo_small_url'),
bigLogoUrl: Discourse.computed.setting('logo_url'),
mobileBigLogoUrl: Discourse.computed.setting('mobile_logo_url'),
title: Discourse.computed.setting('title'),
click: function(e) {
// if they want to open in a new tab, let it so
if (e.shiftKey || e.metaKey || e.ctrlKey || e.which === 2) { return true; }
e.preventDefault();
Discourse.URL.routeTo('/');
return false;
}
});