Skip to content

Commit

Permalink
ui: Add version information back into the footer (#11803)
Browse files Browse the repository at this point in the history
  • Loading branch information
johncowen authored and hc-github-team-consul-core committed Dec 13, 2021
1 parent 338d740 commit 03ecc51
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 7 deletions.
3 changes: 3 additions & 0 deletions .changelog/11803.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:feature
ui: Adds visible Consul version information
```
40 changes: 33 additions & 7 deletions ui/packages/consul-ui/app/components/app/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
.app .notifications {
@extend %app-notifications;
}
.app footer {
@extend %footer;
}
%app-notifications {
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -58,15 +61,37 @@
%main-nav-vertical-hoisted.is-active > label > * {
@extend %main-nav-horizontal-action-active;
}
%footer,
%main-nav-sidebar,
%main-notifications,
main {
@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 {
transition-property: left;
z-index: 10;
}
%footer,
%main-nav-sidebar {
transition-property: left;
}
%app-notifications,
main {
margin-top: var(--chrome-height, 64px);
Expand All @@ -83,36 +108,37 @@ main {
%main-nav-horizontal-toggle:checked ~ main .notifications {
width: 100%;
}
%main-nav-horizontal-toggle ~ footer,
%main-nav-horizontal-toggle + header > div > nav:first-of-type {
left: 0;
}
%main-nav-horizontal-toggle:checked ~ footer,
%main-nav-horizontal-toggle:checked + header > div > nav:first-of-type {
left: calc(var(--chrome-width, 300px) * -1);
}
%main-nav-horizontal-toggle ~ main .notifications,
%main-nav-horizontal-toggle ~ main,
%main-nav-horizontal-toggle ~ footer {
%main-nav-horizontal-toggle ~ main {
margin-left: var(--chrome-width, 300px);
}
%main-nav-horizontal-toggle:checked ~ main .notifications,
%main-nav-horizontal-toggle:checked ~ main,
%main-nav-horizontal-toggle:checked ~ footer {
%main-nav-horizontal-toggle:checked ~ main {
margin-left: 0;
}
}
@media #{$--lt-sidebar-open} {
%main-nav-horizontal-toggle ~ main .notifications {
width: 100%;
}
%main-nav-horizontal-toggle:checked ~ footer,
%main-nav-horizontal-toggle:checked + header > div > nav:first-of-type {
left: 0;
}
%main-nav-horizontal-toggle ~ footer,
%main-nav-horizontal-toggle + header > div > nav:first-of-type {
left: calc(var(--chrome-width, 300px) * -1);
}
%main-nav-horizontal-toggle ~ main .notifications,
%main-nav-horizontal-toggle ~ main,
%main-nav-horizontal-toggle ~ footer {
%main-nav-horizontal-toggle ~ main {
margin-left: 0;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,9 @@
</:main>

<:content-info>
<p>
Consul v{{env 'CONSUL_VERSION'}}
</p>
{{{concat '<!-- ' (env 'CONSUL_GIT_SHA') '-->'}}}
</:content-info>
</App>
Expand Down

0 comments on commit 03ecc51

Please sign in to comment.