open-vault/ui/app/styles/core/navbar.scss

295 lines
5.2 KiB
SCSS
Raw Normal View History

/**
* Copyright (c) HashiCorp, Inc.
* SPDX-License-Identifier: MPL-2.0
*/
2018-04-03 14:16:57 +00:00
.navbar {
left: 0;
position: fixed;
right: 0;
top: 0;
@include from($mobile) {
display: block;
}
}
.navbar-status {
height: 40px;
display: flex;
justify-content: center;
align-items: center;
font-size: $size-7;
font-weight: $font-weight-semibold;
&.connected {
background-color: $ui-gray-800;
color: #c2c5cb;
a {
color: #c2c5cb;
}
}
&.warning {
background-color: #fcf6ea;
color: #975b06;
a {
color: #975b06;
}
}
}
.navbar-actions {
background-color: $black;
display: flex;
height: $header-height;
justify-content: flex-start;
padding: $spacing-xs $spacing-s $spacing-xs 0;
2018-04-03 14:16:57 +00:00
}
.navbar-brand {
background: $vault-gray;
border-radius: 0 $radius-large $radius-large 0;
margin-right: $spacing-s;
min-height: auto;
position: relative;
z-index: 203;
2018-04-03 14:16:57 +00:00
.navbar-item {
background-color: transparent;
padding: $spacing-xs $spacing-l;
2018-04-03 14:16:57 +00:00
&:hover,
.is-active {
background-color: transparent;
2018-04-03 14:16:57 +00:00
}
}
}
.navbar-drawer-toggle {
font-size: $size-6;
color: $vault-gray;
cursor: pointer;
font-weight: $font-weight-semibold;
margin-left: -$spacing-s;
padding: $spacing-xs $spacing-xxs;
background: none;
border: none;
.navbar-drawer & {
position: absolute;
top: $spacing-xs;
right: $spacing-xxs;
2018-04-03 14:16:57 +00:00
}
}
.navbar-drawer-overlay {
height: 100vh;
left: 0;
pointer-events: none;
position: fixed;
right: 0;
top: 0;
transition: background-color $speed, opacity $speed;
will-change: background-color, opacity;
z-index: -1;
2018-04-17 01:38:04 +00:00
&.is-active {
background-color: rgba($black, 0.25);
pointer-events: all;
@include from($mobile) {
background-color: transparent;
pointer-events: none;
2018-04-17 01:38:04 +00:00
}
}
2018-04-03 14:16:57 +00:00
}
.navbar-sections,
.navbar-sections li,
.navbar-drawer-scroll,
.navbar-drawer-scroll > * {
@include from($mobile) {
align-items: center;
display: flex;
}
}
2018-04-03 14:16:57 +00:00
.navbar-sections {
a {
color: $grey-light;
display: block;
font-weight: $font-weight-semibold;
line-height: 1.3;
padding: $spacing-xs $spacing-m;
text-decoration: none;
transition: background-color $speed, color $speed;
will-change: background-color, color;
2018-04-03 14:16:57 +00:00
@include from($mobile) {
border-radius: $radius;
display: inline-block;
padding: $spacing-xxs $spacing-s;
}
&.is-active {
background-color: $vault-gray-700;
color: $white;
}
&:hover {
color: $white;
}
}
}
.navbar-end {
margin-left: auto;
}
.navbar-item {
padding: $spacing-xs;
}
.navbar-separator {
background-color: $ui-gray-700;
height: 1px;
margin: $spacing-xs 0;
width: 100%;
@include from($mobile) {
height: $spacing-l;
margin: 0 $spacing-s;
width: 1px;
}
}
.navbar-drawer {
flex: 1 1 auto;
@include until($mobile) {
background-color: $ui-gray-900;
display: flex;
flex-direction: column;
height: 100vh;
left: 0;
padding: 4rem 0 $spacing-m;
position: fixed;
2018-04-03 14:16:57 +00:00
top: 0;
transform: translateX(-100%);
transition: box-shadow $speed, transform $speed-slow;
width: $drawer-width;
will-change: transform, box-shadow;
z-index: 201;
}
&.is-active {
@include until($mobile) {
box-shadow: 5px 0 10px rgba($black, 0.36);
transform: translateX(0);
}
}
.navbar-item .button {
color: $grey-light;
display: flex;
font-size: 1rem;
height: auto;
justify-content: flex-start;
text-align: left;
width: 100%;
@include from($mobile) {
display: inline-flex;
height: $spacing-l;
width: auto;
}
&.popup-open,
&.ember-basic-dropdown-trigger--below {
color: $white;
.is-status-chevron {
transform: rotate(0deg);
@include from($mobile) {
transform: rotate(180deg);
}
}
}
.is-status-chevron {
transform: rotate(270deg);
@include from($mobile) {
transform: rotate(0deg);
}
}
}
.button .icon,
.button .icon:first-child:not(:last-child) {
flex: 0;
margin: 0 $spacing-xs 0 0;
@include from($mobile) {
margin: -$spacing-xxs;
margin-right: 0;
}
}
.status-menu-label {
flex: 1 1 auto;
line-height: 1;
}
.nav-console-button .status-menu-label,
.nav-user-button .status-menu-label {
flex: 1 1 auto;
@include from($mobile) {
display: none;
UI namespaces (#5119) * add namespace sidebar item * depend on ember-inflector directly * list-view and list-item components * fill out components and render empty namespaces page * list namespaces in access * add menu contextual component to list item * popup contextual component * full crud for namespaces * add namespaces service and picker component * split application and vault.cluster templates and controllers, add namespace query param, add namespace-picker to vault.namespace template * remove usage of href-to * remove ember-href-to from deps * add ember-responsive * start styling the picker and link to appropriate namespaces, use ember-responsive to render picker in different places based on the breakpoint * get query param working and save ns to authdata when authenticating, feed through ns in application adapter * move to observer on the controller for setting state on the service * set state in the beforeModel hook and clear the ember data model cache * nav to secrets on change and make error handling more resilient utilizing the method that atlas does to eagerly update URLs * add a list of sys endpoints in a helper * hide header elements if not in the root namespace * debounce namespace input on auth, fix 404 for auth method fetch, move auth method fetch to a task on the auth-form component and refretch on namespace change * fix display of supported engines and exclusion of sys and identity engines * don't fetch replication status if you're in a non-root namespace * hide seal sub-menu if not in the root namespace * don't autocomplete auth form inputs * always send some requests to the root namespace * use methodType and engineType instead of type in case there it is ns_ prefixed * use sys/internal/ui/namespaces to fetch the list in the dropdown * don't use model for namespace picker and always make the request to the token namespace * fix header handling for fetch calls * use namespace-reminder component on creation and edit forms throughout the application * add namespace-reminder to the console * add flat * add deepmerge for creating the tree in the menu * delayed rendering for animation timing * design and code feedback on the first round * white text in the namespace picker * fix namespace picker issues with root keys * separate path-to-tree * add tests for path-to-tree util * hide picker if you're in the root ns and you can't access other namespaces * show error message if you enter invalid characters for namespace path * return a different model if we dont have the namespaces feature and show upgrade page * if a token has a namespace_path, use that as the root user namespace and transition them there on login * use token namespace for user, but use specified namespace to log in * always renew tokens in the token namespace * fix edition-badge test
2018-08-16 17:48:24 +00:00
}
2018-04-03 14:16:57 +00:00
}
}
.nav-user-button .icon {
position: relative;
}
.nav-user-button.may-expire .icon:first-of-type::after {
content: '';
position: absolute;
top: 0;
right: 0;
height: 6px;
width: 6px;
border-radius: 50%;
background: $yellow;
}
.navbar-drawer-scroll {
overflow: auto;
height: 100%;
-webkit-overflow-scrolling: touch;
2018-08-15 19:41:43 +00:00
&::before {
background-image: linear-gradient(to bottom, $ui-gray-900, rgba($ui-gray-900, 0));
content: '';
height: $spacing-xs;
left: 0;
position: absolute;
right: 0;
top: $header-height;
z-index: 1;
2018-08-15 19:41:43 +00:00
@include from($mobile) {
display: none;
2018-08-15 19:41:43 +00:00
}
}
}
2018-08-15 19:41:43 +00:00
.navbar-drawer .ember-basic-dropdown-content {
@include until($mobile) {
position: relative;
2018-08-15 19:41:43 +00:00
}
2018-04-03 14:16:57 +00:00
}