consul/ui-v2/app/components/app-view/index.hbs

53 lines
1.5 KiB
Handlebars

{{yield}}
{{#if (not loading)}}
<header>
{{#each flashMessages.queue as |flash|}}
<FlashMessage @flash={{flash}} as |component flash|>
{{! flashes automatically ucfirst the type }}
<p data-notification class="{{lowercase component.flashType}} notification-{{lowercase flash.action}}">
<strong>
{{component.flashType}}!
</strong>
<YieldSlot @name="notification" @params={{block-params (lowercase component.flashType) (lowercase flash.action) flash.item}}>{{yield}}</YieldSlot>
</p>
</FlashMessage>
{{/each}}
<div>
<div class="actions">
{{#if authorized}}
<YieldSlot @name="actions">{{yield}}</YieldSlot>
{{/if}}
</div>
<div>
{{#if authorized}}
<nav aria-label="Breadcrumb">
<YieldSlot @name="breadcrumbs">{{yield}}</YieldSlot>
</nav>
{{/if}}
<YieldSlot @name="header">{{yield}}</YieldSlot>
</div>
</div>
{{#if authorized}}
<YieldSlot @name="toolbar">
<input type="checkbox" id="toolbar-toggle" />
{{yield}}
</YieldSlot>
{{/if}}
</header>
{{/if}}
<div>
{{#if loading}}
{{partial 'consul-loading'}}
{{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>