Files
threshold-ui/ui/admin/app/templates/application.hbs
T

167 lines
5.1 KiB
Handlebars
Raw Normal View History

{{!
Copyright (c) HashiCorp, Inc.
SPDX-License-Identifier: BUSL-1.1
}}
2020-11-16 14:57:42 -05:00
{{page-title (app-name)}}
2020-07-23 09:37:06 -04:00
<Rose::Layout::Global as |layout|>
<layout.header>
2022-09-07 16:21:27 -04:00
<Rose::Header class={{if (is-loading) ' loading'}} as |header|>
<header.brand @logo='logo-app' @text={{(app-name)}} />
2020-10-01 13:15:45 -04:00
2020-07-24 17:49:42 -04:00
{{#if this.session.isAuthenticated}}
<header.nav>
<HeaderNav />
</header.nav>
2020-09-27 21:20:57 -04:00
2020-07-24 17:49:42 -04:00
<header.utilities as |utilities|>
<utilities.dropdown
2020-10-01 14:15:20 -04:00
@text={{this.session.data.authenticated.username}}
2021-09-16 14:03:26 -07:00
@icon='flight-icons/svg/user-circle-16'
as |dropdown|
2020-07-24 17:49:42 -04:00
>
<dropdown.link @route='account.change-password'>
2020-09-17 10:24:22 -04:00
{{t 'actions.change-password'}}
</dropdown.link>
<dropdown.separator />
2020-11-04 13:51:37 -05:00
<dropdown.button {{on 'click' this.invalidateSession}}>
2020-07-24 17:49:42 -04:00
{{t 'actions.deauthenticate'}}
</dropdown.button>
2020-11-04 13:51:37 -05:00
<dropdown.separator />
2023-03-17 14:34:37 -07:00
<dropdown.section @title={{t 'actions.toggle-color-theme'}}>
<Hds::Form::Radio::Group
@name='theme'
class='dropdown-radio-btn'
as |G|
>
{{#each this.themes as |theme|}}
<G.RadioField
@value={{theme.value}}
checked={{eq this.session.data.theme theme.value}}
{{on 'change' (fn this.toggleTheme theme.value)}}
as |F|
>
<F.Label>{{t (concat 'themes.' theme.label)}}</F.Label>
</G.RadioField>
{{/each}}
</Hds::Form::Radio::Group>
</dropdown.section>
2020-11-04 13:51:37 -05:00
2020-07-24 17:49:42 -04:00
</utilities.dropdown>
2023-03-17 14:34:37 -07:00
{{#if (feature-flag 'dev-edition-toggle')}}
<utilities.dropdown
data-test-dev-edition-toggle
@text={{t
'titles.feature-edition'
2023-03-31 17:38:17 -07:00
edition=this.featureEdition.edition
2023-03-17 14:34:37 -07:00
}}
@icon='flight-icons/svg/layers-16'
as |dropdown|
>
<dropdown.section @title={{t 'actions.toggle-feature-edition'}}>
<Hds::Form::Radio::Group
@name='edition'
class='dropdown-radio-btn'
as |G|
>
{{#each this.featureEdition.editions as |edition|}}
<G.RadioField
@value={{edition}}
checked={{eq this.featureEdition.edition edition}}
{{on 'change' (fn this.toggleEdition edition)}}
as |F|
>
<F.Label>{{edition}}</F.Label>
</G.RadioField>
{{/each}}
</Hds::Form::Radio::Group>
2023-03-17 14:34:37 -07:00
</dropdown.section>
2023-03-31 17:38:17 -07:00
<dropdown.separator />
<dropdown.section @title={{t 'actions.toggle-licensed-features'}}>
<Rose::Form as |form|>
{{#each this.featureEdition.licensedFeatures as |feature|}}
<dropdown.item>
<form.checkbox
@label={{feature}}
@checked={{feature-flag feature}}
@onChange={{fn this.toggleFeature feature}}
2023-03-31 17:38:17 -07:00
/>
</dropdown.item>
{{/each}}
</Rose::Form>
</dropdown.section>
2023-03-17 14:34:37 -07:00
</utilities.dropdown>
{{/if}}
2020-07-24 17:49:42 -04:00
</header.utilities>
2020-10-01 13:15:45 -04:00
2020-07-24 17:49:42 -04:00
{{/if}}
2020-10-01 13:15:45 -04:00
2020-05-28 09:14:51 -04:00
</Rose::Header>
</layout.header>
2020-06-08 11:32:19 -04:00
<layout.body>
2020-06-24 10:57:56 -04:00
{{outlet}}
</layout.body>
2020-05-30 12:42:10 -04:00
</Rose::Layout::Global>
2020-05-29 19:44:46 -04:00
{{#if this.flashMessages.queue}}
<div class='ember-notify-cn'>
{{#each this.flashMessages.queue as |flash|}}
<div class='ember-notify-show ember-notify'>
<Hds::Toast
@color={{map-type-to-color flash.notificationType}}
@onDismiss={{fn flash.dismiss flash}}
data-test-toast-notification
as |T|
>
<T.Title>{{t (concat 'states.' flash.notificationType)}}</T.Title>
<T.Description>{{flash.message}}</T.Description>
</Hds::Toast>
</div>
{{/each}}
</div>
{{/if}}
2020-10-14 09:33:44 -04:00
<PendingConfirmations as |confirmation accept deny|>
<Hds::Modal @color='warning' as |M|>
<M.Header @icon='alert-triangle' @onDismiss={{deny}}>
{{if
confirmation.options.title
(t confirmation.options.title)
(t 'actions.confirm')
}}
</M.Header>
<M.Body>
<Hds::Text::Body @tag='p'>
{{confirmation.text}}
</Hds::Text::Body>
</M.Body>
<M.Footer>
<Hds::ButtonSet>
<Hds::Button
@text={{if
confirmation.options.confirm
(t confirmation.options.confirm)
(t 'actions.ok')
}}
@color='primary'
{{on 'click' accept}}
/>
<Hds::Button
@text={{t 'actions.cancel'}}
@color='secondary'
{{on 'click' deny}}
/>
</Hds::ButtonSet>
</M.Footer>
</Hds::Modal>
2022-10-06 11:41:12 -04:00
</PendingConfirmations>