Refactor code structure for improved readability and maintainability
This commit is contained in:
+224
-139
@@ -7,13 +7,14 @@
|
||||
--panel-border: rgba(255, 255, 255, 0.08);
|
||||
--text: #ecf2ff;
|
||||
--muted: #a4b2cc;
|
||||
--accent: #6ef2c6;
|
||||
--accent-strong: #17c98d;
|
||||
--accent: #6ec2f2;
|
||||
--accent-strong: #1782c9;
|
||||
--danger: #ff7e87;
|
||||
--grid: rgba(255, 255, 255, 0.08);
|
||||
--midi: #61c8ff;
|
||||
--artnet: #ffb35c;
|
||||
--shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
* {
|
||||
@@ -25,9 +26,9 @@ body {
|
||||
margin: 0;
|
||||
min-height: 100%;
|
||||
background:
|
||||
radial-gradient(circle at top left, rgba(110, 242, 198, 0.14), transparent 32%),
|
||||
radial-gradient(circle at top right, rgba(97, 200, 255, 0.14), transparent 28%),
|
||||
linear-gradient(180deg, #0a0d13 0%, #111722 100%);
|
||||
radial-gradient(circle at top left, rgba(110, 194, 242, 0.18), transparent 34%),
|
||||
radial-gradient(circle at top right, rgba(23, 130, 201, 0.16), transparent 28%),
|
||||
linear-gradient(180deg, #09111b 0%, #101a28 100%);
|
||||
color: var(--text);
|
||||
font-family: "Trebuchet MS", "Segoe UI Variable Text", "Aptos", sans-serif;
|
||||
}
|
||||
@@ -44,17 +45,18 @@ select {
|
||||
|
||||
button {
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(180deg, rgba(110, 242, 198, 0.2), rgba(23, 201, 141, 0.15));
|
||||
border-radius: 10px;
|
||||
background: linear-gradient(180deg, rgba(110, 194, 242, 0.2), rgba(23, 130, 201, 0.15));
|
||||
color: var(--text);
|
||||
padding: 0.65rem 0.95rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
cursor: pointer;
|
||||
transition: transform 120ms ease, border-color 120ms ease, background 120ms ease;
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
button:hover {
|
||||
transform: translateY(-1px);
|
||||
border-color: rgba(110, 242, 198, 0.45);
|
||||
border-color: rgba(110, 222, 242, 0.45);
|
||||
}
|
||||
|
||||
button.ghost {
|
||||
@@ -65,68 +67,35 @@ input,
|
||||
select {
|
||||
width: 100%;
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
border-radius: 12px;
|
||||
padding: 0.7rem 0.8rem;
|
||||
border-radius: 10px;
|
||||
padding: 0.56rem 0.7rem;
|
||||
background: rgba(0, 0, 0, 0.22);
|
||||
color: var(--text);
|
||||
font-size: 0.92rem;
|
||||
}
|
||||
|
||||
.app-shell {
|
||||
display: grid;
|
||||
grid-template-columns: 332px minmax(0, 1fr) 292px;
|
||||
gap: 18px;
|
||||
grid-template-columns: 286px minmax(0, 1fr);
|
||||
gap: 12px;
|
||||
min-height: 100vh;
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.app-shell.inspector-collapsed {
|
||||
grid-template-columns: 332px minmax(0, 1fr) 54px;
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
.sidebar,
|
||||
.workspace,
|
||||
.inspector {
|
||||
.workspace {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.panel {
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--panel-border);
|
||||
border-radius: 24px;
|
||||
border-radius: 18px;
|
||||
box-shadow: var(--shadow);
|
||||
backdrop-filter: blur(18px);
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.inspector {
|
||||
position: relative;
|
||||
gap: 12px;
|
||||
min-width: 0;
|
||||
overflow-y: auto;
|
||||
padding-right: 2px;
|
||||
}
|
||||
|
||||
.inspector .panel {
|
||||
padding: 12px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
|
||||
.inspector-toggle {
|
||||
align-self: flex-end;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
padding: 0;
|
||||
border-radius: 12px;
|
||||
}
|
||||
|
||||
.app-shell.inspector-collapsed .inspector .panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.app-shell.inspector-collapsed .inspector {
|
||||
align-items: center;
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.brand-panel {
|
||||
@@ -140,41 +109,12 @@ select {
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.logo-mark {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 18px;
|
||||
position: relative;
|
||||
background:
|
||||
linear-gradient(160deg, rgba(110, 242, 198, 0.3), rgba(97, 200, 255, 0.18)),
|
||||
rgba(255, 255, 255, 0.04);
|
||||
border: 1px solid rgba(255, 255, 255, 0.12);
|
||||
}
|
||||
|
||||
.logo-mark::before,
|
||||
.logo-mark::after,
|
||||
.logo-mark span {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: 12px;
|
||||
width: 10px;
|
||||
border-radius: 999px;
|
||||
background: linear-gradient(180deg, #6ef2c6, #61c8ff);
|
||||
}
|
||||
|
||||
.logo-mark::before {
|
||||
left: 16px;
|
||||
height: 22px;
|
||||
}
|
||||
|
||||
.logo-mark span {
|
||||
left: 28px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.logo-mark::after {
|
||||
left: 40px;
|
||||
height: 46px;
|
||||
.brand-logo {
|
||||
width: 96px;
|
||||
max-width: 36%;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
filter: drop-shadow(0 10px 24px rgba(0, 0, 0, 0.35));
|
||||
}
|
||||
|
||||
.brand-panel::after {
|
||||
@@ -183,14 +123,14 @@ select {
|
||||
inset: auto -80px -100px auto;
|
||||
width: 220px;
|
||||
height: 220px;
|
||||
background: radial-gradient(circle, rgba(110, 242, 198, 0.24), transparent 68%);
|
||||
background: radial-gradient(circle, rgba(110, 194, 242, 0.24), transparent 68%);
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.18em;
|
||||
font-size: 0.72rem;
|
||||
font-size: 0.64rem;
|
||||
color: var(--accent);
|
||||
}
|
||||
|
||||
@@ -200,25 +140,26 @@ h2 {
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.6rem;
|
||||
font-size: 1.24rem;
|
||||
line-height: 1.15;
|
||||
}
|
||||
|
||||
.brand-credit {
|
||||
margin-top: 0.35rem;
|
||||
margin-top: 0.2rem;
|
||||
color: var(--muted);
|
||||
font-size: 0.72rem;
|
||||
font-size: 0.62rem;
|
||||
letter-spacing: 0.08em;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.02rem;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
p {
|
||||
color: var(--muted);
|
||||
line-height: 1.5;
|
||||
line-height: 1.4;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.panel-header,
|
||||
@@ -227,32 +168,32 @@ p {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.panel-actions,
|
||||
.transport-controls,
|
||||
.editor-hints {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.editor-hints span,
|
||||
.meta-row span,
|
||||
.transport-label {
|
||||
font-size: 0.78rem;
|
||||
font-size: 0.7rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.field,
|
||||
.field-grid {
|
||||
display: grid;
|
||||
gap: 0.45rem;
|
||||
gap: 0.32rem;
|
||||
}
|
||||
|
||||
.field {
|
||||
margin-top: 12px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.checkbox-row {
|
||||
@@ -261,18 +202,18 @@ p {
|
||||
}
|
||||
|
||||
.checkbox-row input {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.field span {
|
||||
font-size: 0.82rem;
|
||||
font-size: 0.72rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.field-grid {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12px;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
@@ -280,14 +221,14 @@ p {
|
||||
}
|
||||
|
||||
.checkbox input {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.meta-row {
|
||||
margin-top: 12px;
|
||||
margin-top: 8px;
|
||||
display: grid;
|
||||
gap: 0.3rem;
|
||||
gap: 0.18rem;
|
||||
}
|
||||
|
||||
.path-label {
|
||||
@@ -303,16 +244,16 @@ p {
|
||||
#timelineInspector,
|
||||
#selectionInspector {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
margin-top: 12px;
|
||||
gap: 8px;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.timeline-card,
|
||||
.track-card,
|
||||
.info-card {
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 18px;
|
||||
padding: 12px 14px;
|
||||
border-radius: 14px;
|
||||
padding: 10px 12px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
|
||||
@@ -322,16 +263,28 @@ p {
|
||||
|
||||
.timeline-card.active,
|
||||
.track-card.active {
|
||||
border-color: rgba(110, 242, 198, 0.52);
|
||||
background: rgba(110, 242, 198, 0.09);
|
||||
border-color: rgba(110, 194, 242, 0.52);
|
||||
background: rgba(110, 194, 242, 0.12);
|
||||
}
|
||||
|
||||
.track-card.drag-source {
|
||||
opacity: 0.62;
|
||||
}
|
||||
|
||||
.track-card.drag-before {
|
||||
box-shadow: inset 0 3px 0 rgba(110, 194, 242, 0.9);
|
||||
}
|
||||
|
||||
.track-card.drag-after {
|
||||
box-shadow: inset 0 -3px 0 rgba(110, 194, 242, 0.9);
|
||||
}
|
||||
|
||||
.track-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
border-radius: 999px;
|
||||
padding: 0.2rem 0.55rem;
|
||||
font-size: 0.72rem;
|
||||
padding: 0.14rem 0.44rem;
|
||||
font-size: 0.62rem;
|
||||
font-weight: 700;
|
||||
color: #081118;
|
||||
}
|
||||
@@ -345,7 +298,7 @@ p {
|
||||
}
|
||||
|
||||
.track-pill.midicc {
|
||||
background: #8fd86f;
|
||||
background: #78cfff;
|
||||
}
|
||||
|
||||
.track-pill.osc {
|
||||
@@ -356,12 +309,16 @@ p {
|
||||
background: #9ca8ff;
|
||||
}
|
||||
|
||||
.track-pill.audio {
|
||||
background: #8ee8c8;
|
||||
}
|
||||
|
||||
.track-pill.serial {
|
||||
background: #ff9e6b;
|
||||
}
|
||||
|
||||
.track-pill.modbus {
|
||||
background: #63e0d3;
|
||||
background: #6fc2de;
|
||||
}
|
||||
|
||||
.track-pill.knx {
|
||||
@@ -374,7 +331,7 @@ p {
|
||||
|
||||
.track-card-top {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
gap: 8px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
@@ -384,14 +341,38 @@ p {
|
||||
|
||||
.track-card-actions {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.track-action {
|
||||
min-width: 34px;
|
||||
height: 34px;
|
||||
min-width: 28px;
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
border-radius: 10px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
|
||||
.track-grip {
|
||||
position: relative;
|
||||
cursor: grab;
|
||||
}
|
||||
|
||||
.track-grip:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.track-grip::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 8px;
|
||||
left: 9px;
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
border-radius: 999px;
|
||||
background: rgba(236, 242, 255, 0.72);
|
||||
box-shadow:
|
||||
0 6px 0 rgba(236, 242, 255, 0.72),
|
||||
6px 0 0 rgba(236, 242, 255, 0.72),
|
||||
6px 6px 0 rgba(236, 242, 255, 0.72);
|
||||
}
|
||||
|
||||
.workspace {
|
||||
@@ -399,7 +380,7 @@ p {
|
||||
}
|
||||
|
||||
.transport-bar {
|
||||
padding: 16px 18px;
|
||||
padding: 12px 14px;
|
||||
}
|
||||
|
||||
.transport-main {
|
||||
@@ -408,11 +389,11 @@ p {
|
||||
|
||||
.transport-block {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
gap: 2px;
|
||||
}
|
||||
|
||||
#timecodeLabel {
|
||||
font-size: 1.55rem;
|
||||
font-size: 1.2rem;
|
||||
letter-spacing: 0.08em;
|
||||
}
|
||||
|
||||
@@ -424,10 +405,10 @@ p {
|
||||
}
|
||||
|
||||
.canvas-frame {
|
||||
margin-top: 14px;
|
||||
margin-top: 10px;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
border-radius: 20px;
|
||||
border-radius: 16px;
|
||||
background:
|
||||
linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
|
||||
rgba(5, 8, 12, 0.62);
|
||||
@@ -443,31 +424,122 @@ p {
|
||||
|
||||
.empty-state {
|
||||
color: var(--muted);
|
||||
font-size: 0.92rem;
|
||||
line-height: 1.5;
|
||||
font-size: 0.82rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.inspector-grid {
|
||||
.settings-modal {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
display: grid;
|
||||
place-items: center;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 180ms ease;
|
||||
z-index: 40;
|
||||
}
|
||||
|
||||
.settings-modal.open {
|
||||
opacity: 1;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.settings-backdrop {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: rgba(5, 9, 16, 0.72);
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.settings-dialog {
|
||||
position: relative;
|
||||
width: min(1080px, calc(100vw - 32px));
|
||||
max-height: calc(100vh - 32px);
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
padding: 16px;
|
||||
overflow: hidden;
|
||||
border: 1px solid rgba(110, 194, 242, 0.18);
|
||||
}
|
||||
|
||||
.settings-dialog-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.settings-tabbar {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.settings-tab {
|
||||
min-width: 92px;
|
||||
background: rgba(255, 255, 255, 0.04);
|
||||
}
|
||||
|
||||
.settings-tab.active {
|
||||
border-color: rgba(110, 194, 242, 0.48);
|
||||
background: linear-gradient(180deg, rgba(110, 194, 242, 0.22), rgba(23, 130, 201, 0.18));
|
||||
}
|
||||
|
||||
.settings-content {
|
||||
min-height: 0;
|
||||
overflow: auto;
|
||||
padding-right: 4px;
|
||||
}
|
||||
|
||||
.settings-tab-panel {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.settings-tab-panel.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.settings-stack {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.settings-section {
|
||||
border: 1px solid rgba(255, 255, 255, 0.08);
|
||||
border-radius: 16px;
|
||||
padding: 12px;
|
||||
background: rgba(255, 255, 255, 0.03);
|
||||
}
|
||||
|
||||
.info-card {
|
||||
border: 1px solid rgba(110, 194, 242, 0.14);
|
||||
border-radius: 14px;
|
||||
padding: 10px 12px;
|
||||
background: linear-gradient(180deg, rgba(110, 194, 242, 0.08), rgba(255, 255, 255, 0.02));
|
||||
color: var(--muted);
|
||||
line-height: 1.4;
|
||||
font-size: 0.82rem;
|
||||
}
|
||||
|
||||
.info-card strong {
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
.inspector-grid {
|
||||
display: grid;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.section-label {
|
||||
color: var(--muted);
|
||||
font-size: 0.8rem;
|
||||
font-size: 0.68rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.14em;
|
||||
}
|
||||
|
||||
@media (max-width: 1320px) {
|
||||
.app-shell {
|
||||
grid-template-columns: 320px minmax(0, 1fr);
|
||||
}
|
||||
|
||||
.inspector {
|
||||
grid-column: 1 / -1;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
grid-template-columns: 270px minmax(0, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -476,7 +548,20 @@ p {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.inspector {
|
||||
.transport-main,
|
||||
.editor-header,
|
||||
.settings-dialog-header {
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.field-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.settings-dialog {
|
||||
width: calc(100vw - 20px);
|
||||
max-height: calc(100vh - 20px);
|
||||
padding: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user