refactor(editor): 优化布局管理和行为树文件处理
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100%;
|
||||
background: #1e1e1e;
|
||||
border-top: 1px solid #333;
|
||||
background: var(--color-bg-base);
|
||||
border-top: 1px solid var(--color-border-default);
|
||||
container-type: inline-size;
|
||||
container-name: asset-browser;
|
||||
}
|
||||
|
||||
.asset-browser-header {
|
||||
@@ -21,31 +23,57 @@
|
||||
|
||||
.view-mode-buttons {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
gap: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.view-mode-btn {
|
||||
padding: 4px 8px;
|
||||
padding: 6px 12px;
|
||||
background: transparent;
|
||||
border: 1px solid #3e3e3e;
|
||||
border-radius: 3px;
|
||||
color: #cccccc;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: normal;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.view-mode-btn:hover {
|
||||
.view-mode-btn:first-child {
|
||||
border-top-left-radius: 3px;
|
||||
border-bottom-left-radius: 3px;
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.view-mode-btn:last-child {
|
||||
border-top-right-radius: 3px;
|
||||
border-bottom-right-radius: 3px;
|
||||
}
|
||||
|
||||
.view-mode-btn:hover:not(.active) {
|
||||
background: #2a2d2e;
|
||||
border-color: #007acc;
|
||||
}
|
||||
|
||||
.view-mode-btn.active {
|
||||
background: #0e639c;
|
||||
border-color: #0e639c;
|
||||
color: #ffffff;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
/* 响应式:小宽度时只显示图标 - 使用容器查询 */
|
||||
@container asset-browser (max-width: 400px) {
|
||||
.view-mode-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.view-mode-btn {
|
||||
padding: 6px 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.asset-browser-content {
|
||||
@@ -154,14 +182,14 @@
|
||||
}
|
||||
|
||||
/* 容器查询:根据容器宽度调整布局 */
|
||||
@container (max-width: 400px) {
|
||||
@container asset-list-container (max-width: 400px) {
|
||||
.asset-list {
|
||||
grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
|
||||
gap: 6px;
|
||||
}
|
||||
}
|
||||
|
||||
@container (max-width: 250px) {
|
||||
@container asset-list-container (max-width: 250px) {
|
||||
.asset-list {
|
||||
grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
|
||||
gap: 4px;
|
||||
@@ -169,7 +197,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@container (max-width: 150px) {
|
||||
@container asset-list-container (max-width: 150px) {
|
||||
.asset-list {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 2px;
|
||||
@@ -199,7 +227,7 @@
|
||||
}
|
||||
|
||||
/* 中等窄度优化 */
|
||||
@container (max-width: 250px) {
|
||||
@container asset-list-container (max-width: 250px) {
|
||||
.asset-item {
|
||||
padding: 8px 6px;
|
||||
}
|
||||
@@ -253,6 +281,21 @@
|
||||
color: #dcb67a;
|
||||
}
|
||||
|
||||
/* 系统文件夹特殊标记 */
|
||||
.asset-icon.system-folder {
|
||||
filter: drop-shadow(0 0 3px rgba(66, 165, 245, 0.5));
|
||||
animation: subtle-pulse 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes subtle-pulse {
|
||||
0%, 100% {
|
||||
filter: drop-shadow(0 0 3px rgba(66, 165, 245, 0.5));
|
||||
}
|
||||
50% {
|
||||
filter: drop-shadow(0 0 6px rgba(66, 165, 245, 0.7));
|
||||
}
|
||||
}
|
||||
|
||||
.asset-info {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
|
||||
@@ -34,14 +34,14 @@
|
||||
|
||||
.inspector-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
overflow: auto;
|
||||
padding: var(--spacing-md);
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.inspector-content::-webkit-scrollbar {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.inspector-content::-webkit-scrollbar-track {
|
||||
@@ -60,6 +60,10 @@
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.inspector-content::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.inspector-section {
|
||||
margin-bottom: 20px;
|
||||
padding: 12px;
|
||||
|
||||
@@ -97,6 +97,21 @@
|
||||
font-size: var(--font-size-md);
|
||||
}
|
||||
|
||||
/* 系统文件夹特殊标记 */
|
||||
.tree-icon .system-folder-icon {
|
||||
filter: drop-shadow(0 0 2px rgba(66, 165, 245, 0.5));
|
||||
animation: subtle-pulse-tree 3s ease-in-out infinite;
|
||||
}
|
||||
|
||||
@keyframes subtle-pulse-tree {
|
||||
0%, 100% {
|
||||
filter: drop-shadow(0 0 2px rgba(66, 165, 245, 0.5));
|
||||
}
|
||||
50% {
|
||||
filter: drop-shadow(0 0 4px rgba(66, 165, 245, 0.7));
|
||||
}
|
||||
}
|
||||
|
||||
.tree-label {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
|
||||
@@ -111,14 +111,24 @@
|
||||
|
||||
.flexlayout__tab_button_trailing {
|
||||
margin-left: 8px;
|
||||
opacity: 0;
|
||||
opacity: 0.6;
|
||||
transition: opacity 0.15s ease;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 2px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.flexlayout__tab_button:hover .flexlayout__tab_button_trailing,
|
||||
.flexlayout__tab:hover .flexlayout__tab_button_trailing {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.flexlayout__tab_button_trailing:hover {
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
}
|
||||
|
||||
.flexlayout__tab_button_trailing svg {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
@@ -133,6 +143,32 @@
|
||||
background: #2d2d30;
|
||||
}
|
||||
|
||||
/* 标签栏滚动条样式 */
|
||||
.flexlayout__tab_moveable::-webkit-scrollbar {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.flexlayout__tab_moveable::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.flexlayout__tab_moveable::-webkit-scrollbar-thumb {
|
||||
background: rgba(121, 121, 121, 0.4);
|
||||
border-radius: 8px;
|
||||
border: 3px solid transparent;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.flexlayout__tab_moveable::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(100, 100, 100, 0.7);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.flexlayout__tab_moveable::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.flexlayout__tabset-selected {
|
||||
background: #1e1e1e;
|
||||
}
|
||||
@@ -187,10 +223,12 @@
|
||||
}
|
||||
|
||||
.flexlayout__tab_toolbar {
|
||||
display: flex;
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 0 8px;
|
||||
visibility: visible !important;
|
||||
opacity: 1 !important;
|
||||
}
|
||||
|
||||
.flexlayout__tab_toolbar_button {
|
||||
@@ -198,9 +236,14 @@
|
||||
border: none;
|
||||
color: #cccccc;
|
||||
cursor: pointer;
|
||||
padding: 4px 8px;
|
||||
padding: 4px;
|
||||
border-radius: 3px;
|
||||
transition: background-color 0.15s ease;
|
||||
display: flex !important;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.flexlayout__tab_toolbar_button:hover {
|
||||
@@ -213,6 +256,13 @@
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
/* 确保最小化和最大化按钮可见 */
|
||||
.flexlayout__tab_toolbar_button-min,
|
||||
.flexlayout__tab_toolbar_button-max {
|
||||
display: flex !important;
|
||||
visibility: visible !important;
|
||||
}
|
||||
|
||||
.flexlayout__popup_menu {
|
||||
background: #252526;
|
||||
border: 1px solid #454545;
|
||||
|
||||
@@ -150,10 +150,35 @@
|
||||
|
||||
.hierarchy-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow: auto;
|
||||
padding: var(--spacing-xs) 0;
|
||||
}
|
||||
|
||||
.hierarchy-content::-webkit-scrollbar {
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
.hierarchy-content::-webkit-scrollbar-track {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.hierarchy-content::-webkit-scrollbar-thumb {
|
||||
background: rgba(121, 121, 121, 0.4);
|
||||
border-radius: 8px;
|
||||
border: 3px solid transparent;
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.hierarchy-content::-webkit-scrollbar-thumb:hover {
|
||||
background: rgba(100, 100, 100, 0.7);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
.hierarchy-content::-webkit-scrollbar-corner {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
Reference in New Issue
Block a user