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

445 lines
8.3 KiB
CSS
Raw Normal View History

2025-10-15 17:21:59 +08:00
.console-panel {
display: flex;
flex-direction: column;
height: 100%;
background: var(--color-bg-base);
position: relative;
}
.console-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 6px 8px;
background: var(--color-bg-elevated);
border-bottom: 1px solid var(--color-border-default);
flex-shrink: 0;
gap: 8px;
}
.console-toolbar-left {
display: flex;
align-items: center;
gap: 8px;
flex: 1;
}
.console-toolbar-right {
display: flex;
align-items: center;
gap: 4px;
}
.console-btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 6px;
background: transparent;
border: none;
border-radius: var(--radius-sm);
color: var(--color-text-secondary);
cursor: pointer;
transition: all var(--transition-fast);
}
.console-btn:hover {
background: var(--color-bg-hover);
color: var(--color-text-primary);
}
.console-search {
display: flex;
align-items: center;
gap: 6px;
flex: 1;
max-width: 300px;
background: var(--color-bg-inset);
border: 1px solid var(--color-border-default);
border-radius: var(--radius-sm);
padding: 4px 8px;
color: var(--color-text-tertiary);
}
.console-search:focus-within {
border-color: var(--color-primary);
color: var(--color-text-primary);
}
.console-search input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: var(--color-text-primary);
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-xs);
2025-10-15 17:21:59 +08:00
font-family: var(--font-family-mono);
}
.console-search input::placeholder {
color: var(--color-text-tertiary);
}
.console-filter-btn {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 8px;
background: transparent;
border: 1px solid transparent;
border-radius: var(--radius-sm);
cursor: pointer;
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-xs);
2025-10-15 17:21:59 +08:00
font-weight: 500;
transition: all var(--transition-fast);
opacity: 0.5;
}
.console-filter-btn:hover {
opacity: 1;
background: var(--color-bg-hover);
}
.console-filter-btn.active {
opacity: 1;
border-color: currentColor;
background: rgba(255, 255, 255, 0.05);
}
.console-filter-btn:nth-child(1) {
2025-10-16 17:33:43 +08:00
color: #10b981;
2025-10-15 17:21:59 +08:00
}
.console-filter-btn:nth-child(1).active {
2025-10-16 17:33:43 +08:00
color: #34d399;
border-color: #10b981;
}
.console-filter-btn:nth-child(2) {
color: #858585;
}
.console-filter-btn:nth-child(2).active {
2025-10-15 17:21:59 +08:00
color: #a0a0a0;
border-color: #858585;
}
2025-10-16 17:33:43 +08:00
.console-filter-btn:nth-child(3) {
2025-10-15 17:21:59 +08:00
color: #4a9eff;
}
2025-10-16 17:33:43 +08:00
.console-filter-btn:nth-child(3).active {
2025-10-15 17:21:59 +08:00
color: #6eb3ff;
border-color: #4a9eff;
}
2025-10-16 17:33:43 +08:00
.console-filter-btn:nth-child(4) {
2025-10-15 17:21:59 +08:00
color: #ffc107;
}
2025-10-16 17:33:43 +08:00
.console-filter-btn:nth-child(4).active {
2025-10-15 17:21:59 +08:00
color: #ffd54f;
border-color: #ffc107;
}
2025-10-16 17:33:43 +08:00
.console-filter-btn:nth-child(5) {
2025-10-15 17:21:59 +08:00
color: #f44336;
}
2025-10-16 17:33:43 +08:00
.console-filter-btn:nth-child(5).active {
2025-10-15 17:21:59 +08:00
color: #ef5350;
border-color: #f44336;
}
.console-filter-btn span {
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-xs);
2025-10-15 17:21:59 +08:00
font-family: var(--font-family-mono);
}
.console-content {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
font-family: var(--font-family-mono);
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-xs);
2025-10-15 17:21:59 +08:00
line-height: 1.4;
}
.console-empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
color: var(--color-text-tertiary);
gap: 8px;
}
.console-empty p {
margin: 0;
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-sm);
2025-10-15 17:21:59 +08:00
}
.log-entry {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 4px 12px;
border-bottom: 1px solid var(--color-border-subtle);
transition: background-color var(--transition-fast);
}
.log-entry:hover {
background: rgba(255, 255, 255, 0.02);
}
.log-entry-icon {
display: flex;
align-items: center;
padding-top: 2px;
flex-shrink: 0;
}
.log-entry-time {
color: var(--color-text-tertiary);
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-xs);
2025-10-15 17:21:59 +08:00
white-space: nowrap;
padding-top: 2px;
flex-shrink: 0;
font-variant-numeric: tabular-nums;
}
.log-entry-source {
color: var(--color-text-secondary);
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-xs);
2025-10-15 17:21:59 +08:00
white-space: nowrap;
padding-top: 2px;
flex-shrink: 0;
opacity: 0.7;
}
2025-10-16 17:10:22 +08:00
.log-entry-source.source-remote {
color: #4a9eff;
opacity: 1;
font-weight: 600;
}
2025-10-16 17:33:43 +08:00
.log-entry-client {
color: #10b981;
2025-10-17 23:47:04 +08:00
font-size: calc(var(--font-size-xs) - 2px);
2025-10-16 17:33:43 +08:00
white-space: nowrap;
padding: 1px 6px;
flex-shrink: 0;
background: rgba(16, 185, 129, 0.15);
border: 1px solid rgba(16, 185, 129, 0.4);
border-radius: var(--radius-sm);
font-weight: 600;
font-family: var(--font-family-mono);
}
2025-10-16 17:10:22 +08:00
.log-entry-remote {
border-left: 2px solid #4a9eff;
background: rgba(74, 158, 255, 0.05);
}
.log-entry-expander {
display: flex;
align-items: center;
padding-top: 2px;
cursor: pointer;
color: var(--color-text-secondary);
flex-shrink: 0;
transition: color var(--transition-fast);
}
.log-entry-expander:hover {
color: var(--color-text-primary);
}
.log-entry-expanded {
flex-direction: column;
align-items: flex-start;
}
.log-entry-expanded .log-entry-message {
padding-left: 22px;
width: 100%;
}
2025-10-15 17:21:59 +08:00
.log-entry-message {
flex: 1;
color: var(--color-text-primary);
word-break: break-word;
padding-top: 2px;
}
2025-10-16 17:10:22 +08:00
.log-message-container {
display: flex;
align-items: flex-start;
gap: 8px;
width: 100%;
}
.log-message-preview {
opacity: 0.9;
flex: 1;
}
.log-open-json-btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 4px;
background: var(--color-primary);
border: none;
border-radius: var(--radius-sm);
color: white;
cursor: pointer;
opacity: 0.7;
transition: all var(--transition-fast);
flex-shrink: 0;
}
.log-open-json-btn:hover {
opacity: 1;
transform: scale(1.1);
}
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
.log-expand-btn {
display: inline-flex;
align-items: center;
justify-content: center;
margin-left: 8px;
padding: 2px 6px;
background: var(--color-bg-elevated);
border: 1px solid var(--color-border-default);
border-radius: var(--radius-sm);
color: var(--color-primary);
cursor: pointer;
font-size: var(--font-size-xs);
font-family: var(--font-family-mono);
transition: all var(--transition-fast);
}
.log-expand-btn:hover {
background: var(--color-bg-hover);
border-color: var(--color-primary);
}
2025-10-16 17:10:22 +08:00
.log-message-json {
margin: 4px 0 0 0;
padding: 8px;
background: rgba(0, 0, 0, 0.3);
border-radius: var(--radius-sm);
border: 1px solid var(--color-border-default);
font-family: var(--font-family-mono);
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-xs);
2025-10-16 17:10:22 +08:00
line-height: 1.5;
overflow: auto;
white-space: pre;
color: #a0e7a0;
max-height: 400px;
}
.log-message-json::-webkit-scrollbar {
width: 8px;
height: 8px;
}
.log-message-json::-webkit-scrollbar-track {
background: rgba(0, 0, 0, 0.2);
border-radius: 4px;
}
.log-message-json::-webkit-scrollbar-thumb {
background: rgba(160, 231, 160, 0.3);
border-radius: 4px;
}
.log-message-json::-webkit-scrollbar-thumb:hover {
background: rgba(160, 231, 160, 0.5);
}
2025-10-15 17:21:59 +08:00
.log-entry-debug {
color: var(--color-text-tertiary);
}
.log-entry-debug .log-entry-icon {
color: #858585;
}
.log-entry-info .log-entry-icon {
color: #4a9eff;
}
.log-entry-warn {
background: rgba(255, 193, 7, 0.05);
}
.log-entry-warn .log-entry-icon {
color: #ffc107;
}
.log-entry-error {
background: rgba(244, 67, 54, 0.05);
}
.log-entry-error .log-entry-icon {
color: #f44336;
}
.console-scroll-to-bottom {
position: absolute;
bottom: 12px;
left: 50%;
transform: translateX(-50%);
padding: 6px 12px;
background: var(--color-primary);
color: var(--color-text-inverse);
border: none;
border-radius: var(--radius-sm);
2025-10-17 23:47:04 +08:00
font-size: var(--font-size-xs);
2025-10-15 17:21:59 +08:00
font-weight: 500;
cursor: pointer;
box-shadow: var(--shadow-md);
transition: all var(--transition-fast);
z-index: 10;
}
.console-scroll-to-bottom:hover {
background: var(--color-primary-hover);
transform: translateX(-50%) translateY(-2px);
box-shadow: var(--shadow-lg);
}
.console-scroll-to-bottom:active {
transform: translateX(-50%) translateY(0);
}
2025-10-15 20:23:55 +08:00
/* Scrollbar */
.console-content::-webkit-scrollbar {
width: 10px;
}
.console-content::-webkit-scrollbar-track {
background: var(--color-bg-elevated);
}
.console-content::-webkit-scrollbar-thumb {
background: var(--color-border-default);
border-radius: 5px;
}
.console-content::-webkit-scrollbar-thumb:hover {
background: var(--color-text-secondary);
}
2025-10-15 17:21:59 +08:00
@media (prefers-reduced-motion: reduce) {
.console-btn,
.console-filter-btn,
.log-entry,
.console-scroll-to-bottom {
transition: none;
}
}