支持树形资源管理器

This commit is contained in:
YHH
2025-10-15 10:08:15 +08:00
parent 00fc6dfd67
commit b69b81f63a
4 changed files with 475 additions and 95 deletions

View File

@@ -13,24 +13,87 @@
}
.asset-browser-header h3 {
margin: 0 0 8px 0;
margin: 0;
font-size: 14px;
font-weight: 600;
color: #cccccc;
}
.asset-path {
font-size: 11px;
color: #858585;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
.view-mode-buttons {
display: flex;
gap: 4px;
}
.view-mode-btn {
padding: 4px 8px;
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;
}
.view-mode-btn:hover {
background: #2a2d2e;
border-color: #007acc;
}
.view-mode-btn.active {
background: #0e639c;
border-color: #0e639c;
color: #ffffff;
}
.asset-browser-content {
flex: 1;
overflow-y: auto;
padding: 10px;
overflow: hidden;
display: flex;
flex-direction: column;
}
.asset-browser-tree,
.asset-browser-tree-only {
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
}
.asset-browser-list {
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
}
.asset-browser-toolbar {
padding: 8px;
background: #252526;
border-bottom: 1px solid #3e3e3e;
}
.asset-search {
width: 100%;
padding: 6px 10px;
background: #3c3c3c;
border: 1px solid #3e3e3e;
border-radius: 3px;
color: #cccccc;
font-size: 13px;
outline: none;
}
.asset-search:focus {
border-color: #007acc;
background: #3e3e3e;
}
.asset-search::placeholder {
color: #858585;
}
.asset-browser-loading,
@@ -44,9 +107,13 @@
}
.asset-list {
flex: 1;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
gap: 10px;
padding: 10px;
overflow-y: auto;
align-content: start;
}
.asset-item {
@@ -101,20 +168,33 @@
text-transform: uppercase;
}
.asset-browser-content::-webkit-scrollbar {
.asset-browser-list,
.asset-list {
overflow-y: auto;
}
.asset-browser-list::-webkit-scrollbar,
.asset-list::-webkit-scrollbar,
.file-tree::-webkit-scrollbar {
width: 10px;
}
.asset-browser-content::-webkit-scrollbar-track {
.asset-browser-list::-webkit-scrollbar-track,
.asset-list::-webkit-scrollbar-track,
.file-tree::-webkit-scrollbar-track {
background: #1e1e1e;
}
.asset-browser-content::-webkit-scrollbar-thumb {
.asset-browser-list::-webkit-scrollbar-thumb,
.asset-list::-webkit-scrollbar-thumb,
.file-tree::-webkit-scrollbar-thumb {
background: #424242;
border-radius: 5px;
}
.asset-browser-content::-webkit-scrollbar-thumb:hover {
.asset-browser-list::-webkit-scrollbar-thumb:hover,
.asset-list::-webkit-scrollbar-thumb:hover,
.file-tree::-webkit-scrollbar-thumb:hover {
background: #4e4e4e;
}

View File

@@ -0,0 +1,78 @@
.file-tree {
height: 100%;
overflow-y: auto;
overflow-x: hidden;
background: #1e1e1e;
color: #cccccc;
user-select: none;
}
.file-tree::-webkit-scrollbar {
width: 10px;
}
.file-tree::-webkit-scrollbar-track {
background: #1e1e1e;
}
.file-tree::-webkit-scrollbar-thumb {
background: #424242;
border-radius: 5px;
}
.file-tree::-webkit-scrollbar-thumb:hover {
background: #4e4e4e;
}
.file-tree.loading,
.file-tree.empty {
display: flex;
align-items: center;
justify-content: center;
color: #858585;
font-size: 12px;
}
.tree-node {
display: flex;
align-items: center;
padding: 4px 8px;
cursor: pointer;
font-size: 13px;
white-space: nowrap;
transition: background 0.1s ease;
}
.tree-node:hover {
background: #2a2d2e;
}
.tree-node.selected {
background: #37373d;
}
.tree-arrow {
width: 16px;
height: 16px;
display: inline-flex;
align-items: center;
justify-content: center;
margin-right: 4px;
font-size: 10px;
color: #cccccc;
}
.tree-icon {
margin-right: 6px;
font-size: 14px;
}
.tree-label {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
}
.tree-children {
/* Children are indented via inline style */
}