From 1304dc88201d49bc040fcf5d4e328c9afa143a3f 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 6fb5c38809..b6732a5137 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')}}