Skip to content

Commit

Permalink
RavenDB-19951 2FA button styles
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbartosik committed Dec 12, 2023
1 parent e58b426 commit 6cbc9ce
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ <h3 class="no-margin" data-bind="text: Name || '<empty name>'"></h3>
<div title="This is the client certificate currently used by the browser" class="label label-success"
data-bind="visible: _.includes(Thumbprints, $root.clientCertificateThumbprint())">current browser certificate
</div>
<div title="This is the certificate which requires two-factor authentication" class="label label-success"
<div title="This is the certificate which requires two-factor authentication" class="label label-2fa"
data-bind="visible: HasTwoFactor"> 2FA
</div>
</a>
Expand Down
4 changes: 2 additions & 2 deletions src/Raven.Studio/wwwroot/App/views/shell.html
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ <h3 data-bind="text: item.title"></h3>
</button>
</div>
<div class="footer-item" data-bind="visible: twoFactorSessionExpiration">
<a class="btn btn-warning btn-sm" title="Log out" data-bind="click: logout">
Log out
<a class="btn btn-2fa btn-sm lh-1" title="End current 2FA session" data-bind="click: logout">
<i class="icon-logout"></i> <span class="me-0">End session</span>
</a>
</div>
<div class="footer-item bg-info" data-bind="visible: $root.clusterManager.votingInProgress">
Expand Down
4 changes: 2 additions & 2 deletions src/Raven.Studio/wwwroot/Content/css/basic-layout.less
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ body {
align-items: center;

i {
font-size: 22px !important;
top: -1px !important;
font-size: 18px !important;
top: 0 !important;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@
@btn-danger-border: lighten(@btn-danger-bg, 1%);
@btn-danger-icon: @brand-danger-light;

@btn-2fa-color: lighten(@btn-2fa-bg, 30%);
@btn-2fa-bg: #5537c4;
@btn-2fa-border: lighten(@btn-2fa-bg, 1%);
@btn-2fa-icon: @btn-2fa-color;

@btn-link-disabled-color: @gray-light;
// Allows for customizing button radius independently from global border radius
@btn-border-radius-base: @border-radius-base;
Expand Down
4 changes: 4 additions & 0 deletions src/Raven.Studio/wwwroot/Content/css/fonts/icomoon/logout.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
29 changes: 29 additions & 0 deletions src/Raven.Studio/wwwroot/Content/css/styles-common.less
Original file line number Diff line number Diff line change
Expand Up @@ -2195,6 +2195,35 @@ ul.properties {
gap: 0.5rem;
}

.lh-1 {
line-height: 1;
}

.btn-2fa {
background-color: @btn-2fa-bg;
border-color: @btn-2fa-border;
color: @btn-2fa-color !important;
i {
color: @btn-2fa-icon;
}
&:hover {
filter: brightness(1.2) saturate(1.1);
}
&:focus, &:active {
background-color: @btn-2fa-bg;
filter: brightness(1.2) saturate(1.1);
}
}

.label-2fa {
background-color: @btn-2fa-bg;
color: @btn-2fa-color !important;
}

.me-0 {
margin-right: 0 !important;
}

@import "prism.less";
@import "ace.less";
@import "leaflet.less";
Expand Down

0 comments on commit 6cbc9ce

Please sign in to comment.