mirror of
https://github.com/status-im/consul.git
synced 2025-02-10 20:56:46 +00:00
* Add before and after skip links portals * Move EmptyState and ErrorState to use a @login action/function * Move page title setting to the Route component * Add Routes and Outlets everywhere, and use those to access login modal * Add some aria-labels to the modals * Docs * Remove the label/input now we no longer need it, fixup pageobject * Add basic modal docs * Switch out old toggle names for ids * Wrap nspace Route template in a Route component * type > class
45 lines
968 B
Handlebars
45 lines
968 B
Handlebars
<Route
|
|
@name={{routeName}}
|
|
@title='Consul'
|
|
@titleSeparator=" - "
|
|
>
|
|
|
|
{{#if (env 'CONSUL_ACLS_ENABLED')}}
|
|
{{document-attrs class="has-acls"}}
|
|
{{/if}}
|
|
{{#if (env 'CONSUL_NSPACES_ENABLED')}}
|
|
{{document-attrs class="has-nspaces"}}
|
|
{{/if}}
|
|
|
|
<DataSource
|
|
@src="settings://consul:theme"
|
|
as |source|>
|
|
{{#each-in source.data as |key value|}}
|
|
{{#if (and value (contains key (array "color-scheme" "contrast")))}}
|
|
{{document-attrs class=(concat 'prefers-' key '-' value)}}
|
|
{{/if}}
|
|
{{/each-in}}
|
|
</DataSource>
|
|
|
|
{{#if (not-eq router.currentRouteName 'application')}}
|
|
<HashicorpConsul
|
|
id="wrapper"
|
|
@dcs={{dcs}}
|
|
@dc={{or dc dcs.firstObject}}
|
|
@nspaces={{nspaces}}
|
|
@nspace={{or nspace nspaces.firstObject}}
|
|
@onchange={{action "reauthorize"}}
|
|
as |consul|>
|
|
<Outlet
|
|
@name="application"
|
|
@model={{hash
|
|
app=consul
|
|
}}
|
|
as |o|>
|
|
{{outlet}}
|
|
</Outlet>
|
|
<Consul::Loader class="view-loader" />
|
|
</HashicorpConsul>
|
|
{{/if}}
|
|
</Route>
|