1
0
Fork 0
discourse-custom-wizard-unl.../assets/javascripts/discourse/components/wizard-custom-input-pair.js.es6

14 Zeilen
495 B
Text

2020-03-21 18:30:11 +01:00
import { connectors } from '../lib/custom-wizard';
2020-03-23 06:41:04 +01:00
import { gt, or, alias } from "@ember/object/computed";
import { computed, observes} from "@ember/object";
2020-03-21 18:30:11 +01:00
export default Ember.Component.extend({
classNames: 'pair',
2020-03-22 07:47:56 +01:00
connectors: connectors,
2020-03-23 06:41:04 +01:00
hasConnector: or('options.enableConnectors', 'connectorKey'),
firstPair: gt('pair.index', 0),
showRemove: alias('firstPair'),
showJoin: computed('pair.pairCount', function() {
return this.pair.index < (this.pair.pairCount - 1);
})
2020-03-21 18:30:11 +01:00
})