日志面板
This commit is contained in:
282
packages/editor-app/src/styles/ConsolePanel.css
Normal file
282
packages/editor-app/src/styles/ConsolePanel.css
Normal file
@@ -0,0 +1,282 @@
|
||||
.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);
|
||||
font-size: 11px;
|
||||
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;
|
||||
font-size: 10px;
|
||||
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) {
|
||||
color: #858585;
|
||||
}
|
||||
|
||||
.console-filter-btn:nth-child(1).active {
|
||||
color: #a0a0a0;
|
||||
border-color: #858585;
|
||||
}
|
||||
|
||||
.console-filter-btn:nth-child(2) {
|
||||
color: #4a9eff;
|
||||
}
|
||||
|
||||
.console-filter-btn:nth-child(2).active {
|
||||
color: #6eb3ff;
|
||||
border-color: #4a9eff;
|
||||
}
|
||||
|
||||
.console-filter-btn:nth-child(3) {
|
||||
color: #ffc107;
|
||||
}
|
||||
|
||||
.console-filter-btn:nth-child(3).active {
|
||||
color: #ffd54f;
|
||||
border-color: #ffc107;
|
||||
}
|
||||
|
||||
.console-filter-btn:nth-child(4) {
|
||||
color: #f44336;
|
||||
}
|
||||
|
||||
.console-filter-btn:nth-child(4).active {
|
||||
color: #ef5350;
|
||||
border-color: #f44336;
|
||||
}
|
||||
|
||||
.console-filter-btn span {
|
||||
font-size: 10px;
|
||||
font-family: var(--font-family-mono);
|
||||
}
|
||||
|
||||
.console-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
font-family: var(--font-family-mono);
|
||||
font-size: 11px;
|
||||
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;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.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);
|
||||
font-size: 10px;
|
||||
white-space: nowrap;
|
||||
padding-top: 2px;
|
||||
flex-shrink: 0;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
.log-entry-source {
|
||||
color: var(--color-text-secondary);
|
||||
font-size: 10px;
|
||||
white-space: nowrap;
|
||||
padding-top: 2px;
|
||||
flex-shrink: 0;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.log-entry-message {
|
||||
flex: 1;
|
||||
color: var(--color-text-primary);
|
||||
word-break: break-word;
|
||||
padding-top: 2px;
|
||||
}
|
||||
|
||||
.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);
|
||||
font-size: 11px;
|
||||
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);
|
||||
}
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
.console-btn,
|
||||
.console-filter-btn,
|
||||
.log-entry,
|
||||
.console-scroll-to-bottom {
|
||||
transition: none;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user