90 lines
2.7 KiB
Handlebars
90 lines
2.7 KiB
Handlebars
{{yield}}
|
|
{{#if (not loading)}}
|
|
<header>
|
|
{{#each flashMessages.queue as |flash|}}
|
|
<FlashMessage @flash={{flash}} as |component flash|>
|
|
{{#let (lowercase component.flashType) (lowercase flash.action) as |status type|}}
|
|
{{! flashes automatically ucfirst the type }}
|
|
|
|
<p data-notification class={{concat status ' notification-' type}}>
|
|
<strong>
|
|
{{capitalize status}}!
|
|
</strong>
|
|
{{#yield-slot name="notification" params=(block-params status type flash.item)}}
|
|
{{yield}}
|
|
{{#if (eq type 'logout')}}
|
|
{{#if (eq status 'success') }}
|
|
You are now logged out.
|
|
{{else}}
|
|
There was an error logging out.
|
|
{{/if}}
|
|
{{else if (eq type 'authorize')}}
|
|
{{#if (eq status 'success') }}
|
|
You are now logged in.
|
|
{{else}}
|
|
There was an error, please check your SecretID/Token
|
|
{{/if}}
|
|
{{/if}}
|
|
{{else}}
|
|
{{#if (eq type 'logout')}}
|
|
{{#if (eq status 'success') }}
|
|
You are now logged out.
|
|
{{else}}
|
|
There was an error logging out.
|
|
{{/if}}
|
|
{{else if (eq type 'authorize')}}
|
|
{{#if (eq status 'success') }}
|
|
You are now logged in.
|
|
{{else}}
|
|
There was an error, please check your SecretID/Token
|
|
{{/if}}
|
|
{{/if}}
|
|
{{/yield-slot}}
|
|
</p>
|
|
{{/let}}
|
|
</FlashMessage>
|
|
{{/each}}
|
|
<div>
|
|
<div>
|
|
{{#if authorized}}
|
|
<nav aria-label="Breadcrumb">
|
|
<YieldSlot @name="breadcrumbs">{{yield}}</YieldSlot>
|
|
</nav>
|
|
{{/if}}
|
|
<div class="title">
|
|
<YieldSlot @name="header">
|
|
{{yield}}
|
|
</YieldSlot>
|
|
<div class="actions">
|
|
{{#if authorized}}
|
|
<YieldSlot @name="actions">{{yield}}</YieldSlot>
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
<YieldSlot @name="nav">
|
|
{{yield}}
|
|
</YieldSlot>
|
|
</div>
|
|
</div>
|
|
{{#if authorized}}
|
|
<YieldSlot @name="toolbar">
|
|
<input type="checkbox" id="toolbar-toggle" />
|
|
{{yield}}
|
|
</YieldSlot>
|
|
{{/if}}
|
|
</header>
|
|
{{/if}}
|
|
<div>
|
|
{{#if loading}}
|
|
<ConsulLoader />
|
|
{{else}}
|
|
{{#if (not enabled) }}
|
|
<YieldSlot @name="disabled">{{yield}}</YieldSlot>
|
|
{{else if (not authorized)}}
|
|
<YieldSlot @name="authorization">{{yield}}</YieldSlot>
|
|
{{else}}
|
|
<YieldSlot @name="content">{{yield}}</YieldSlot>
|
|
{{/if}}
|
|
{{/if}}
|
|
</div>
|