Files
threshold-ui/ui/desktop/app/components/settings-card/user/index.hbs
T
2024-09-24 11:58:25 -04:00

47 lines
1.1 KiB
Handlebars

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
<SettingsCard @header={{t 'resources.user.title'}} @icon='user'>
<:state>
{{#if this.isAuthenticated}}
<Hds::Badge
@text={{t 'states.authenticated'}}
@icon='check'
@color='success'
/>
{{else}}
<Hds::Badge @text={{t 'states.unauthenticated'}} @color='neutral' />
{{/if}}
</:state>
<:body>
<div>
<Hds::Text::Display>
{{t 'resources.auth-method.title'}}
</Hds::Text::Display>
<Hds::Text::Body @tag='p' @weight='medium' data-test-auth-method>
{{this.authMethod}}
</Hds::Text::Body>
</div>
<div>
<Hds::Text::Display>
{{t 'form.username.label'}}
</Hds::Text::Display>
<Hds::Text::Body @tag='p' @weight='medium' data-test-username>
{{this.userInfo}}
</Hds::Text::Body>
</div>
</:body>
<:action>
<Hds::Button
data-test-signout-button
@text={{t 'actions.deauthenticate'}}
@color='critical'
@icon='sign-out'
@size='medium'
{{on 'click' this.invalidateSession}}
/>
</:action>
</SettingsCard>