fix: refine earth settings modal and hud interactions

This commit is contained in:
linkong
2026-04-10 16:37:09 +08:00
committed by rayd1o
parent a2210f0f78
commit e85a9fc614
4 changed files with 528 additions and 10 deletions

View File

@@ -62,6 +62,64 @@
font-size: var(--hud-title-size);
}
.hud-panel-header {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--hud-gap-sm);
margin-bottom: var(--hud-gap-sm);
}
.hud-panel-header .hud-panel-title {
margin-bottom: 0;
}
.hud-panel-drag-handle {
cursor: grab;
user-select: none;
}
.hud-panel-drag-handle:active {
cursor: grabbing;
}
.hud-panel-close {
width: 28px;
height: 28px;
min-width: 28px;
border: 0;
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
color: #d9efff;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}
.hud-panel-close .material-symbols-rounded {
font-size: 18px;
}
.hud-panel-close:hover {
background: rgba(255, 255, 255, 0.14);
transform: scale(1.04);
}
.hud-panel.is-dragging {
transition: none !important;
box-shadow:
inset 0 1px 0 rgba(255, 255, 255, 0.14),
inset 0 -1px 0 rgba(255, 255, 255, 0.04),
0 24px 52px rgba(0, 0, 0, 0.28),
0 0 36px rgba(120, 200, 255, 0.16);
}
.hud-panel-hidden {
display: none !important;
}
.hud-panel-row {
display: flex;
justify-content: space-between;
@@ -145,6 +203,216 @@
user-select: none;
}
.earth-settings-modal {
position: fixed;
inset: 0;
z-index: 260;
display: none;
}
.earth-settings-modal.is-open {
display: block;
}
.earth-settings-backdrop {
position: fixed;
inset: 0;
background: rgba(2, 8, 20, 0.38);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
.earth-settings-sheet {
position: fixed;
top: 15vh;
right: 20vw;
bottom: 15vh;
left: 20vw;
width: auto;
max-width: none;
transform: none;
border-radius: calc(28px * var(--hud-scale));
padding: calc(20px * var(--hud-scale));
display: flex;
flex-direction: column;
gap: var(--hud-gap-md);
overflow: hidden;
animation: none;
}
.earth-settings-sheet.liquid-glass-surface:hover,
.earth-settings-sheet.liquid-glass-surface:active,
.earth-settings-sheet.liquid-glass-surface.is-pressed {
--btn-scale: 1;
--press-offset: 0px;
--glow-opacity: 0.24;
transform: none;
}
.earth-settings-header,
.earth-settings-content {
position: relative;
z-index: 1;
}
.earth-settings-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: var(--hud-gap-md);
padding-bottom: var(--hud-gap-sm);
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.earth-settings-kicker {
color: #9eb7d0;
font-size: 0.78rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.earth-settings-title {
margin-top: 4px;
color: #eef7ff;
font-size: calc(1.45rem * var(--hud-scale));
font-weight: 600;
}
.earth-settings-close {
width: 34px;
height: 34px;
min-width: 34px;
border: 0;
border-radius: 999px;
background: rgba(255, 255, 255, 0.08);
color: #d9efff;
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.earth-settings-content {
overflow-y: auto;
padding-right: 4px;
scrollbar-width: thin;
scrollbar-color: rgba(160, 220, 255, 0.45) transparent;
}
.earth-settings-content::-webkit-scrollbar {
width: 6px;
}
.earth-settings-content::-webkit-scrollbar-track {
background: transparent;
}
.earth-settings-content::-webkit-scrollbar-thumb {
background: linear-gradient(180deg, rgba(210, 237, 255, 0.28), rgba(110, 176, 255, 0.34));
border-radius: 999px;
}
.earth-settings-section {
padding: 12px 0 20px;
}
.earth-settings-section-title {
margin-bottom: 12px;
color: #9eb7d0;
font-size: 0.8rem;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.earth-settings-list {
display: flex;
flex-direction: column;
gap: 10px;
}
.earth-settings-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 14px 16px;
border-radius: 18px;
background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(92, 151, 218, 0.03));
border: 1px solid rgba(255, 255, 255, 0.08);
cursor: pointer;
}
.earth-settings-copy {
display: flex;
flex-direction: column;
gap: 4px;
}
.earth-settings-item-title {
color: #eef7ff;
font-size: 1rem;
font-weight: 500;
}
.earth-settings-item-subtitle {
color: #90a6bb;
font-size: 0.82rem;
line-height: 1.4;
}
.earth-settings-switch {
position: relative;
display: inline-flex;
align-items: center;
}
.earth-settings-switch input {
position: absolute;
opacity: 0;
pointer-events: none;
}
.earth-settings-switch-track {
width: 48px;
height: 30px;
border-radius: 999px;
background: rgba(255, 255, 255, 0.14);
border: 1px solid rgba(255, 255, 255, 0.12);
position: relative;
transition: background 0.18s ease, border-color 0.18s ease;
}
.earth-settings-switch-track::after {
content: "";
position: absolute;
top: 3px;
left: 3px;
width: 22px;
height: 22px;
border-radius: 50%;
background: #f5fbff;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
transition: transform 0.18s ease;
}
.earth-settings-switch input:checked + .earth-settings-switch-track {
background: linear-gradient(180deg, rgba(69, 171, 255, 0.92), rgba(34, 123, 255, 0.84));
border-color: rgba(220, 243, 255, 0.36);
}
.earth-settings-switch input:checked + .earth-settings-switch-track::after {
transform: translateX(18px);
}
@media (max-width: 960px) {
.earth-settings-sheet {
top: 12vh;
right: 10vw;
bottom: 12vh;
left: 10vw;
}
}
.earth-app.layout-expanded .hud-panel-info {
top: var(--hud-offset);
left: var(--hud-offset);