mirror of https://github.com/rancher/ui.git
22 lines
589 B
JavaScript
22 lines
589 B
JavaScript
import { computed } from '@ember/object';
|
|
import Component from '@ember/component';
|
|
import SafeStyle from 'shared/mixins/safe-style';
|
|
import layout from './template';
|
|
|
|
|
|
export default Component.extend(SafeStyle, {
|
|
layout,
|
|
tagName: 'span',
|
|
value: null,
|
|
editable: true,
|
|
classesForInput: 'form-control',
|
|
classesForDisplay: '',
|
|
obfuscate: false,
|
|
obfuscatedValue: computed('value', function() {
|
|
let val = this.get('value') || '';
|
|
let count = val.length;
|
|
let obChar = '*';
|
|
return new Array(count+1).join(obChar);
|
|
})
|
|
});
|