3 var repoInfoTemplate = require('./tmpl/repoInfo.hbs');
4 var Marionette = require('backbone.marionette');
5 const { getBackendForRoom } = require('gitter-web-shared/backend-utils');
7 module.exports = Marionette.ItemView.extend({
8 template: repoInfoTemplate,
14 initialize: function(options) {
15 this.roomModel = options.roomModel;
18 this.listenTo(this.roomModel, 'change:backend', this.onRoomChange, this);
21 onRoomChange: function() {
22 const backend = getBackendForRoom(this.roomModel);
24 const shouldShowRepoInfo = backend && backend.type === 'GH_REPO';
25 this.triggerMethod('repoInfo:changeVisible', shouldShowRepoInfo);
26 if (!shouldShowRepoInfo) {
34 linkPath: backend.linkPath