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

306 lines
5.6 KiB
CSS
Raw Normal View History

2025-10-15 17:15:05 +08:00
.editor-loading {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
background-color: var(--color-bg-base);
color: var(--color-text-secondary);
}
.editor-loading h2 {
font-size: var(--font-size-lg);
font-weight: var(--font-weight-medium);
margin-top: var(--spacing-md);
}
2025-10-14 22:53:26 +08:00
.editor-container {
display: flex;
flex-direction: column;
width: 100%;
height: 100%;
2025-10-15 17:15:05 +08:00
background-color: var(--color-bg-base);
color: var(--color-text-primary);
2025-10-14 22:53:26 +08:00
}
.editor-titlebar {
display: flex;
align-items: center;
justify-content: center;
height: 22px;
background: linear-gradient(to bottom, #3a3a3f, #2a2a2f);
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
flex-shrink: 0;
position: relative;
-webkit-app-region: drag;
}
.titlebar-project-name {
position: absolute;
left: 8px;
font-size: 11px;
font-weight: 500;
color: #fff;
}
.titlebar-app-name {
font-size: 11px;
color: #888;
}
2025-10-14 22:53:26 +08:00
.editor-header {
display: flex;
align-items: center;
2025-10-15 18:24:13 +08:00
justify-content: space-between;
height: 28px;
padding: 0 8px;
background-color: #1a1a1f;
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
2025-10-15 17:15:05 +08:00
flex-shrink: 0;
transition: all 0.3s ease;
z-index: var(--z-index-dropdown);
position: relative;
}
.editor-header.remote-connected .status {
color: #4ade80;
}
.editor-header.remote-connected .status::before {
background-color: #4ade80;
2025-10-14 22:53:26 +08:00
}
2025-10-15 18:24:13 +08:00
.header-right {
2025-10-14 23:31:09 +08:00
display: flex;
2025-10-15 17:15:05 +08:00
align-items: center;
gap: 6px;
2025-10-15 18:24:13 +08:00
margin-left: auto;
2025-10-14 23:31:09 +08:00
}
.toolbar-btn {
2025-10-15 17:15:05 +08:00
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--spacing-xs);
height: var(--size-button-sm);
padding: 0 var(--spacing-md);
background-color: var(--color-primary);
color: var(--color-text-inverse);
2025-10-14 23:31:09 +08:00
border: none;
2025-10-15 17:15:05 +08:00
border-radius: var(--radius-sm);
font-size: var(--font-size-sm);
font-weight: var(--font-weight-medium);
2025-10-14 23:31:09 +08:00
cursor: pointer;
2025-10-15 17:15:05 +08:00
transition: all var(--transition-fast);
user-select: none;
2025-10-14 23:31:09 +08:00
}
.toolbar-btn:hover:not(:disabled) {
2025-10-15 17:15:05 +08:00
background-color: var(--color-primary-hover);
transform: translateY(-1px);
box-shadow: var(--shadow-sm);
}
.toolbar-btn:active:not(:disabled) {
background-color: var(--color-primary-active);
transform: translateY(0);
box-shadow: var(--shadow-inner);
2025-10-14 23:31:09 +08:00
}
.toolbar-btn:disabled {
2025-10-15 17:15:05 +08:00
background-color: var(--color-bg-input);
color: var(--color-text-disabled);
2025-10-14 23:31:09 +08:00
cursor: not-allowed;
2025-10-15 17:15:05 +08:00
opacity: 0.6;
2025-10-14 23:31:09 +08:00
}
2025-10-15 17:15:05 +08:00
.toolbar-btn:focus-visible {
outline: 2px solid var(--color-focus);
outline-offset: 2px;
2025-10-14 22:53:26 +08:00
}
2025-10-15 17:15:05 +08:00
.toolbar-btn svg {
width: var(--size-icon-sm);
height: var(--size-icon-sm);
2025-10-14 22:53:26 +08:00
}
2025-10-15 17:15:05 +08:00
.locale-btn {
width: 22px;
height: 22px;
2025-10-15 17:15:05 +08:00
padding: 0;
2025-10-15 18:24:13 +08:00
background-color: transparent;
color: #888;
border: none;
border-radius: 2px;
2025-10-14 22:53:26 +08:00
}
2025-10-15 17:15:05 +08:00
.locale-btn:hover:not(:disabled) {
background-color: rgba(255, 255, 255, 0.08);
color: #ccc;
border-color: transparent;
transform: none;
box-shadow: none;
}
.locale-dropdown {
position: relative;
}
.locale-btn {
display: flex;
align-items: center;
gap: 4px;
width: auto;
padding: 0 6px;
}
.locale-label {
font-size: 10px;
}
.locale-menu {
position: absolute;
top: 100%;
right: 0;
margin-top: 4px;
min-width: 100px;
background: #252529;
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 3px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
padding: 4px 0;
z-index: var(--z-index-dropdown);
}
.locale-menu-item {
display: block;
width: 100%;
padding: 6px 12px;
background: transparent;
border: none;
color: #ccc;
font-size: 11px;
text-align: left;
cursor: pointer;
transition: all 0.1s;
}
.locale-menu-item:hover {
background: #3b82f6;
color: #fff;
}
.locale-menu-item.active {
color: #3b82f6;
}
.locale-menu-item.active:hover {
color: #fff;
2025-10-14 22:53:26 +08:00
}
2025-10-15 17:15:05 +08:00
.editor-header .status {
2025-10-14 23:31:09 +08:00
display: flex;
align-items: center;
gap: 4px;
font-size: 10px;
color: #4ade80;
2025-10-15 17:15:05 +08:00
white-space: nowrap;
2025-10-14 23:31:09 +08:00
}
2025-10-15 17:15:05 +08:00
.editor-header .status::before {
content: '';
width: 5px;
height: 5px;
background-color: #4ade80;
border-radius: 50%;
2025-10-15 17:15:05 +08:00
animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.editor-content {
display: flex;
flex: 1;
2025-10-14 22:53:26 +08:00
overflow: hidden;
cursor: default;
2025-10-14 22:53:26 +08:00
}
.viewport {
display: flex;
flex-direction: column;
2025-10-15 17:15:05 +08:00
height: 100%;
background-color: var(--color-bg-base);
padding: var(--spacing-lg);
2025-10-14 22:53:26 +08:00
}
.viewport h3 {
2025-10-15 17:15:05 +08:00
font-size: var(--font-size-md);
font-weight: var(--font-weight-semibold);
color: var(--color-text-primary);
margin: 0 0 var(--spacing-md) 0;
2025-10-14 22:53:26 +08:00
}
2025-10-15 17:15:05 +08:00
.viewport p {
color: var(--color-text-secondary);
font-size: var(--font-size-base);
2025-10-14 22:53:26 +08:00
}
.editor-footer {
display: flex;
2025-10-15 17:15:05 +08:00
align-items: center;
2025-10-14 22:53:26 +08:00
justify-content: space-between;
2025-10-15 17:15:05 +08:00
height: var(--layout-footer-height);
padding: 0 var(--spacing-lg);
background-color: var(--color-primary);
color: var(--color-text-inverse);
font-size: var(--font-size-xs);
flex-shrink: 0;
}
.editor-footer span {
display: flex;
align-items: center;
gap: var(--spacing-sm);
2025-10-14 22:53:26 +08:00
}
2025-10-15 18:29:48 +08:00
.loading-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(30, 30, 30, 0.95);
display: flex;
align-items: center;
justify-content: center;
z-index: var(--z-index-overlay);
2025-10-15 18:29:48 +08:00
backdrop-filter: blur(4px);
}
.loading-content {
display: flex;
flex-direction: column;
align-items: center;
gap: 16px;
padding: 32px 48px;
background-color: #252526;
border: 1px solid #3e3e42;
border-radius: 4px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.loading-message {
font-size: 14px;
color: #cccccc;
margin: 0;
white-space: nowrap;
}