feat: node canvas grid
This commit is contained in:
@@ -146,10 +146,10 @@ body {
|
||||
}
|
||||
|
||||
.nav-tab.active {
|
||||
background: var(--bg-tertiary);
|
||||
border: 1px solid var(--accent-primary);
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
color: var(--text-primary);
|
||||
box-shadow: 0 4px 12px rgba(74, 222, 128, 0.2);
|
||||
box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.nav-right {
|
||||
@@ -207,12 +207,152 @@ body {
|
||||
.ledlab-main {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
gap: 1.5rem;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* Matrix display section */
|
||||
/* Matrix Grid Section - Full Width */
|
||||
.matrix-grid-section {
|
||||
flex: 1;
|
||||
background: var(--bg-secondary);
|
||||
border-radius: 16px;
|
||||
border: 1px solid var(--border-primary);
|
||||
padding: 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 0;
|
||||
box-shadow: var(--shadow-primary);
|
||||
backdrop-filter: var(--backdrop-blur);
|
||||
}
|
||||
|
||||
.matrix-grid-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.matrix-grid-controls {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Node Canvas Grid */
|
||||
.node-canvas-grid {
|
||||
flex: 1;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
grid-auto-rows: minmax(min(200px, calc((100vh - 10rem) / 3)), max(200px, calc((100vh - 10rem) / 2)));
|
||||
gap: 0.75rem;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
padding: 0.5rem;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.node-canvas-item {
|
||||
background: var(--matrix-bg);
|
||||
border-radius: 12px;
|
||||
border: 2px solid var(--border-secondary);
|
||||
padding: 0.75rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
height: 100%;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.node-canvas-item:hover {
|
||||
border-color: var(--border-hover);
|
||||
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.node-canvas-item.selected {
|
||||
border-color: var(--accent-primary);
|
||||
box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.2), 0 8px 24px rgba(0, 0, 0, 0.4);
|
||||
transform: translateY(-2px);
|
||||
}
|
||||
|
||||
.node-canvas-item.streaming {
|
||||
border-color: var(--accent-primary);
|
||||
}
|
||||
|
||||
.node-canvas-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 0.5rem;
|
||||
padding-bottom: 0.375rem;
|
||||
border-bottom: 1px solid var(--border-primary);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.node-canvas-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.375rem;
|
||||
}
|
||||
|
||||
.node-canvas-ip {
|
||||
font-size: 0.8rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
||||
}
|
||||
|
||||
.node-canvas-status {
|
||||
font-size: 0.6rem;
|
||||
padding: 0.2rem 0.4rem;
|
||||
border-radius: 6px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.node-canvas-status.connected {
|
||||
background: rgba(34, 197, 94, 0.15);
|
||||
color: var(--node-connected);
|
||||
border: 1px solid rgba(34, 197, 94, 0.3);
|
||||
}
|
||||
|
||||
.node-canvas-status.streaming {
|
||||
background: rgba(74, 222, 128, 0.15);
|
||||
color: var(--accent-primary);
|
||||
border: 1px solid rgba(74, 222, 128, 0.3);
|
||||
animation: pulse-glow 2s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.node-canvas-container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--matrix-bg);
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
min-height: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.node-canvas {
|
||||
image-rendering: pixelated;
|
||||
image-rendering: -moz-crisp-edges;
|
||||
image-rendering: crisp-edges;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
/* Old Matrix display section - kept for backwards compatibility */
|
||||
.matrix-section {
|
||||
flex: 1;
|
||||
background: var(--bg-secondary);
|
||||
@@ -310,7 +450,92 @@ body {
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
/* Control panel section */
|
||||
/* Floating Control Panel */
|
||||
.floating-controls {
|
||||
position: absolute;
|
||||
top: 1rem;
|
||||
right: 1rem;
|
||||
width: 380px;
|
||||
max-width: calc(100vw - 4rem);
|
||||
max-height: calc(100vh - 12rem);
|
||||
background: var(--bg-secondary);
|
||||
border-radius: 16px;
|
||||
border: 1px solid var(--border-primary);
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
box-shadow: 0 12px 48px rgba(0, 0, 0, 0.6);
|
||||
backdrop-filter: var(--backdrop-blur);
|
||||
z-index: 100;
|
||||
animation: slideInFromRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
@keyframes slideInFromRight {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateX(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
|
||||
.floating-controls-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1.25rem 1.5rem;
|
||||
border-bottom: 1px solid var(--border-primary);
|
||||
background: var(--bg-tertiary);
|
||||
}
|
||||
|
||||
.control-title {
|
||||
font-size: 1rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.control-title .node-indicator {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
border-radius: 50%;
|
||||
background: var(--node-connected);
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.btn-close {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--text-secondary);
|
||||
font-size: 1.25rem;
|
||||
cursor: pointer;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border-radius: 6px;
|
||||
transition: all 0.2s ease;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.btn-close:hover {
|
||||
background: var(--bg-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
|
||||
.floating-controls-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 1.5rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
/* Old Control panel section - kept for backwards compatibility */
|
||||
.control-section {
|
||||
width: 380px;
|
||||
min-width: 320px;
|
||||
@@ -358,6 +583,24 @@ body {
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.control-group-subtitle {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin-bottom: 0.75rem;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.control-group-subtitle::before {
|
||||
content: '';
|
||||
width: 3px;
|
||||
height: 14px;
|
||||
background: var(--accent-primary);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
/* Node list */
|
||||
.node-controls {
|
||||
margin-bottom: 1rem;
|
||||
@@ -819,34 +1062,121 @@ body {
|
||||
}
|
||||
|
||||
/* Scrollbar styling */
|
||||
.control-section::-webkit-scrollbar {
|
||||
.control-section::-webkit-scrollbar,
|
||||
.floating-controls-content::-webkit-scrollbar,
|
||||
.node-canvas-grid::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
|
||||
.control-section::-webkit-scrollbar-track {
|
||||
.control-section::-webkit-scrollbar-track,
|
||||
.floating-controls-content::-webkit-scrollbar-track,
|
||||
.node-canvas-grid::-webkit-scrollbar-track {
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.control-section::-webkit-scrollbar-thumb {
|
||||
.control-section::-webkit-scrollbar-thumb,
|
||||
.floating-controls-content::-webkit-scrollbar-thumb,
|
||||
.node-canvas-grid::-webkit-scrollbar-thumb {
|
||||
background: var(--border-primary);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.control-section::-webkit-scrollbar-thumb:hover {
|
||||
.control-section::-webkit-scrollbar-thumb:hover,
|
||||
.floating-controls-content::-webkit-scrollbar-thumb:hover,
|
||||
.node-canvas-grid::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--text-tertiary);
|
||||
}
|
||||
|
||||
/* Responsive adjustments */
|
||||
@media (min-width: 1600px) {
|
||||
.node-canvas-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
grid-auto-rows: minmax(220px, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1400px) {
|
||||
.node-canvas-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
||||
grid-auto-rows: minmax(180px, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.node-canvas-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
|
||||
grid-auto-rows: minmax(min(160px, calc((100vh - 8rem) / 3)), max(160px, calc((100vh - 8rem) / 2)));
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.node-canvas-item {
|
||||
padding: 0.625rem;
|
||||
}
|
||||
|
||||
.node-canvas-ip {
|
||||
font-size: 0.75rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.container {
|
||||
padding: 0 1rem;
|
||||
gap: 1rem;
|
||||
padding: 0 0.5rem;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.ledlab-main {
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
.node-canvas-grid {
|
||||
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
|
||||
grid-auto-rows: minmax(min(140px, calc((100vh - 7rem) / 3)), max(140px, calc((100vh - 7rem) / 2)));
|
||||
gap: 0.5rem;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
|
||||
.node-canvas-item {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
.node-canvas-header {
|
||||
margin-bottom: 0.375rem;
|
||||
padding-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.node-canvas-ip {
|
||||
font-size: 0.7rem;
|
||||
}
|
||||
|
||||
.node-canvas-status {
|
||||
font-size: 0.55rem;
|
||||
padding: 0.15rem 0.35rem;
|
||||
}
|
||||
|
||||
.floating-controls {
|
||||
position: fixed;
|
||||
top: auto;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
max-height: 70vh;
|
||||
border-radius: 16px 16px 0 0;
|
||||
animation: slideInFromBottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
}
|
||||
|
||||
@keyframes slideInFromBottom {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.control-section {
|
||||
|
||||
Reference in New Issue
Block a user