mirror of
https://github.com/discourse/discourse.git
synced 2025-06-14 02:32:51 +08:00
20 lines
505 B
JavaScript
20 lines
505 B
JavaScript
export default Ember.Component.extend({
|
|
|
|
init() {
|
|
this._super();
|
|
|
|
const connector = this.get('connector');
|
|
this.set('layoutName', connector.templateName);
|
|
|
|
const args = this.get('args') || {};
|
|
Object.keys(args).forEach(key => this.set(key, args[key]));
|
|
},
|
|
|
|
send(name, ...args) {
|
|
const connectorClass = this.get('connector.connectorClass');
|
|
const action = connectorClass.actions[name];
|
|
return action ? action.call(this, ...args) : this._super(name, ...args);
|
|
}
|
|
|
|
});
|