From c1c777611820bb0c555f032ed6a5fb1d3e00a0e4 Mon Sep 17 00:00:00 2001 From: John Cowen Date: Tue, 5 Jan 2021 17:40:28 +0000 Subject: [PATCH] ui: Adds localStorage to mapping for user controlled theming (#9496) --- ui/packages/consul-ui/app/templates/application.hbs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ui/packages/consul-ui/app/templates/application.hbs b/ui/packages/consul-ui/app/templates/application.hbs index 6fb5c3880..b6732a513 100644 --- a/ui/packages/consul-ui/app/templates/application.hbs +++ b/ui/packages/consul-ui/app/templates/application.hbs @@ -1,11 +1,23 @@ {{page-title 'Consul' separator=' - '}} + {{#if (env 'CONSUL_ACLS_ENABLED')}} {{document-attrs class="has-acls"}} {{/if}} {{#if (env 'CONSUL_NSPACES_ENABLED')}} {{document-attrs class="has-nspaces"}} {{/if}} + + +{{#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}} + + {{#if (not-eq router.currentRouteName 'application')}}