bitwarden-desktop/src/scss/vault.scss

431 lines
9.4 KiB
SCSS
Raw Normal View History

2018-01-27 19:12:06 +01:00
@import "variables.scss";
[Account Switching] [Feature] Add the ability to maintain state for up to 5 accounts at once (#1079) * [refactor] Remove references to deprecated services * [feature] Implement account switching * [bug] Fix state handling for authentication dependent system menu items * [bug] Enable the account switcher to fucntion properly when switching to a locked accounts * [feature] Enable locking any account from the menu * [bug] Ensure the avatar instance used in the account switcher updates on account change * [style] Fix lint complaints * [bug] Ensure the logout command callback can handle any user in state * [style] Fix lint complaints * rollup * [style] Fix lint complaints * [bug] Don't clean up state until everything else is done on logout * [bug] Navigate to vault on a succesful account switch * [bug] Init the state service on start * [feature] Limit account switching to 5 account maximum * [bug] Resolve app lock state with 5 logged out accounts * [chore] Update account refrences to match recent jslib restructuring * [bug] Add missing awaits * [bug] Update app menu on logout * [bug] Hide the switcher if there are no authed accounts * [bug] Move authenticationStatus display information out of jslib * [bug] Remove unused active style from scss * [refactor] Rewrite the menu bar * [style] Fix lint complaints * [bug] Clean state of loggout out user after redirect * [bug] Redirect on logout if not explicity provided a userId that isn't active * [bug] Relocated several settings items to persistant storage * [bug] Correct account switcher styles on all themes * [chore] Include state migration service in services * [bug] Swap to next account on logout * [bug] Correct DI service * [bug] fix loginGuard deps in services.module * [chore] update jslib * [bug] Remove badly merged scss * [chore] update jslib * [review] Code review cleanup * [review] Code review cleanup Co-authored-by: Hinton <oscar@oscarhinton.com>
2021-12-15 23:32:00 +01:00
app-root {
display: flex;
flex-flow: column;
height: 100%;
}
#container {
height: 100%;
min-height: 0;
}
2021-02-03 22:24:49 +01:00
.vault {
2018-01-31 22:51:59 +01:00
height: 100%;
2018-01-27 19:12:06 +01:00
display: flex;
2021-02-03 22:24:49 +01:00
> .groupings, > .items, > .details, > .logo {
2018-02-01 03:04:04 +01:00
display: flex;
flex-direction: column;
.inner-content {
padding: 10px 15px;
}
}
2021-02-03 22:24:49 +01:00
> .groupings {
width: 22%;
2018-01-27 19:12:06 +01:00
min-width: 175px;
max-width: 250px;
2018-05-30 21:21:41 +02:00
border-right: 1px solid #000000;
2018-01-27 19:12:06 +01:00
2018-05-30 15:28:19 +02:00
@include themify($themes) {
background-color: themed('backgroundColorAlt');
2018-06-01 22:58:24 +02:00
border-right-color: themed('borderColor');
2018-05-30 15:28:19 +02:00
}
2021-02-05 18:34:01 +01:00
.content {
2021-02-03 22:24:49 +01:00
display: flex;
flex-direction: column;
flex-grow: 1;
justify-content: space-between;
2018-10-26 05:04:14 +02:00
2021-02-05 18:34:01 +01:00
.footer {
padding: 0;
}
.inner-content {
padding-bottom: 0;
padding-right: 5px;
user-select: none;
> ul, > div > ul {
margin: 0 0 15px 0;
}
2018-10-26 05:04:14 +02:00
}
2018-01-31 23:58:06 +01:00
}
2018-01-27 19:12:06 +01:00
h2 {
2018-01-27 20:43:29 +01:00
text-transform: uppercase;
2018-01-27 19:12:06 +01:00
font-size: $font-size-base;
2018-01-27 20:43:29 +01:00
font-weight: normal;
2018-01-27 19:12:06 +01:00
margin-bottom: 5px;
2018-01-27 20:43:29 +01:00
2018-05-30 21:21:41 +02:00
@include themify($themes) {
color: themed('headingColor');
}
}
.heading {
display: flex;
2018-05-30 21:21:41 +02:00
2018-01-27 20:43:29 +01:00
button {
margin-left: auto;
background: none;
border: none;
2018-05-30 21:21:41 +02:00
@include themify($themes) {
color: themed('headingButtonColor');
}
2018-01-27 20:43:29 +01:00
&:hover, &:focus {
cursor: pointer;
2018-05-30 21:21:41 +02:00
@include themify($themes) {
color: themed('headingButtonHoverColor');
}
2018-01-27 20:43:29 +01:00
}
}
2018-01-27 19:12:06 +01:00
}
ul:not(.fa-ul) {
li {
margin: 0;
padding: 0;
list-style: none;
}
}
ul.fa-ul {
li {
2018-09-12 19:18:22 +02:00
word-break: break-all;
2018-01-27 19:12:06 +01:00
.fa-li {
top: 8px;
2018-11-10 05:03:43 +01:00
width: 1.1em;
2018-01-27 19:12:06 +01:00
}
2018-10-26 05:04:14 +02:00
}
}
2018-01-27 19:12:06 +01:00
2018-10-26 05:04:14 +02:00
// Nested indentions
ul.fa-ul {
// Level 1
li {
> a {
2018-01-27 19:12:06 +01:00
padding-left: 12px;
}
2018-10-26 05:04:14 +02:00
.fa-li {
2018-11-10 05:03:43 +01:00
left: -4px;
2018-10-26 05:04:14 +02:00
}
&.active > a .fa-li {
2018-11-10 05:03:43 +01:00
left: 11px;
2018-01-27 19:12:06 +01:00
}
}
2018-10-26 05:04:14 +02:00
// Level 2
ul li {
> a {
padding-left: 23px;
}
.fa-li {
2018-11-10 05:03:43 +01:00
left: 7px;
2018-10-26 05:04:14 +02:00
}
&.active > a .fa-li {
2018-11-10 05:03:43 +01:00
left: 22px;
2018-10-26 05:04:14 +02:00
}
}
// Level 3
ul ul li {
> a {
padding-left: 34px;
}
.fa-li {
2018-11-10 05:03:43 +01:00
left: 18px;
2018-10-26 05:04:14 +02:00
}
&.active > a .fa-li {
2018-11-10 05:03:43 +01:00
left: 33px;
2018-10-26 05:04:14 +02:00
}
}
// Level 4
ul ul ul li {
> a {
padding-left: 45px;
}
.fa-li {
2018-11-10 05:03:43 +01:00
left: 29px;
2018-10-26 05:04:14 +02:00
}
&.active > a .fa-li {
2018-11-10 05:03:43 +01:00
left: 44px;
2018-10-26 05:04:14 +02:00
}
}
// Level 5
ul ul ul ul li {
> a {
padding-left: 56px;
}
.fa-li {
2018-11-10 05:03:43 +01:00
left: 40px;
2018-10-26 05:04:14 +02:00
}
&.active > a .fa-li {
2018-11-10 05:03:43 +01:00
left: 55px;
2018-10-26 05:04:14 +02:00
}
}
// Level 6
ul ul ul ul ul li {
> a {
padding-left: 67px;
}
.fa-li {
2018-11-10 05:03:43 +01:00
left: 51px;
2018-10-26 05:04:14 +02:00
}
&.active > a .fa-li {
2018-11-10 05:03:43 +01:00
left: 66px;
2018-10-26 05:04:14 +02:00
}
}
// Level 7
ul ul ul ul ul ul li {
> a {
padding-left: 78px;
}
.fa-li {
2018-11-10 05:03:43 +01:00
left: 62px;
2018-10-26 05:04:14 +02:00
}
&.active > a .fa-li {
2018-11-10 05:03:43 +01:00
left: 77px;
2018-10-26 05:04:14 +02:00
}
}
2018-01-27 19:12:06 +01:00
}
ul {
padding: 0;
2018-10-26 05:04:14 +02:00
margin: 0;
2018-01-27 19:12:06 +01:00
li {
a {
padding: 5px 0;
2018-01-27 20:43:29 +01:00
display: flex;
align-items: center;
2018-05-30 21:21:41 +02:00
@include themify($themes) {
color: themed('textColor');
}
2018-01-27 20:43:29 +01:00
span {
visibility: hidden;
margin-left: auto;
2018-05-30 21:21:41 +02:00
@include themify($themes) {
color: themed('headingButtonColor');
}
&:hover, &:focus {
@include themify($themes) {
color: themed('headingButtonHoverColor');
}
2018-01-27 20:43:29 +01:00
}
}
&:hover, &:focus {
span {
visibility: visible;
}
}
2018-01-27 19:12:06 +01:00
}
&.active {
margin-left: -15px;
2018-02-01 03:04:04 +01:00
margin-right: -5px;
2018-01-27 19:12:06 +01:00
padding-left: 15px;
2018-02-01 03:04:04 +01:00
padding-right: 5px;
2018-05-30 21:21:41 +02:00
@include themify($themes) {
background-color: themed('groupingsActiveColor');
}
2018-10-26 05:04:14 +02:00
ul {
@include themify($themes) {
background-color: themed('backgroundColorAlt');
}
margin-left: -15px;
margin-right: -5px;
padding-left: 15px;
padding-right: 5px;
}
2018-01-27 19:12:06 +01:00
}
}
}
}
2021-02-03 22:24:49 +01:00
> .items {
width: 28%;
2018-01-27 19:12:06 +01:00
min-width: 200px;
max-width: 350px;
2018-05-30 21:21:41 +02:00
border-right: 1px solid #000000;
2018-05-30 15:28:19 +02:00
@include themify($themes) {
background-color: themed('backgroundColor');
2018-06-01 22:58:24 +02:00
border-right-color: themed('borderColor');
2018-05-30 15:28:19 +02:00
}
2018-01-31 23:58:06 +01:00
.no-items {
display: flex;
height: 100%;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding: 0 10px;
2018-02-01 02:42:56 +01:00
.fa {
margin-bottom: 10px;
2018-05-30 21:21:41 +02:00
@include themify($themes) {
color: themed('disabledIconColor');
}
2018-02-01 02:42:56 +01:00
}
2018-01-31 23:58:06 +01:00
}
2018-01-27 19:12:06 +01:00
}
2021-02-03 22:24:49 +01:00
> .details {
2018-01-27 19:12:06 +01:00
flex: 1;
min-width: 0;
2018-05-30 21:21:41 +02:00
2018-05-30 15:28:19 +02:00
@include themify($themes) {
background-color: themed('backgroundColorAlt2');
}
.inner-content {
min-width: 400px;
}
2018-01-29 22:13:37 +01:00
.box {
max-width: 550px;
margin: 30px auto 0 auto;
&:first-child {
margin-top: 10px;
}
&:last-child {
margin-bottom: 30px;
}
}
2018-01-31 18:52:12 +01:00
> form {
display: flex;
flex-direction: column;
2018-02-10 21:38:08 +01:00
height: 100%;
2018-01-31 18:52:12 +01:00
}
2018-01-27 19:12:06 +01:00
}
2021-02-03 22:24:49 +01:00
> .logo {
flex: 1;
min-width: 0;
.content {
overflow-y: hidden;
overflow-x: auto;
}
.inner-content {
min-width: 320px;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
img {
2018-05-31 04:28:04 +02:00
width: 284px;
opacity: 0.3;
transition: all 1s ease-in-out;
&:hover {
opacity: 1;
}
}
}
2018-01-27 19:12:06 +01:00
.content {
flex: 1 1 auto;
position: relative;
overflow: auto;
2018-01-31 23:58:06 +01:00
height: 100%;
2018-01-27 19:12:06 +01:00
}
.footer {
2021-02-05 18:34:01 +01:00
height: 55px;
2018-01-27 19:12:06 +01:00
flex: 0 0 auto;
2018-05-30 21:21:41 +02:00
border-top: 1px solid #000000;
2018-01-27 19:12:06 +01:00
display: flex;
align-items: center;
padding: 0 15px;
2018-05-30 21:21:41 +02:00
@include themify($themes) {
background-color: themed('backgroundColorAlt');
2018-06-01 22:58:24 +02:00
border-top-color: themed('borderColor');
2018-05-30 21:21:41 +02:00
}
2018-01-27 19:12:06 +01:00
button {
margin-right: 10px;
&:last-child {
margin-right: 0;
}
}
2018-01-29 22:13:37 +01:00
.right {
margin-left: auto;
display: flex;
}
2018-01-27 19:12:06 +01:00
}
2021-02-05 18:34:01 +01:00
.nav {
height: 100%;
width: 100%;
display: flex;
.btn {
width: 100%;
font-size: $font-size-base * 0.8;
flex: 1;
border: 0;
border-radius: 0;
padding-bottom: 4px;
&:not(.active) {
@include themify($themes) {
background-color: themed('backgroundColorAlt');
}
}
i {
font-size: $font-size-base * 1.5;
display: block;
margin-bottom: 2px;
text-align: center;
}
}
}
2018-01-27 19:12:06 +01:00
}