Implement AXIS parity UI and execution baseline
This commit is contained in:
158
web/react/src/styles.css
Normal file
158
web/react/src/styles.css
Normal file
@@ -0,0 +1,158 @@
|
||||
@import "tailwindcss";
|
||||
|
||||
:root {
|
||||
font-family: Arial, Helvetica, sans-serif;
|
||||
color: #202020;
|
||||
background: #cfcfcf;
|
||||
font-size: 13px;
|
||||
--face: #d8d8d8;
|
||||
--face-light: #ededed;
|
||||
--border: #8b8b8b;
|
||||
--border-dark: #666;
|
||||
--ink: #202020;
|
||||
--muted: #5a5a5a;
|
||||
--blue: #c8d7e8;
|
||||
--focus: #356ca8;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
html, body, #root { min-height: 100%; margin: 0; }
|
||||
body { min-width: 320px; background: #cfcfcf; color: var(--ink); }
|
||||
button, input, select, textarea { font: inherit; }
|
||||
button { color: inherit; }
|
||||
|
||||
.axis-app { min-height: 100vh; display: flex; flex-direction: column; padding: 0; background: var(--face); }
|
||||
.axis-window-header { display: flex; align-items: center; justify-content: space-between; min-height: 32px; padding: 3px 8px; border-bottom: 1px solid #777; background: #bcbcbc; }
|
||||
.axis-brand { display: flex; align-items: center; gap: 6px; }
|
||||
.axis-brand img { width: 24px; height: 24px; image-rendering: auto; }
|
||||
.axis-brand strong { font-size: 15px; letter-spacing: .04em; }
|
||||
.axis-brand span { color: #4b4b4b; font-size: 12px; }
|
||||
.connection-state { padding: 2px 6px; border: 1px solid #777; background: #d6d6d6; font: 11px ui-monospace, monospace; }
|
||||
.connection-state.ready, .connection-state.running { color: #185c1d; }
|
||||
.connection-state.error, .connection-state.blocked { color: #8b1010; background: #f3d2d2; }
|
||||
|
||||
.axis-menubar { display: flex; align-items: stretch; min-height: 27px; padding-left: 3px; border-bottom: 1px solid #888; background: #d3d3d3; }
|
||||
.axis-menu-item { position: relative; }
|
||||
.axis-menu-item summary { padding: 5px 10px; cursor: pointer; list-style: none; user-select: none; }
|
||||
.axis-menu-item summary::-webkit-details-marker { display: none; }
|
||||
.axis-menu-item[open] summary, .axis-menu-item summary:hover { background: #b8cbe0; }
|
||||
.axis-menu-popup { position: absolute; z-index: 20; top: 100%; left: 0; min-width: 220px; padding: 2px; border: 1px solid #777; box-shadow: 2px 2px 4px #777; background: #ededed; }
|
||||
.axis-menu-popup button { display: flex; justify-content: space-between; width: 100%; padding: 5px 8px; border: 0; background: transparent; text-align: left; cursor: pointer; }
|
||||
.axis-menu-popup button:hover, .axis-menu-popup button:focus-visible { outline: 1px solid var(--focus); background: #c8d7e8; }
|
||||
.axis-menu-popup kbd { margin-left: 22px; color: #555; font: 11px ui-monospace, monospace; }
|
||||
|
||||
.axis-toolbar { display: flex; align-items: center; min-height: 35px; padding: 3px 5px; overflow-x: auto; border-bottom: 1px solid #8a8a8a; background: #d9d9d9; }
|
||||
.axis-tool-button { display: inline-grid; width: 29px; height: 29px; flex: 0 0 29px; place-items: center; padding: 2px; border: 1px solid transparent; border-radius: 2px; background: transparent; cursor: pointer; }
|
||||
.axis-tool-button img { width: 24px; height: 24px; object-fit: contain; pointer-events: none; }
|
||||
.axis-tool-button:hover, .axis-tool-button:focus-visible { border-color: #6a8db6; background: #c8d7e8; outline: none; }
|
||||
.axis-tool-button.pressed { border-color: #777; border-right-color: #eee; border-bottom-color: #eee; background: #c0c0c0; }
|
||||
.axis-tool-button.danger { margin-right: 1px; }
|
||||
.axis-tool-button:disabled { cursor: not-allowed; opacity: .48; }
|
||||
.axis-toolbar-separator { width: 1px; height: 26px; flex: 0 0 1px; margin: 0 5px; border-left: 1px solid #969696; border-right: 1px solid #eee; }
|
||||
|
||||
.axis-case-strip { display: flex; align-items: center; gap: 7px; min-height: 34px; padding: 4px 8px; border-bottom: 1px solid #999; background: #c7c7c7; }
|
||||
.axis-case-strip label { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; }
|
||||
.axis-case-strip select { max-width: min(420px, 46vw); min-height: 24px; border: 1px solid var(--border-dark); background: white; }
|
||||
.case-status, .command-status { overflow: hidden; color: #4d4d4d; font: 11px ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
|
||||
.command-status { margin-left: auto; }
|
||||
|
||||
.axis-top-pane { display: grid; grid-template-columns: minmax(360px, .48fr) minmax(430px, 1fr); height: clamp(360px, calc(100vh - 415px), 680px); min-height: 360px; flex: 0 0 auto; padding: 5px; gap: 5px; }
|
||||
.axis-notebook { min-width: 0; display: flex; flex-direction: column; border: 1px solid var(--border-dark); background: var(--face-light); }
|
||||
.notebook-tabs { display: flex; align-items: end; min-height: 29px; padding: 3px 3px 0; border-bottom: 1px solid #777; background: #c5c5c5; }
|
||||
.notebook-tabs button { min-height: 26px; padding: 4px 12px; border: 1px solid transparent; border-bottom: 0; background: transparent; cursor: pointer; }
|
||||
.notebook-tabs button.active { margin-bottom: -1px; border-color: #777; background: var(--face-light); font-weight: 700; }
|
||||
.notebook-tabs button:hover { background: #dfe8f2; }
|
||||
.manual-control, .mdi-control, .dro-view { min-height: 0; flex: 1; padding: 11px; overflow: auto; }
|
||||
.manual-grid { display: grid; grid-template-columns: minmax(118px, .7fr) minmax(220px, 1.35fr); gap: 10px 14px; }
|
||||
.manual-grid h3, .mdi-control h3 { margin: 0 0 6px; font-size: 13px; font-weight: 400; }
|
||||
.manual-axis-block { grid-row: span 2; }
|
||||
.axis-radio-grid { display: grid; grid-template-columns: repeat(3, 48px); gap: 5px; }
|
||||
.axis-radio { display: inline-flex; align-items: center; gap: 3px; min-height: 26px; padding: 2px 3px; border: 1px solid transparent; cursor: pointer; }
|
||||
.axis-radio input { margin: 0; }
|
||||
.axis-radio.selected { border-color: #6685a5; background: var(--blue); }
|
||||
.jog-row, .spindle-row, .manual-action-row { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
|
||||
.manual-action-row { margin-top: 8px; }
|
||||
.manual-jog-block select { min-height: 25px; min-width: 104px; border: 1px solid var(--border-dark); background: white; }
|
||||
.axis-text-button { min-height: 26px; padding: 3px 9px; border: 1px solid #858585; border-radius: 2px; background: linear-gradient(#f4f4f4, #d6d6d6); box-shadow: inset 1px 1px #fff; cursor: pointer; }
|
||||
.axis-text-button:hover:not(:disabled), .axis-text-button:focus-visible { border-color: var(--focus); background: #d8e5f3; outline: none; }
|
||||
.axis-text-button:active:not(:disabled), .axis-text-button.danger { background: #c3c3c3; box-shadow: inset 1px 1px #999; }
|
||||
.axis-text-button:disabled { cursor: not-allowed; opacity: .5; }
|
||||
.check-line { display: inline-flex; align-items: center; gap: 4px; min-height: 25px; margin-top: 6px; }
|
||||
.check-line input { margin: 0; }
|
||||
.manual-spindle-block, .manual-coolant-block { min-width: 0; }
|
||||
.manual-coolant-block { grid-column: 1; }
|
||||
.spindle-row .axis-tool-button { width: 28px; height: 28px; }
|
||||
.spindle-row .axis-tool-button img { width: 16px; height: 16px; }
|
||||
.manual-sliders { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 6px 16px; margin-top: 13px; padding-top: 9px; border-top: 1px solid #b0b0b0; }
|
||||
.manual-sliders label, .axis-slider label { display: grid; grid-template-columns: auto 46px; align-items: center; gap: 4px; }
|
||||
.manual-sliders input, .axis-slider input { grid-column: 1 / -1; width: 100%; accent-color: #527ba2; }
|
||||
output { font: 12px ui-monospace, monospace; text-align: right; }
|
||||
.mdi-control { max-width: 540px; }
|
||||
.mdi-label { display: grid; gap: 5px; }
|
||||
.mdi-label input { min-height: 29px; padding: 4px 6px; border: 1px solid #777; background: white; font: 14px ui-monospace, monospace; }
|
||||
.mdi-control > .axis-text-button { margin-top: 7px; min-width: 74px; }
|
||||
.mdi-control h3 { margin-top: 18px; padding-bottom: 5px; border-bottom: 1px solid #aaa; }
|
||||
.mdi-control ol { max-height: 220px; margin: 0; padding-left: 28px; overflow: auto; font: 12px ui-monospace, monospace; }
|
||||
.mdi-control li button { border: 0; background: transparent; cursor: pointer; }
|
||||
.mdi-control li button:hover { color: #245d91; text-decoration: underline; }
|
||||
.empty-history { color: var(--muted); }
|
||||
|
||||
.axis-preview { display: flex; min-height: 0; flex: 1; padding: 4px; overflow: hidden; background: #101419; }
|
||||
.three-viewer { position: relative; width: 100%; height: 100%; min-height: 0; flex: 1; overflow: hidden; border: 1px solid #303b43; background: #080e13; }
|
||||
.three-viewer canvas { display: block; width: 100%; height: 100%; }
|
||||
.three-viewer-label { position: absolute; z-index: 1; top: 6px; left: 7px; padding: 2px 5px; color: #c9e86d; background: rgb(8 14 19 / 75%); font: 10px ui-monospace, monospace; pointer-events: none; }
|
||||
.dro-view { background: #ececec; }
|
||||
.dro-mode-row, .dro-row { display: grid; grid-template-columns: 42px repeat(3, minmax(100px, 1fr)); align-items: center; gap: 9px; }
|
||||
.dro-mode-row { padding: 5px 6px; border-bottom: 1px solid #888; color: #555; font-size: 11px; }
|
||||
.dro-mode-row span { text-align: right; }
|
||||
.dro-table { margin-top: 9px; border: 1px solid #888; background: #fafafa; }
|
||||
.dro-row { min-height: 38px; padding: 4px 7px; border-bottom: 1px solid #c6c6c6; }
|
||||
.dro-row:last-child { border-bottom: 0; }
|
||||
.dro-row strong { font-size: 15px; }
|
||||
.dro-row output { color: #111; font-size: 17px; }
|
||||
.dro-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 12px; color: #555; font: 11px ui-monospace, monospace; }
|
||||
|
||||
.axis-metrics { padding: 4px 9px; border-top: 1px solid #999; background: #cecece; }
|
||||
.axis-slider { display: grid; grid-template-columns: repeat(3, minmax(170px, 1fr)); gap: 12px; }
|
||||
.axis-slider label { grid-template-columns: auto 48px; }
|
||||
|
||||
.axis-program-pane { display: grid; grid-template-columns: minmax(0, 1fr) 230px; flex: 0 0 205px; height: 205px; min-height: 205px; margin: 0 5px 5px; border: 2px solid #777; background: #f7f7f7; }
|
||||
.program-editor-wrap { display: grid; grid-template-columns: 34px minmax(0, 1fr); min-width: 0; min-height: 0; }
|
||||
.program-gutter { display: flex; flex-direction: column; align-items: end; padding: 6px 6px 6px 0; overflow: hidden; border-right: 1px solid #c2c2c2; color: #888; background: #e4e4e4; font: 12px/1.45 ui-monospace, monospace; user-select: none; }
|
||||
.program-gutter span { height: 17px; }
|
||||
.program-editor-wrap textarea { width: 100%; height: 100%; min-height: 180px; padding: 6px 8px; resize: none; border: 0; outline: none; background: #fff; color: #111; font: 12px/1.45 ui-monospace, monospace; tab-size: 4; }
|
||||
.program-side { display: flex; flex-direction: column; gap: 12px; padding: 8px; border-left: 1px solid #aaa; background: #d9d9d9; }
|
||||
.program-actions { display: flex; flex-wrap: wrap; gap: 5px; }
|
||||
.active-gcodes-label { display: grid; gap: 5px; color: #333; }
|
||||
.active-gcodes-label textarea { width: 100%; min-height: 84px; resize: vertical; border: 1px solid #999; background: white; color: #222; font: 11px/1.35 ui-monospace, monospace; }
|
||||
.axis-info-bar { display: flex; align-items: stretch; min-height: 27px; margin-top: auto; border-top: 1px solid #777; background: #c4c4c4; }
|
||||
.axis-info-bar > span { display: flex; align-items: center; min-height: 25px; padding: 2px 9px; border-right: 1px solid #999; font: 12px ui-monospace, monospace; }
|
||||
.task-state { min-width: 92px; background: #ececec; font-weight: 700 !important; }
|
||||
.task-state.running { color: #145d1c; }
|
||||
.task-state.blocked, .task-state.error { color: #9b111e; background: #f2d6d6; }
|
||||
.tool-state { flex: 1; }
|
||||
.position-state { min-width: 230px; }
|
||||
.footer-status { min-width: 180px; color: #505050; }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.axis-top-pane { grid-template-columns: 1fr; height: auto; min-height: 0; flex: 0 0 auto; }
|
||||
.axis-notebook { min-height: 330px; }
|
||||
.axis-preview { min-height: 320px; }
|
||||
.axis-program-pane { flex: 0 0 auto; height: auto; min-height: 205px; grid-template-columns: 1fr; }
|
||||
.program-side { border-top: 1px solid #aaa; border-left: 0; }
|
||||
.active-gcodes-label textarea { min-height: 58px; }
|
||||
}
|
||||
@media (max-width: 620px) {
|
||||
.axis-brand span { display: none; }
|
||||
.axis-case-strip { flex-wrap: wrap; }
|
||||
.axis-case-strip select { max-width: 62vw; }
|
||||
.command-status { margin-left: 0; width: 100%; }
|
||||
.manual-grid, .manual-sliders, .axis-slider { grid-template-columns: 1fr; }
|
||||
.manual-axis-block, .manual-coolant-block { grid-row: auto; grid-column: auto; }
|
||||
.dro-mode-row, .dro-row { grid-template-columns: 27px repeat(3, minmax(0, 1fr)); gap: 4px; }
|
||||
.dro-mode-row { font-size: 9px; }
|
||||
.dro-row output { font-size: 13px; }
|
||||
.dro-footer { flex-direction: column; gap: 3px; }
|
||||
.axis-info-bar { flex-wrap: wrap; }
|
||||
.position-state, .footer-status { min-width: 0; flex: 1; }
|
||||
}
|
||||
Reference in New Issue
Block a user