waveterm/frontend/app/block/block.less

376 lines
11 KiB
Plaintext
Raw Normal View History

// Copyright 2024, Command Line Inc.
// SPDX-License-Identifier: Apache-2.0
2024-08-31 20:57:45 +02:00
@import "../mixins.less";
.block {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
2024-05-13 23:48:59 +02:00
overflow: hidden;
2024-05-14 00:10:31 +02:00
min-height: 0;
border-radius: var(--block-border-radius);
2024-06-22 00:15:38 +02:00
.block-frame-icon {
margin-right: 0.5em;
}
.block-content {
2024-08-23 09:18:49 +02:00
position: relative;
display: flex;
flex-grow: 1;
width: 100%;
overflow: hidden;
min-height: 0;
padding: 5px;
}
.block-focuselem {
height: 0;
width: 0;
input {
width: 0;
height: 0;
opacity: 0;
pointer-events: none;
}
}
.block-header-animation-wrap {
max-height: 0;
transition:
max-height 0.3s ease-out,
opacity 0.3s ease-out;
overflow: hidden;
position: absolute;
top: 0;
width: 100%;
height: 30px;
z-index: var(--zindex-header-hover);
&.is-showing {
max-height: 30px;
}
}
&.block-preview.block-frame-default .block-frame-default-inner .block-frame-default-header {
background-color: rgba(0, 0, 0, 0.7);
}
2024-07-06 00:47:35 +02:00
&.block-frame-default {
2024-07-09 07:31:38 +02:00
position: relative;
padding: 1px;
2024-07-09 07:31:38 +02:00
.block-frame-default-inner {
background-color: var(--block-bg-color);
2024-07-09 07:31:38 +02:00
width: 100%;
height: 100%;
border-radius: var(--block-border-radius);
2024-07-06 00:47:35 +02:00
display: flex;
2024-07-09 07:31:38 +02:00
flex-direction: column;
.block-frame-default-header {
max-height: var(--header-height);
min-height: var(--header-height);
2024-07-06 00:47:35 +02:00
display: flex;
padding: 4px 5px 4px 10px;
2024-07-06 00:47:35 +02:00
align-items: center;
gap: 8px;
2024-07-09 07:31:38 +02:00
font: var(--header-font);
border-bottom: 1px solid var(--border-color);
border-radius: var(--block-border-radius) var(--block-border-radius) 0 0;
2024-07-06 00:47:35 +02:00
2024-07-09 07:31:38 +02:00
.block-frame-default-header-iconview {
display: flex;
flex-shrink: 3;
min-width: 17px;
2024-07-09 07:31:38 +02:00
align-items: center;
gap: 8px;
overflow-x: hidden;
2024-07-09 07:31:38 +02:00
.block-frame-view-icon {
font-size: var(--header-icon-size);
opacity: 0.5;
width: var(--header-icon-width);
i {
margin-right: 0;
}
2024-07-06 00:47:35 +02:00
}
2024-07-09 07:31:38 +02:00
.block-frame-view-type {
overflow-x: hidden;
text-wrap: nowrap;
text-overflow: ellipsis;
flex-shrink: 1;
min-width: 0;
2024-07-09 07:31:38 +02:00
}
2024-07-06 00:47:35 +02:00
2024-07-09 07:31:38 +02:00
.block-frame-blockid {
opacity: 0.5;
}
2024-07-06 00:47:35 +02:00
}
2024-07-09 07:31:38 +02:00
.block-frame-text {
2024-08-31 20:57:45 +02:00
.ellipsis();
2024-07-09 07:31:38 +02:00
font: var(--fixed-font);
font-size: 11px;
opacity: 0.7;
2024-08-31 20:57:45 +02:00
flex-grow: 1;
&.preview-filename {
direction: rtl;
text-align: left;
2024-08-31 20:57:45 +02:00
span {
cursor: pointer;
&:hover {
background: var(--highlight-bg-color);
}
}
}
}
.iconbutton {
cursor: pointer;
opacity: 0.7;
2024-07-15 18:40:28 +02:00
align-items: center;
&:hover {
opacity: 1;
}
&.disabled {
cursor: default;
opacity: 0.45 !important;
2024-07-15 18:40:28 +02:00
}
}
.connection-button {
display: flex;
align-items: center;
flex-wrap: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
font-weight: 400;
color: var(--main-text-color);
border-radius: 2px;
padding: auto;
&:hover {
background-color: var(--highlight-bg-color);
}
.connection-icon-box {
flex: 1 1 auto;
overflow: hidden;
}
.connection-name {
flex: 1 2 auto;
overflow: hidden;
padding-right: 4px;
}
.connecting-svg {
position: relative;
top: 5px;
left: 9px;
svg {
fill: var(--warning-color);
}
}
}
.block-frame-textelems-wrapper {
display: flex;
flex: 1 2 auto;
min-width: 0;
gap: 8px;
align-items: center;
2024-07-15 18:40:28 +02:00
.block-frame-div {
display: flex;
width: 100%;
height: 100%;
justify-content: space-between;
align-items: center;
.input-wrapper {
flex-grow: 1;
input {
background-color: transparent;
outline: none;
border: none;
color: var(--app-text-color);
width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
box-sizing: border-box;
2024-07-18 08:41:33 +02:00
opacity: 0.7;
font-weight: 500;
2024-07-15 18:40:28 +02:00
}
}
2024-07-18 08:41:33 +02:00
.button {
margin-left: 3px;
}
// webview specific. for refresh button
.iconbutton {
2024-07-15 18:40:28 +02:00
height: 100%;
width: 27px;
display: flex;
align-items: center;
justify-content: center;
}
}
2024-07-18 08:41:33 +02:00
2024-08-23 09:18:49 +02:00
.block-frame-div-url,
.block-frame-div-search {
2024-07-18 08:41:33 +02:00
background: rgba(255, 255, 255, 0.1);
input {
opacity: 1;
}
}
2024-07-15 18:40:28 +02:00
}
2024-07-09 07:31:38 +02:00
.block-frame-end-icons {
2024-07-06 00:47:35 +02:00
display: flex;
flex-shrink: 0;
2024-07-09 07:31:38 +02:00
.iconbutton {
2024-07-09 07:31:38 +02:00
display: flex;
width: 24px;
padding: 4px 6px;
align-items: center;
2024-07-06 00:47:35 +02:00
}
.block-frame-magnify {
justify-content: center;
align-items: center;
padding: 0;
svg {
#arrow1,
#arrow2 {
fill: var(--main-text-color);
}
}
}
2024-07-06 00:47:35 +02:00
}
}
2024-07-09 07:31:38 +02:00
.block-frame-preview {
background-color: rgba(0, 0, 0, 0.7);
width: 100%;
flex-grow: 1;
border-bottom-left-radius: var(--block-border-radius);
border-bottom-right-radius: var(--block-border-radius);
2024-07-31 07:02:52 +02:00
display: flex;
align-items: center;
justify-content: center;
.iconbutton {
2024-07-31 07:02:52 +02:00
opacity: 0.7;
font-size: 45px;
2024-07-31 07:53:50 +02:00
margin: -30px 0 0 0;
2024-07-31 07:02:52 +02:00
}
2024-07-09 07:31:38 +02:00
}
2024-07-06 00:47:35 +02:00
}
.connstatus-overlay {
position: absolute;
top: var(--header-height);
left: 2px;
right: 2px;
background-color: rgba(0, 0, 0, 0.3);
z-index: var(--zindex-block-mask-inner);
display: flex;
align-items: center;
justify-content: flex-start;
flex-direction: column;
overflow: hidden;
.connstatus-mainelem {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 20px;
width: 100%;
background-color: rgba(60, 60, 60, 0.65);
backdrop-filter: blur(3px);
font: var(--base-font);
color: var(--secondary-text-color);
.connstatus-error {
color: var(--error-color);
}
.connstatus-actions {
margin-top: 10px;
display: flex;
gap: 5px;
flex-direction: row;
flex-wrap: wrap;
}
}
}
2024-07-09 07:31:38 +02:00
.block-mask {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
border: 2px solid transparent;
pointer-events: none;
padding: 2px;
border-radius: calc(var(--block-border-radius) + 2px);
z-index: var(--zindex-block-mask-inner);
&.show-block-mask {
user-select: none;
pointer-events: auto;
}
&.show-block-mask .block-mask-inner {
margin-top: var(--header-height); // TODO fix this magic
background-color: rgba(0, 0, 0, 0.5);
height: calc(100% - var(--header-height));
width: 100%;
display: flex;
align-items: center;
justify-content: center;
.bignum {
2024-08-23 09:18:49 +02:00
margin-top: -15%;
font-size: 60px;
font-weight: bold;
opacity: 0.7;
}
}
2024-07-09 07:31:38 +02:00
}
2024-07-09 07:31:38 +02:00
&.block-focused {
.block-mask {
border: 2px solid var(--accent-color);
}
&.block-no-highlight,
&.block-preview {
.block-mask {
border: 2px solid rgba(255, 255, 255, 0.1);
}
}
}
}
}