0
0
Fork 1
Spiegel von https://github.com/paviliondev/discourse-custom-wizard.git synchronisiert 2024-11-23 01:40:29 +01:00
discourse-custom-wizard/assets/javascripts/discourse/components/wizard-custom-input-pair.js.es6

14 Zeilen
541 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({
2020-03-24 10:35:46 +01:00
classNameBindings: [':input-pair', 'hasConnector::no-connector'],
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
})