ui: Add version information back into the footer (#11803)

This commit is contained in:
John Cowen 2021-12-13 15:54:58 +00:00 committed by GitHub
parent b8888fc0f2
commit 45d97f080f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 7 deletions

3
.changelog/11803.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:feature
ui: Adds visible Consul version information
```

View File

@ -4,6 +4,9 @@
.app .notifications { .app .notifications {
@extend %app-notifications; @extend %app-notifications;
} }
.app footer {
@extend %footer;
}
%app-notifications { %app-notifications {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -58,14 +61,36 @@
%main-nav-vertical-hoisted.is-active > label > * { %main-nav-vertical-hoisted.is-active > label > * {
@extend %main-nav-horizontal-action-active; @extend %main-nav-horizontal-action-active;
} }
%footer,
%main-nav-sidebar, %main-nav-sidebar,
%main-notifications, %main-notifications,
main { main {
@extend %transition-pushover; @extend %transition-pushover;
} }
%footer {
position: absolute;
z-index: 50;
color: rgb(var(--tone-gray-400));
font-size: var(--typo-size-800);
width: 250px;
padding-left: 25px;
}
.app footer {
top: calc(100vh - 42px);
top: calc(max(100vh, 460px) - 42px);
}
html.has-partitions.has-nspaces .app footer {
top: calc(100vh - 42px);
top: calc(max(100vh, 640px) - 42px);
}
%main-nav-sidebar {
z-index: 10;
}
%footer,
%main-nav-sidebar { %main-nav-sidebar {
transition-property: left; transition-property: left;
z-index: 10;
} }
%app-notifications, %app-notifications,
main { main {
@ -83,20 +108,20 @@ main {
%main-nav-horizontal-toggle:checked ~ main .notifications { %main-nav-horizontal-toggle:checked ~ main .notifications {
width: 100%; width: 100%;
} }
%main-nav-horizontal-toggle ~ footer,
%main-nav-horizontal-toggle + header > div > nav:first-of-type { %main-nav-horizontal-toggle + header > div > nav:first-of-type {
left: 0; left: 0;
} }
%main-nav-horizontal-toggle:checked ~ footer,
%main-nav-horizontal-toggle:checked + header > div > nav:first-of-type { %main-nav-horizontal-toggle:checked + header > div > nav:first-of-type {
left: calc(var(--chrome-width, 300px) * -1); left: calc(var(--chrome-width, 300px) * -1);
} }
%main-nav-horizontal-toggle ~ main .notifications, %main-nav-horizontal-toggle ~ main .notifications,
%main-nav-horizontal-toggle ~ main, %main-nav-horizontal-toggle ~ main {
%main-nav-horizontal-toggle ~ footer {
margin-left: var(--chrome-width, 300px); margin-left: var(--chrome-width, 300px);
} }
%main-nav-horizontal-toggle:checked ~ main .notifications, %main-nav-horizontal-toggle:checked ~ main .notifications,
%main-nav-horizontal-toggle:checked ~ main, %main-nav-horizontal-toggle:checked ~ main {
%main-nav-horizontal-toggle:checked ~ footer {
margin-left: 0; margin-left: 0;
} }
} }
@ -104,15 +129,16 @@ main {
%main-nav-horizontal-toggle ~ main .notifications { %main-nav-horizontal-toggle ~ main .notifications {
width: 100%; width: 100%;
} }
%main-nav-horizontal-toggle:checked ~ footer,
%main-nav-horizontal-toggle:checked + header > div > nav:first-of-type { %main-nav-horizontal-toggle:checked + header > div > nav:first-of-type {
left: 0; left: 0;
} }
%main-nav-horizontal-toggle ~ footer,
%main-nav-horizontal-toggle + header > div > nav:first-of-type { %main-nav-horizontal-toggle + header > div > nav:first-of-type {
left: calc(var(--chrome-width, 300px) * -1); left: calc(var(--chrome-width, 300px) * -1);
} }
%main-nav-horizontal-toggle ~ main .notifications, %main-nav-horizontal-toggle ~ main .notifications,
%main-nav-horizontal-toggle ~ main, %main-nav-horizontal-toggle ~ main {
%main-nav-horizontal-toggle ~ footer {
margin-left: 0; margin-left: 0;
} }
} }

View File

@ -388,6 +388,9 @@
</:main> </:main>
<:content-info> <:content-info>
<p>
Consul v{{env 'CONSUL_VERSION'}}
</p>
{{{concat '<!-- ' (env 'CONSUL_GIT_SHA') '-->'}}} {{{concat '<!-- ' (env 'CONSUL_GIT_SHA') '-->'}}}
</:content-info> </:content-info>
</App> </App>