
This makes Ember.js think that we're trying to use the property as setter and it's deprecated
29 lines
716 B
JavaScript
29 lines
716 B
JavaScript
import Ember from 'ember';
|
|
|
|
export default Ember.Component.extend({
|
|
classNames: ['settings-envvar'],
|
|
classNameBindings: ['envVar.public:is-public'],
|
|
isDeleting: false,
|
|
validates: { name: ['presence'] },
|
|
actionType: 'Save',
|
|
showValueField: Ember.computed.alias('public'),
|
|
|
|
value: function(key) {
|
|
if (this.get('envVar.public')) {
|
|
return this.get('envVar.value');
|
|
} else {
|
|
return '••••••••••••••••';
|
|
}
|
|
}.property('envVar.value', 'envVar.public'),
|
|
|
|
actions: {
|
|
"delete": function() {
|
|
if (this.get('isDeleting')) {
|
|
return;
|
|
}
|
|
this.set('isDeleting', true);
|
|
return this.get('envVar').destroyRecord();
|
|
}
|
|
}
|
|
});
|