add top bar
This commit is contained in:
401
www/style.css
401
www/style.css
@@ -118,21 +118,397 @@ body {
|
||||
|
||||
.body {
|
||||
display: grid;
|
||||
grid-template-rows: 72px 1fr;
|
||||
grid-template-rows: auto 1fr;
|
||||
min-width: 0;
|
||||
}
|
||||
.topbar {
|
||||
background: var(--panel);
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding: 14px 18px;
|
||||
|
||||
/* —— MiR-style top bar —— */
|
||||
.mirTopbar {
|
||||
background: linear-gradient(180deg, #4d7fbe 0%, #2f5f9e 48%, #254f87 100%);
|
||||
color: #fff;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.22);
|
||||
position: relative;
|
||||
z-index: 40;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
.mirTopbarInner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 14px;
|
||||
gap: 12px;
|
||||
min-height: 52px;
|
||||
padding: 0 10px 0 14px;
|
||||
overflow-x: auto;
|
||||
overscroll-behavior: contain;
|
||||
}
|
||||
.mirTopbarLeft {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
.mirTopbarRight {
|
||||
display: flex;
|
||||
align-items: stretch;
|
||||
flex-shrink: 0;
|
||||
margin-left: auto;
|
||||
}
|
||||
.mirRobotId {
|
||||
font-size: 22px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.02em;
|
||||
color: #fff;
|
||||
padding-right: 6px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.mirPauseBtn {
|
||||
appearance: none;
|
||||
border: 1px solid rgba(0, 0, 0, 0.28);
|
||||
background: rgba(16, 42, 82, 0.72);
|
||||
border-radius: 6px;
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
.mirPauseBtn:hover:not(:disabled) {
|
||||
background: rgba(16, 42, 82, 0.9);
|
||||
}
|
||||
.mirPauseBtn:disabled {
|
||||
opacity: 0.5;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.mirPauseBtnIcon { display: block; }
|
||||
.mirPauseBtnIcon[hidden] { display: none !important; }
|
||||
.mirMissionStrip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12px;
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
max-width: 520px;
|
||||
padding: 7px 8px 7px 16px;
|
||||
border-radius: 999px;
|
||||
background: rgba(14, 36, 72, 0.72);
|
||||
border: 1px solid rgba(0, 0, 0, 0.22);
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
.mirMissionMsg {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: rgba(255, 255, 255, 0.88);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
min-width: 0;
|
||||
}
|
||||
.mirStatePill {
|
||||
flex-shrink: 0;
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.06em;
|
||||
padding: 5px 12px;
|
||||
border-radius: 999px;
|
||||
background: #e67e22;
|
||||
color: #fff;
|
||||
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
.mirStatePill.is-running { background: #3dba6a; }
|
||||
.mirStatePill.is-paused { background: #e67e22; }
|
||||
.mirStatePill.is-error { background: #c0392b; }
|
||||
|
||||
.mirSegment {
|
||||
appearance: none;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
color: inherit;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
padding: 0 14px;
|
||||
border-left: 1px solid rgba(255, 255, 255, 0.18);
|
||||
cursor: pointer;
|
||||
font: inherit;
|
||||
white-space: nowrap;
|
||||
flex-shrink: 0;
|
||||
min-height: 52px;
|
||||
}
|
||||
.mirTopbarRight > .mirPanel {
|
||||
top: 100%;
|
||||
}
|
||||
.mirSegment:disabled {
|
||||
opacity: 0.55;
|
||||
cursor: not-allowed;
|
||||
}
|
||||
.mirSegment:hover:not(:disabled) {
|
||||
background: rgba(255, 255, 255, 0.07);
|
||||
}
|
||||
.mirSegment--battery {
|
||||
cursor: default;
|
||||
border-left: 1px solid rgba(255, 255, 255, 0.18);
|
||||
}
|
||||
.mirSegment--battery:hover {
|
||||
background: transparent;
|
||||
}
|
||||
.mirSegment--joystick.is-active {
|
||||
background: rgba(255, 255, 255, 0.14);
|
||||
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
.mirSegment--status.is-error {
|
||||
background: rgba(192, 57, 43, 0.35);
|
||||
}
|
||||
.mirSvgIcon {
|
||||
display: block;
|
||||
flex-shrink: 0;
|
||||
color: #fff;
|
||||
}
|
||||
.mirStatusSvg.is-ok { color: #6ee7a0; }
|
||||
.mirStatusSvg.is-error { color: #ff8a8a; }
|
||||
.mirFlag {
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
}
|
||||
.mirSegmentLabel {
|
||||
font-size: 11px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.07em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.mirBatteryPct {
|
||||
font-size: 12px;
|
||||
letter-spacing: 0.02em;
|
||||
text-transform: none;
|
||||
font-weight: 700;
|
||||
}
|
||||
.mirCaret {
|
||||
font-size: 9px;
|
||||
opacity: 0.85;
|
||||
margin-left: 2px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.mirPanel {
|
||||
position: absolute;
|
||||
top: calc(100% - 2px);
|
||||
min-width: 280px;
|
||||
background: #ececec;
|
||||
color: #1f2937;
|
||||
border: 1px solid #c5c5c5;
|
||||
border-radius: 2px;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
|
||||
z-index: 50;
|
||||
}
|
||||
.mirPanel[hidden] {
|
||||
display: none !important;
|
||||
}
|
||||
.mirPanel--status { right: 280px; left: auto; }
|
||||
.mirPanel--locale { right: 140px; left: auto; }
|
||||
.mirPanel--user { right: 8px; left: auto; }
|
||||
.mirPanelBody { padding: 14px 16px; font-size: 13px; }
|
||||
.mirStatusOkTitle, .mirStatusErrorTitle {
|
||||
font-weight: 800;
|
||||
margin-bottom: 8px;
|
||||
letter-spacing: 0.04em;
|
||||
}
|
||||
.mirStatusErrorTitle { color: #c0392b; }
|
||||
.mirStatusDesc { color: #4b5563; line-height: 1.45; }
|
||||
.mirStatusRow { font-size: 12px; margin-bottom: 4px; }
|
||||
.mirStatusMeta { margin-top: 8px; font-size: 12px; color: #6b7280; }
|
||||
.mirPanelFooter {
|
||||
padding: 0 16px 14px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.mirPanel--locale {
|
||||
flex-direction: column;
|
||||
padding: 6px;
|
||||
min-width: 200px;
|
||||
}
|
||||
.mirPanel--locale:not([hidden]) {
|
||||
display: flex;
|
||||
}
|
||||
.mirLocaleOption {
|
||||
appearance: none;
|
||||
border: 0;
|
||||
background: transparent;
|
||||
text-align: left;
|
||||
padding: 10px 12px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
}
|
||||
.mirLocaleOption:hover { background: rgba(0, 0, 0, 0.06); }
|
||||
|
||||
.mirUserPanelHeader {
|
||||
display: flex;
|
||||
gap: 12px;
|
||||
align-items: center;
|
||||
padding: 14px 16px 8px;
|
||||
}
|
||||
.mirUserPanelAvatar {
|
||||
width: 42px;
|
||||
height: 42px;
|
||||
border-radius: 999px;
|
||||
background: #d1d5db;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
font-size: 20px;
|
||||
}
|
||||
.mirUserPanelRole {
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
.mirProfileField {
|
||||
display: grid;
|
||||
gap: 6px;
|
||||
padding: 0 16px 10px;
|
||||
font-size: 12px;
|
||||
color: #4b5563;
|
||||
}
|
||||
.mirProfileField input {
|
||||
border: 1px solid #cbd5e1;
|
||||
border-radius: 6px;
|
||||
padding: 8px 10px;
|
||||
font-size: 13px;
|
||||
}
|
||||
.mirPanel--user .mirBtn {
|
||||
margin: 0 16px 8px;
|
||||
width: calc(100% - 32px);
|
||||
}
|
||||
.mirBtn {
|
||||
appearance: none;
|
||||
border: 0;
|
||||
border-radius: 4px;
|
||||
padding: 10px 14px;
|
||||
font-size: 12px;
|
||||
font-weight: 800;
|
||||
letter-spacing: 0.04em;
|
||||
cursor: pointer;
|
||||
}
|
||||
.mirBtn--primary { background: #2980b9; color: #fff; }
|
||||
.mirBtn--primary.subtle { background: #5dade2; }
|
||||
.mirBtn--danger { background: #c0392b; color: #fff; }
|
||||
.mirBtn--reset { background: #7f8c8d; color: #fff; min-width: 96px; }
|
||||
|
||||
.mirBatteryIcon {
|
||||
width: 28px;
|
||||
height: 13px;
|
||||
border: 2px solid rgba(255, 255, 255, 0.95);
|
||||
border-radius: 2px;
|
||||
position: relative;
|
||||
padding: 1px;
|
||||
box-sizing: border-box;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.mirBatteryIcon::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
right: -5px;
|
||||
top: 3px;
|
||||
width: 3px;
|
||||
height: 6px;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
.mirBatteryLevel {
|
||||
display: block;
|
||||
height: 100%;
|
||||
width: 54%;
|
||||
background: #fff;
|
||||
border-radius: 1px;
|
||||
}
|
||||
.mirSegment--battery.is-low .mirBatteryLevel { background: #ffb4b4; }
|
||||
.mirSegment--battery.is-mid .mirBatteryLevel { background: #ffe08a; }
|
||||
|
||||
.configPageActions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.joystickOverlay {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(15, 23, 42, 0.45);
|
||||
z-index: 80;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
padding: 20px;
|
||||
}
|
||||
.joystickOverlay[hidden],
|
||||
body.auth-logged-out .joystickOverlay {
|
||||
display: none !important;
|
||||
pointer-events: none !important;
|
||||
}
|
||||
.joystickOverlayCard {
|
||||
background: #fff;
|
||||
border-radius: 16px;
|
||||
padding: 18px;
|
||||
width: min(360px, 100%);
|
||||
box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
.joystickOverlayHeader {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
.joystickPadWrap { display: grid; place-items: center; padding: 8px 0 14px; }
|
||||
.joystickPad {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 999px;
|
||||
background: radial-gradient(circle at 50% 50%, #f8fafc 0%, #e2e8f0 100%);
|
||||
border: 2px solid #cbd5e1;
|
||||
position: relative;
|
||||
touch-action: none;
|
||||
}
|
||||
.joystickStick {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
margin: -28px 0 0 -28px;
|
||||
border-radius: 999px;
|
||||
background: linear-gradient(180deg, #3b82f6, #1d4ed8);
|
||||
box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
|
||||
}
|
||||
.joystickOverlayActions {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
align-items: end;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.joystickSpeedSelect {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
font-size: 12px;
|
||||
color: var(--muted);
|
||||
}
|
||||
.joystickSpeedSelect select {
|
||||
padding: 8px 10px;
|
||||
border-radius: 8px;
|
||||
border: 1px solid var(--border);
|
||||
}
|
||||
|
||||
.mirTopbar--no-missions .mirTopbarLeft {
|
||||
visibility: hidden;
|
||||
width: 0;
|
||||
overflow: hidden;
|
||||
flex: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.mirTopbar--no-missions .mirTopbarRight .mirSegment--joystick,
|
||||
.mirTopbar--no-missions .mirTopbarRight .mirSegment--battery {
|
||||
display: none;
|
||||
}
|
||||
.kicker { font-size: 12px; color: var(--muted); }
|
||||
.pageTitle { font-size: 16px; font-weight: 800; letter-spacing: 0.2px; margin-top: 2px; }
|
||||
.topbarActions { display: flex; gap: 10px; align-items: center; }
|
||||
|
||||
.content {
|
||||
padding: 18px;
|
||||
@@ -986,6 +1362,13 @@ canvas {
|
||||
.dashboardInfoCard .dashboardInfoGrid { display: grid; gap: 8px; }
|
||||
.dashboardEmpty { text-align: center; padding: 12px 0 0; }
|
||||
|
||||
@media (max-width: 1100px) {
|
||||
.mirMissionStrip { max-width: 280px; }
|
||||
.mirPanel--status { right: 8px; left: 8px; }
|
||||
.mirPanel--locale { right: 8px; left: 8px; }
|
||||
.mirPanel--user { right: 8px; left: auto; }
|
||||
}
|
||||
|
||||
@media (max-width: 980px) {
|
||||
.shell { grid-template-columns: 1fr; }
|
||||
.sidebar { position: relative; height: auto; }
|
||||
|
||||
Reference in New Issue
Block a user