feat: Enhance BlockEditor with data handling and UI improvements
- Added a type switch for selecting between "design" and "data" modes in BlockEditor. - Implemented DataDetailedDropdown component for improved data selection. - Introduced DeviceIcon and ParametersIcon for better visual representation in dropdowns. - Updated styles for BlockEditor and related components to improve layout and usability. - Refactored background color and opacity handling in BlockEditor. - Removed unnecessary loading page and scene components from MainScene.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
left: 0;
|
||||
pointer-events: none;
|
||||
|
||||
* > {
|
||||
*> {
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 0 0 10px 0;
|
||||
// margin: 0 0 10px 0;
|
||||
border-bottom: 1px solid gray;
|
||||
padding-bottom: 10px;
|
||||
|
||||
@@ -312,12 +312,121 @@
|
||||
}
|
||||
|
||||
&.block-editor-panel {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 11px;
|
||||
min-width: 280px;
|
||||
height: fit-content;
|
||||
|
||||
min-width: 320px;
|
||||
min-height: 70vh;
|
||||
padding: 20px 8px;
|
||||
// h4 {
|
||||
// color: #4caf50;
|
||||
// }
|
||||
|
||||
.type-switch {
|
||||
display: flex;
|
||||
padding: 6px 12px;
|
||||
|
||||
.type {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
padding: 4px 0;
|
||||
border-radius: 19px;
|
||||
cursor: pointer;
|
||||
|
||||
&.active {
|
||||
background: var(--background-color-button);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.data-details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
|
||||
.data-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
padding: 6px 12px;
|
||||
|
||||
.value-field-container {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
|
||||
.label,
|
||||
.input.default {
|
||||
width: auto;
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.data {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 9px;
|
||||
|
||||
.datas_label,
|
||||
.regularDropdown-container {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.data-mapping {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 9px;
|
||||
background: var(--background-color);
|
||||
border: 1px solid var(--border-color);
|
||||
box-shadow: var(--box-shadow-medium);
|
||||
padding: 15px 12px;
|
||||
border-radius: 25px;
|
||||
|
||||
.heading {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.type-switch {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.fields-wrapper {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
|
||||
.datas {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
padding: 6px 12px;
|
||||
|
||||
.datas__label,
|
||||
.datas__class {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.add-field {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
|
||||
svg path {
|
||||
stroke: #CCACFF !important;
|
||||
}
|
||||
|
||||
.label {
|
||||
color: #CCACFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.element-editor-panel {
|
||||
@@ -534,3 +643,133 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// DataDetailedDropdown
|
||||
.data-detailed-dropdown {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
.title,
|
||||
.input-container {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.input-container {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
|
||||
.input-wrapper {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.icon {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.input-wrapper {
|
||||
|
||||
outline: 1px solid var(--input-border-color);
|
||||
outline-offset: -1px;
|
||||
border: none;
|
||||
background: var(--background-color-input);
|
||||
color: var(--input-text-color);
|
||||
|
||||
border-radius: 100px;
|
||||
position: relative;
|
||||
|
||||
.input {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding: 4px 8px;
|
||||
}
|
||||
|
||||
.dropdown-panel {
|
||||
position: absolute;
|
||||
z-index: 1;
|
||||
top: 0;
|
||||
right: 0;
|
||||
transform: translateY(30px);
|
||||
min-width: 200px;
|
||||
padding: 12px;
|
||||
|
||||
outline: 1px solid var(--border-color);
|
||||
outline-offset: -1px;
|
||||
border-radius: 12px;
|
||||
|
||||
background: var(--background-color);
|
||||
backdrop-filter: blur(20px);
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
|
||||
.search {
|
||||
|
||||
outline: 1px solid var(--border-color);
|
||||
outline-offset: -1px;
|
||||
border-radius: 12px;
|
||||
background: var(--background-color);
|
||||
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
padding: 4px 9px;
|
||||
|
||||
.icon {
|
||||
height: 10px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
input {
|
||||
outline: none;
|
||||
border: none;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
padding-left: 3px;
|
||||
}
|
||||
}
|
||||
|
||||
.data-section {
|
||||
.data-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.data-section-count{
|
||||
font-size: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 8px 0;
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
align-items: center;
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
&.active {
|
||||
span {
|
||||
color: #CCACFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user