keeweb/app/styles/areas/_open.scss

406 lines
9.8 KiB
SCSS
Raw Normal View History

2015-10-17 23:49:24 +02:00
.open {
2019-08-16 23:05:39 +02:00
flex: 1;
2017-04-16 18:37:16 +02:00
display: flex;
2019-08-16 23:05:39 +02:00
align-self: stretch;
align-items: center;
flex-direction: column;
2017-04-16 18:37:16 +02:00
justify-content: center;
background: var(--background-color);
2015-11-05 21:58:33 +01:00
.mobile & {
overflow-y: auto;
}
2019-08-16 23:05:39 +02:00
&__icons {
display: flex;
align-items: stretch;
flex-direction: row;
flex-shrink: 0;
justify-content: center;
flex-wrap: wrap;
.open--drag & {
display: none;
}
2015-10-17 23:49:24 +02:00
}
2019-08-16 23:05:39 +02:00
&__icon {
text-align: center;
2015-11-06 22:11:36 +01:00
cursor: pointer;
2019-08-16 23:05:39 +02:00
margin: 20px;
transition: color $base-duration $base-timing;
2015-11-06 22:11:36 +01:00
&:hover {
color: var(--medium-color);
2019-08-16 23:05:39 +02:00
}
&:focus {
.open--show-focus & {
outline: focused-outline();
2019-08-16 23:05:39 +02:00
}
}
2020-11-25 18:20:53 +01:00
&-i {
2019-08-16 23:05:39 +02:00
font-size: 4em;
}
&-text {
color: var(--muted-color);
2019-08-16 23:05:39 +02:00
.open__icon:hover > & {
color: var(--medium-color);
2019-08-16 23:05:39 +02:00
}
}
@include mobile() {
2020-11-25 18:20:53 +01:00
&-i {
2019-08-16 23:05:39 +02:00
font-size: 4.6em;
}
&-text {
font-size: 1.1em;
}
.open__icons--lower & {
margin: 14px;
2020-11-25 18:20:53 +01:00
&-i {
2019-08-16 23:05:39 +02:00
font-size: 4.2em;
margin-bottom: 0.1em;
}
}
2015-11-06 22:11:36 +01:00
}
2015-11-06 21:14:47 +01:00
}
2015-11-05 21:58:33 +01:00
2019-08-16 23:05:39 +02:00
&__pass {
&-area {
display: flex;
align-items: stretch;
flex-direction: column;
justify-content: flex-start;
position: relative;
.open--drag & {
display: none;
}
}
&-warn-wrap {
display: flex;
flex-direction: row;
justify-content: flex-end;
}
&-field-wrap {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: stretch;
flex-shrink: 0;
margin-bottom: $base-padding-v;
}
&-enter-btn,
&-opening-icon {
padding: 0.6em $base-spacing;
position: absolute;
left: 100%;
@include mobile {
left: auto;
right: 0;
2019-08-16 23:05:39 +02:00
}
color: var(--muted-color);
2020-11-25 18:20:53 +01:00
line-height: 3em;
height: 3em;
2019-08-16 23:05:39 +02:00
> i {
font-size: 3em;
@include mobile {
2020-05-23 19:07:45 +02:00
line-height: 0.8;
}
2019-08-16 23:05:39 +02:00
}
}
.open--show-focus & {
&-enter-btn:focus,
&-opening-icon:focus {
outline: focused-outline();
2019-08-16 23:05:39 +02:00
}
}
&-enter-btn {
.open--file & {
cursor: pointer;
&:hover {
color: var(--medium-color);
2019-08-16 23:05:39 +02:00
}
}
.open--opening & {
display: none;
}
}
&-opening-icon {
display: none;
.open--opening & {
display: block;
}
}
2016-03-12 12:22:35 +01:00
}
2019-08-16 23:05:39 +02:00
&__config {
display: flex;
align-items: stretch;
flex-direction: column;
justify-content: flex-start;
position: relative;
@include nomobile {
width: 30em;
}
2019-08-16 23:05:39 +02:00
.open--drag & {
display: none;
}
&-buttons {
align-self: flex-end;
}
&-header {
> i {
margin-right: 0.3em;
}
}
&-field {
width: 100%;
}
&-error {
min-height: 1.7em;
}
&:not(.open__config--disabled) {
.open__config-btn-ok-text {
display: inline;
}
.open__config-btn-ok-spinner {
display: none;
}
}
&.open__config--disabled {
.open__config-btn-ok-text {
display: none;
}
.open__config-btn-ok-spinner {
display: block;
}
}
2015-11-06 22:11:36 +01:00
}
2015-11-05 21:58:33 +01:00
2019-08-16 23:05:39 +02:00
input[type='password'].open__pass-input {
font-size: $large-pass-font-size;
margin-bottom: 0;
2020-05-23 19:07:45 +02:00
&[readonly] {
cursor: pointer;
}
2020-03-21 17:38:34 +01:00
width: 38vw;
2020-05-23 19:07:45 +02:00
@media (max-width: 1000px) {
width: 16em;
}
@include mobile {
width: calc(100vw - 20px);
}
2015-10-17 23:49:24 +02:00
}
2015-11-06 21:14:47 +01:00
2019-08-16 23:05:39 +02:00
&__settings {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: stretch;
padding-left: $base-padding-h;
height: 2em;
&-key-file {
.open--file:not(.open--opening) & {
cursor: pointer;
}
.open--key-file & {
color: var(--medium-color);
2019-08-16 23:05:39 +02:00
}
&-icon {
width: 2em;
}
&-dropbox {
visibility: hidden;
margin-left: 0.3em;
&:hover {
.open--file & {
visibility: visible;
}
}
}
&-dropbox {
.open--key-file,
.open--opening & {
display: none;
}
}
&:hover .open__settings-key-file-dropbox {
.open--file & {
visibility: visible;
}
}
&:focus {
.open--show-focus & {
outline: focused-outline();
2019-08-16 23:05:39 +02:00
}
}
}
2015-11-06 21:14:47 +01:00
2019-08-16 23:05:39 +02:00
&-key-file,
&-key-file-dropbox {
color: var(--muted-color);
2019-08-16 23:05:39 +02:00
&:hover {
.open--file:not(.open--opening) & {
color: var(--medium-color);
2019-08-16 23:05:39 +02:00
}
}
2015-11-07 20:02:45 +01:00
}
&-yubikey {
2020-05-23 19:07:45 +02:00
display: none;
2020-05-30 10:29:02 +02:00
&--present,
&--active {
2020-05-24 20:31:03 +02:00
display: flex;
}
&__text {
margin-right: 0.4em;
display: none;
.open__settings-yubikey--active & {
display: block;
}
2020-05-23 19:07:45 +02:00
}
&-img {
fill: var(--muted-color);
width: 2em;
position: relative;
2020-05-24 20:31:03 +02:00
top: -0.25em;
margin-right: $base-padding-h;
cursor: pointer;
&:hover {
fill: var(--text-color);
}
2020-05-24 20:31:03 +02:00
.open__settings-yubikey--active & {
fill: var(--text-color);
}
}
}
2015-11-05 21:58:33 +01:00
}
2015-10-17 23:49:24 +02:00
2019-08-16 23:05:39 +02:00
&__last {
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
margin-top: $base-spacing;
&-item {
display: flex;
flex-direction: row;
justify-content: flex-start;
align-items: baseline;
flex-shrink: 0;
.open:not(.open--opening) & {
@include area-selectable;
}
color: var(--muted-color);
2019-08-16 23:05:39 +02:00
padding: $base-padding;
&:focus {
.open--show-focus & {
outline: focused-outline();
2019-08-16 23:05:39 +02:00
}
}
&-icon {
width: 2em;
2020-11-25 18:20:53 +01:00
position: relative;
top: 0.1em;
2019-08-16 23:05:39 +02:00
}
&-text {
flex-grow: 1;
}
&-icon-del {
opacity: 0;
.open__last-item:hover & {
opacity: 0.3;
cursor: pointer;
}
color: var(--muted-color);
2019-08-16 23:05:39 +02:00
&:hover {
.open__last-item:hover & {
opacity: 1;
}
color: var(--medium-color);
2019-08-16 23:05:39 +02:00
}
}
}
2015-10-17 23:49:24 +02:00
}
2019-08-16 23:05:39 +02:00
&__dropzone {
display: none;
.open--drag & {
display: flex;
flex-direction: column;
flex: 1 0 auto;
justify-content: center;
align-self: center;
align-items: center;
text-align: center;
}
&-icon {
font-size: 10em;
}
&-header {
margin-top: 1em;
}
2015-10-17 23:49:24 +02:00
}
}
2017-11-26 17:26:58 +01:00
.open-list {
2019-08-16 23:05:39 +02:00
&__content {
margin: $base-padding-v 0 $base-padding-v (-$base-padding-h);
max-height: calc(100vh - 22em);
position: relative;
overflow: hidden;
2017-11-26 17:26:58 +01:00
}
2019-08-16 23:05:39 +02:00
&__scrollable {
max-height: calc(100vh - 22em);
width: calc(100% + 50px);
overflow-y: auto;
overflow-x: hidden;
2017-11-26 17:26:58 +01:00
}
2019-08-16 23:05:39 +02:00
&__files {
display: flex;
flex-wrap: wrap;
width: calc(100% - 50px);
}
&__file {
cursor: pointer;
padding: $base-padding;
border-radius: $base-border-radius;
box-sizing: border-box;
flex-basis: 100%;
@include nomobile {
.open-list--density2 & {
flex-basis: 50%;
}
.open-list--density3 & {
flex-basis: 33.33333%;
}
}
&:hover {
background-color: var(--action-background-color-focus-tr);
2019-08-16 23:05:39 +02:00
}
&-icon {
margin-right: 0.3em;
}
&--another {
color: var(--medium-color);
2019-08-16 23:05:39 +02:00
}
2017-11-26 17:26:58 +01:00
}
2019-08-16 23:05:39 +02:00
&__check-label {
width: 100%;
display: inline-block;
2017-11-26 17:26:58 +01:00
}
}
2020-05-24 20:02:49 +02:00
.open-chal-resp {
&__head {
padding: $base-padding;
}
&__icon {
margin-right: $small-spacing;
}
&__item {
padding: $base-padding;
cursor: pointer;
&:hover {
background-color: var(--action-background-color-focus-tr);
}
}
}