* refactor: 💡 remove rose::notification in favor of hds ✅ Closes: https://hashicorp.atlassian.net/browse/ICU-15634
138 lines
3.8 KiB
Handlebars
138 lines
3.8 KiB
Handlebars
{{!
|
|
Copyright (c) HashiCorp, Inc.
|
|
SPDX-License-Identifier: BUSL-1.1
|
|
}}
|
|
|
|
{{page-title (app-name)}}
|
|
|
|
<Rose::Layout::Global as |layout|>
|
|
|
|
<layout.header>
|
|
<Rose::Header
|
|
class='{{if (is-loading) " loading"}}
|
|
{{if this.hasMacOSChrome " header-cushion"}}'
|
|
as |header|
|
|
>
|
|
<header.brand @logo='logo-app' @text={{(app-name)}} />
|
|
|
|
<header.nav>
|
|
<div id='header-nav'></div>
|
|
</header.nav>
|
|
|
|
<header.utilities as |utilities|>
|
|
{{#if this.showWindowActions}}
|
|
<Rose::Button
|
|
@iconOnly='flight-icons/svg/x-16'
|
|
@style='warning'
|
|
class='button-window-close'
|
|
title={{t 'actions.close'}}
|
|
{{on 'click' this.close}}
|
|
/>
|
|
<Rose::Button
|
|
@iconOnly='flight-icons/svg/square-16'
|
|
@style='secondary'
|
|
class='button-window-fullscreen'
|
|
title={{t 'actions.fullscreen'}}
|
|
{{on 'click' this.toggleFullScreen}}
|
|
/>
|
|
<Rose::Button
|
|
@iconOnly='flight-icons/svg/minus-16'
|
|
@style='secondary'
|
|
class='button-window-minimize'
|
|
title={{t 'actions.minimize'}}
|
|
{{on 'click' this.minimize}}
|
|
/>
|
|
{{/if}}
|
|
|
|
{{#if this.session.isAuthenticated}}
|
|
<utilities.dropdown
|
|
@text={{this.session.data.authenticated.username}}
|
|
@icon='flight-icons/svg/user-circle-16'
|
|
as |dropdown|
|
|
>
|
|
<dropdown.button {{on 'click' this.invalidateSession}}>
|
|
{{t 'actions.deauthenticate'}}
|
|
</dropdown.button>
|
|
</utilities.dropdown>
|
|
{{/if}}
|
|
|
|
</header.utilities>
|
|
</Rose::Header>
|
|
</layout.header>
|
|
|
|
<layout.body>
|
|
{{outlet}}
|
|
</layout.body>
|
|
|
|
</Rose::Layout::Global>
|
|
|
|
{{#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}}
|
|
|
|
<PendingConfirmations as |confirmation accept deny|>
|
|
{{#if confirmation.options.isConnectError}}
|
|
<Rose::Dialog
|
|
@heading={{t 'states.error'}}
|
|
@dismissButtonText={{t 'actions.ok'}}
|
|
@icon='flight-icons/svg/x-square-16'
|
|
@style='error'
|
|
@modal={{true}}
|
|
@dismiss={{deny}}
|
|
as |dialog|
|
|
>
|
|
<dialog.body>
|
|
<p>
|
|
{{confirmation.text}}
|
|
</p>
|
|
<p>
|
|
{{t 'questions.retry-confirm'}}
|
|
</p>
|
|
</dialog.body>
|
|
<dialog.footer>
|
|
<Rose::Button @style='primary' {{on 'click' accept}}>
|
|
{{t 'actions.retry'}}
|
|
</Rose::Button>
|
|
<Rose::Button @style='secondary' {{on 'click' deny}}>
|
|
{{t 'actions.cancel'}}
|
|
</Rose::Button>
|
|
</dialog.footer>
|
|
</Rose::Dialog>
|
|
{{else}}
|
|
<Rose::Dialog
|
|
@heading={{t 'actions.confirm'}}
|
|
@dismissButtonText={{t 'actions.cancel'}}
|
|
@icon='flight-icons/svg/alert-triangle-16'
|
|
@style='warning'
|
|
@modal={{true}}
|
|
@dismiss={{deny}}
|
|
as |dialog|
|
|
>
|
|
<dialog.body>
|
|
<p>{{confirmation.text}}</p>
|
|
</dialog.body>
|
|
<dialog.footer>
|
|
<Rose::Button @style='primary' {{on 'click' accept}}>
|
|
{{t 'actions.ok'}}
|
|
</Rose::Button>
|
|
<Rose::Button @style='secondary' {{on 'click' deny}}>
|
|
{{t 'actions.cancel'}}
|
|
</Rose::Button>
|
|
</dialog.footer>
|
|
</Rose::Dialog>
|
|
{{/if}}
|
|
</PendingConfirmations> |