0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-10 04:12:53 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-mapper-connector.js.es6
Angus McLeod d8fd5cb258 various
2020-04-11 16:22:12 +10:00

20 Zeilen
Kein EOL
622 B
JavaScript

import Component from "@ember/component";
import { gt } from '@ember/object/computed';
import { computed } from "@ember/object";
import { removeMapperClasses } from '../lib/wizard-mapper';
export default Component.extend({
classNameBindings: [':mapper-connector', ':mapper-block', 'hasMultiple::single'],
hasMultiple: gt('connectors.length', 1),
connectorLabel: computed(function() {
let key = this.connector;
let path = this.inputTypes ? `input.${key}.name` : `connector.${key}`;
return I18n.t(`admin.wizard.${path}`);
}),
actions: {
onOpen() {
removeMapperClasses(this);
}
}
});