consul/ui/packages/consul-ui/app/components/auth-form/index.js

29 lines
552 B
JavaScript

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
import Component from '@glimmer/component';
import { action } from '@ember/object';
import chart from './chart.xstate';
import tabs from './tabs.xstate';
export default class AuthForm extends Component {
constructor() {
super(...arguments);
this.chart = chart;
this.tabsChart = tabs;
}
@action
hasValue(context, event, meta) {
return this.value !== '' && typeof this.value !== 'undefined';
}
@action
focus() {
this.input.focus();
}
}