Files
esengine/packages/editor-app/src/styles/AssetBrowser.css

400 lines
6.8 KiB
CSS
Raw Normal View History

.asset-browser {
display: flex;
flex-direction: column;
height: 100%;
background: var(--color-bg-base);
border-top: 1px solid var(--color-border-default);
container-type: inline-size;
container-name: asset-browser;
}
.asset-browser-header {
padding: 12px 15px;
background: #252526;
border-bottom: 1px solid #333;
}
.asset-browser-header h3 {
2025-10-15 10:08:15 +08:00
margin: 0;
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-md);
font-weight: 600;
color: #cccccc;
}
2025-10-15 10:08:15 +08:00
.view-mode-buttons {
display: flex;
gap: 0;
margin-left: auto;
2025-10-15 10:08:15 +08:00
}
.view-mode-btn {
padding: 6px 12px;
2025-10-15 10:08:15 +08:00
background: transparent;
border: 1px solid #3e3e3e;
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;
2025-10-15 10:08:15 +08:00
}
.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) {
2025-10-15 10:08:15 +08:00
background: #2a2d2e;
}
.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 {
flex: 1;
2025-10-15 10:08:15 +08:00
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;
container-type: inline-size;
container-name: asset-list-container;
}
.asset-browser-breadcrumb {
padding: 8px 12px;
background: #2d2d30;
border-bottom: 1px solid #3e3e3e;
display: flex;
align-items: center;
flex-wrap: wrap;
gap: 4px;
font-size: var(--font-size-sm);
min-height: 32px;
}
.breadcrumb-item {
color: #cccccc;
cursor: pointer;
padding: 2px 6px;
border-radius: 3px;
transition: all 0.2s ease;
user-select: none;
}
.breadcrumb-item:hover {
background: #3e3e3e;
color: #ffffff;
}
.breadcrumb-item:active {
background: #094771;
}
.breadcrumb-separator {
color: #858585;
pointer-events: none;
2025-10-15 10:08:15 +08:00
}
.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;
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-base);
2025-10-15 10:08:15 +08:00
outline: none;
}
.asset-search:focus {
border-color: #007acc;
background: #3e3e3e;
}
.asset-search::placeholder {
color: #858585;
}
.asset-browser-loading,
.asset-browser-empty {
display: flex;
align-items: center;
justify-content: center;
height: 200px;
color: #858585;
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-base);
}
.asset-list {
2025-10-15 10:08:15 +08:00
flex: 1;
display: grid;
grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
gap: 8px;
2025-10-15 10:08:15 +08:00
padding: 10px;
overflow-y: auto;
align-content: start;
}
/* 容器查询:根据容器宽度调整布局 */
@container asset-list-container (max-width: 400px) {
.asset-list {
grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
gap: 6px;
}
}
@container asset-list-container (max-width: 250px) {
.asset-list {
grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
gap: 4px;
padding: 6px;
}
}
@container asset-list-container (max-width: 150px) {
.asset-list {
grid-template-columns: 1fr;
gap: 2px;
}
.asset-item {
flex-direction: row;
justify-content: flex-start;
padding: 6px 8px;
gap: 8px;
}
.asset-icon {
width: 24px;
height: 24px;
margin-bottom: 0;
}
.asset-name {
text-align: left;
margin-bottom: 0;
}
.asset-type {
display: none;
}
}
/* 中等窄度优化 */
@container asset-list-container (max-width: 250px) {
.asset-item {
padding: 8px 6px;
}
.asset-icon {
width: 36px;
height: 36px;
}
.asset-name {
font-size: 11px;
}
.asset-type {
font-size: 9px;
}
}
.asset-item {
display: flex;
flex-direction: column;
align-items: center;
padding: 12px 8px;
border-radius: 4px;
cursor: pointer;
transition: background-color 0.2s ease;
user-select: none;
}
.asset-item:hover {
background: #2a2d2e;
}
.asset-item.selected {
background: #094771;
}
.asset-item.selected:hover {
background: #0e6caa;
}
.asset-icon {
width: 48px;
height: 48px;
color: #cccccc;
margin-bottom: 8px;
stroke-width: 1.5;
}
.asset-icon.folder {
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%;
display: flex;
flex-direction: column;
align-items: center;
}
.asset-name {
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-sm);
color: #cccccc;
text-align: center;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
margin-bottom: 4px;
}
.asset-type {
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-xs);
color: #858585;
text-transform: uppercase;
}
2025-10-15 10:08:15 +08:00
.asset-browser-list,
.asset-list {
overflow-y: auto;
}
.asset-browser-list::-webkit-scrollbar,
.asset-list::-webkit-scrollbar,
.file-tree::-webkit-scrollbar {
width: 10px;
}
2025-10-15 10:08:15 +08:00
.asset-browser-list::-webkit-scrollbar-track,
.asset-list::-webkit-scrollbar-track,
.file-tree::-webkit-scrollbar-track {
background: #1e1e1e;
}
2025-10-15 10:08:15 +08:00
.asset-browser-list::-webkit-scrollbar-thumb,
.asset-list::-webkit-scrollbar-thumb,
.file-tree::-webkit-scrollbar-thumb {
background: #424242;
border-radius: 5px;
}
2025-10-15 10:08:15 +08:00
.asset-browser-list::-webkit-scrollbar-thumb:hover,
.asset-list::-webkit-scrollbar-thumb:hover,
.file-tree::-webkit-scrollbar-thumb:hover {
background: #4e4e4e;
}
refactor(editor): 提取行为树编辑器为独立包并重构编辑器架构 (#216) * refactor(editor): 提取行为树编辑器为独立包并重构编辑器架构 * feat(editor): 添加插件市场功能 * feat(editor): 重构插件市场以支持版本管理和ZIP打包 * feat(editor): 重构插件发布流程并修复React渲染警告 * fix(plugin): 修复插件发布和市场的路径不一致问题 * feat: 重构插件发布流程并添加插件删除功能 * fix(editor): 完善插件删除功能并修复多个关键问题 * fix(auth): 修复自动登录与手动登录的竞态条件问题 * feat(editor): 重构插件管理流程 * feat(editor): 支持 ZIP 文件直接发布插件 - 新增 PluginSourceParser 解析插件源 - 重构发布流程支持文件夹和 ZIP 两种方式 - 优化发布向导 UI * feat(editor): 插件市场支持多版本安装 - 插件解压到项目 plugins 目录 - 新增 Tauri 后端安装/卸载命令 - 支持选择任意版本安装 - 修复打包逻辑,保留完整 dist 目录结构 * feat(editor): 个人中心支持多版本管理 - 合并同一插件的不同版本 - 添加版本历史展开/折叠功能 - 禁止有待审核 PR 时更新插件 * fix(editor): 修复 InspectorRegistry 服务注册 - InspectorRegistry 实现 IService 接口 - 注册到 Core.services 供插件使用 * feat(behavior-tree-editor): 完善插件注册和文件操作 - 添加文件创建模板和操作处理器 - 实现右键菜单创建行为树功能 - 修复文件读取权限问题(使用 Tauri 命令) - 添加 BehaviorTreeEditorPanel 组件 - 修复 rollup 配置支持动态导入 * feat(plugin): 完善插件构建和发布流程 * fix(behavior-tree-editor): 完整恢复编辑器并修复 Toast 集成 * fix(behavior-tree-editor): 修复节点选中、连线跟随和文件加载问题并优化性能 * fix(behavior-tree-editor): 修复端口连接失败问题并优化连线样式 * refactor(behavior-tree-editor): 移除调试面板功能简化代码结构 * refactor(behavior-tree-editor): 清理冗余代码合并重复逻辑 * feat(behavior-tree-editor): 完善编辑器核心功能增强扩展性 * fix(lint): 修复ESLint错误确保CI通过 * refactor(behavior-tree-editor): 优化编辑器工具栏和编译器功能 * refactor(behavior-tree-editor): 清理技术债务,优化代码质量 * fix(editor-app): 修复字符串替换安全问题
2025-11-18 14:46:51 +08:00
/* Dialog styles */
.dialog-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.6);
display: flex;
align-items: center;
justify-content: center;
z-index: 10000;
}
.dialog-content {
background: #2a2a2a;
border: 1px solid #404040;
border-radius: 8px;
min-width: 400px;
max-width: 500px;
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.dialog-header {
padding: 16px 20px;
border-bottom: 1px solid #404040;
}
.dialog-header h3 {
margin: 0;
font-size: 16px;
font-weight: 600;
color: #e0e0e0;
}
.dialog-body {
padding: 20px;
}
.dialog-footer {
padding: 12px 20px;
border-top: 1px solid #404040;
display: flex;
justify-content: flex-end;
}