|
@@ -4,60 +4,68 @@
|
|
|
.Devices-container {
|
|
.Devices-container {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
height: 100%;
|
|
height: 100%;
|
|
|
- box-sizing: border-box;
|
|
|
|
|
|
|
+
|
|
|
display: flex;
|
|
display: flex;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
|
|
|
+ align-items: flex-start;
|
|
|
background: #f8f9fa;
|
|
background: #f8f9fa;
|
|
|
- padding: clamp(0.75rem, 2vw, 1.5rem);
|
|
|
|
|
|
|
+ /* padding: clamp(0.75rem, 2vw, 1.5rem); */
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 头部区域 */
|
|
/* 头部区域 */
|
|
|
.devices-header {
|
|
.devices-header {
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
- box-sizing: border-box;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
|
|
+ display: grid;
|
|
|
|
|
+ grid-template-columns: 65% 35%;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
gap: clamp(0.5rem, 1.5vw, 1rem);
|
|
gap: clamp(0.5rem, 1.5vw, 1rem);
|
|
|
- margin-bottom: clamp(0.75rem, 2vw, 1.5rem);
|
|
|
|
|
- padding: clamp(0.5rem, 1.5vw, 1rem);
|
|
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
border: 1px solid #e5e7eb;
|
|
border: 1px solid #e5e7eb;
|
|
|
border-radius: clamp(6px, 1vw, 8px);
|
|
border-radius: clamp(6px, 1vw, 8px);
|
|
|
background: #ffffff;
|
|
background: #ffffff;
|
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
|
|
|
- min-height: clamp(40px, 6vw, 48px);
|
|
|
|
|
|
|
+ container-type: inline-size; /* enable cqw-based scaling */
|
|
|
|
|
+ padding: clamp(0.5rem, 1.5vw, 1rem);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 标题 */
|
|
/* 标题 */
|
|
|
.devices-title {
|
|
.devices-title {
|
|
|
- font-size: clamp(1rem, 2.5vw, 1.8rem);
|
|
|
|
|
|
|
+ width: 100%; /* takes its 60% grid column */
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+
|
|
|
|
|
+ font-size: clamp(1rem, 6cqw, 1.9rem);
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
- padding: 0;
|
|
|
|
|
color: #1a1a1a;
|
|
color: #1a1a1a;
|
|
|
letter-spacing: -0.5px;
|
|
letter-spacing: -0.5px;
|
|
|
line-height: 1.2;
|
|
line-height: 1.2;
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 刷新按钮 */
|
|
/* 刷新按钮 */
|
|
|
.refresh-btn {
|
|
.refresh-btn {
|
|
|
|
|
+ justify-self: start;
|
|
|
|
|
+ width: 80%;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
justify-content: center;
|
|
justify-content: center;
|
|
|
- gap: clamp(0.25rem, 1vw, 0.5rem);
|
|
|
|
|
- padding: clamp(0.5rem, 1.5vw, 0.625rem) clamp(0.75rem, 2vw, 1.25rem);
|
|
|
|
|
|
|
+ gap: clamp(0.15rem, 0.8cqw, 0.4rem);
|
|
|
|
|
+ padding: clamp(0.36rem, 1.1cqw, 0.6rem) clamp(0.6rem, 1.5cqw, 1rem);
|
|
|
background: #1a1a1a;
|
|
background: #1a1a1a;
|
|
|
color: white;
|
|
color: white;
|
|
|
border: none;
|
|
border: none;
|
|
|
border-radius: clamp(6px, 1vw, 8px);
|
|
border-radius: clamp(6px, 1vw, 8px);
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
- font-size: clamp(0.75rem, 1.5vw, 1rem);
|
|
|
|
|
|
|
+ /* about 80% of original size */
|
|
|
|
|
+ font-size: clamp(0.6rem, 2.1cqw, 0.84rem); /* scale text/icon with button */
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
transition: all 0.2s ease;
|
|
transition: all 0.2s ease;
|
|
|
line-height: 1.2;
|
|
line-height: 1.2;
|
|
|
user-select: none;
|
|
user-select: none;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.refresh-btn:hover:not(.disabled) {
|
|
.refresh-btn:hover:not(.disabled) {
|
|
@@ -81,7 +89,7 @@
|
|
|
|
|
|
|
|
/* 刷新图标 */
|
|
/* 刷新图标 */
|
|
|
.refresh-icon {
|
|
.refresh-icon {
|
|
|
- font-size: 1em;
|
|
|
|
|
|
|
+ font-size: 1em; /* inherit current button size */
|
|
|
transition: transform 0.3s ease;
|
|
transition: transform 0.3s ease;
|
|
|
display: inline-block;
|
|
display: inline-block;
|
|
|
}
|
|
}
|
|
@@ -112,6 +120,8 @@
|
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
|
overflow-x: hidden;
|
|
overflow-x: hidden;
|
|
|
padding: 0;
|
|
padding: 0;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 自定义滚动条 */
|
|
/* 自定义滚动条 */
|
|
@@ -134,16 +144,21 @@
|
|
|
|
|
|
|
|
/* 设备项 */
|
|
/* 设备项 */
|
|
|
.device-item {
|
|
.device-item {
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
|
|
+ display: grid;
|
|
|
|
|
+ grid-template-columns: 1fr auto; /* text flexes, button keeps size */
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- padding: clamp(0.75rem, 1.5vw, 1rem) clamp(0.875rem, 2vw, 1.25rem);
|
|
|
|
|
|
|
+ width: 100%; /* align with header width */
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ column-gap: clamp(0.25rem, 0.8vw, 0.6rem);
|
|
|
|
|
+ padding: clamp(0.6rem, 1.2vw, 0.85rem) clamp(0.75rem, 1.6vw, 1rem);
|
|
|
margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
|
|
margin-bottom: clamp(0.5rem, 1.5vw, 0.75rem);
|
|
|
background: white;
|
|
background: white;
|
|
|
border-radius: clamp(6px, 1vw, 8px);
|
|
border-radius: clamp(6px, 1vw, 8px);
|
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
|
transition: all 0.2s ease;
|
|
transition: all 0.2s ease;
|
|
|
border: 1px solid #e5e7eb;
|
|
border: 1px solid #e5e7eb;
|
|
|
|
|
+ container-type: inline-size; /* allow cqw-based scaling inside */
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.device-item:hover {
|
|
.device-item:hover {
|
|
@@ -152,37 +167,52 @@
|
|
|
transform: translateY(-1px);
|
|
transform: translateY(-1px);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.device-actions {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ gap: clamp(0.4rem, 1vw, 0.75rem);
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/* 设备信息容器 */
|
|
/* 设备信息容器 */
|
|
|
.device-info {
|
|
.device-info {
|
|
|
- flex: 1;
|
|
|
|
|
|
|
+ width: 100%;
|
|
|
min-width: 0;
|
|
min-width: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 设备 ID(IP:端口) */
|
|
/* 设备 ID(IP:端口) */
|
|
|
.device-id {
|
|
.device-id {
|
|
|
- font-size: clamp(0.8rem, 1.8vw, 1.1rem);
|
|
|
|
|
|
|
+ /* scale with device-item width */
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ font-size: clamp(0.5rem, 1.6cqw, 0.85rem);
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
color: #1a1a1a;
|
|
color: #1a1a1a;
|
|
|
font-family: 'Courier New', 'Consolas', monospace;
|
|
font-family: 'Courier New', 'Consolas', monospace;
|
|
|
- word-break: break-all;
|
|
|
|
|
- letter-spacing: 0.2px;
|
|
|
|
|
|
|
+ word-break: keep-all;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: clip;
|
|
|
|
|
+ letter-spacing: 0;
|
|
|
line-height: 1.5;
|
|
line-height: 1.5;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* 连接按钮 */
|
|
/* 连接按钮 */
|
|
|
.connect-btn {
|
|
.connect-btn {
|
|
|
- padding: clamp(0.5rem, 1.5vw, 0.625rem) clamp(0.75rem, 2vw, 1.5rem);
|
|
|
|
|
|
|
+ /* scale with device-item width */
|
|
|
|
|
+ width: auto;
|
|
|
|
|
+ padding: clamp(0.32rem, 0.9cqw, 0.5rem) clamp(0.5rem, 1.3cqw, 0.85rem);
|
|
|
background: #1a1a1a;
|
|
background: #1a1a1a;
|
|
|
color: white;
|
|
color: white;
|
|
|
border: none;
|
|
border: none;
|
|
|
border-radius: clamp(6px, 1vw, 8px);
|
|
border-radius: clamp(6px, 1vw, 8px);
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
- font-size: clamp(0.75rem, 1.5vw, 1rem);
|
|
|
|
|
|
|
+ font-size: clamp(0.65rem, 1.6cqw, 0.85rem);
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
transition: all 0.2s ease;
|
|
transition: all 0.2s ease;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
- margin-left: clamp(0.5rem, 1.5vw, 1rem);
|
|
|
|
|
|
|
+ margin-left: clamp(0.25rem, 1vw, 0.75rem);
|
|
|
user-select: none;
|
|
user-select: none;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.connect-btn:hover:not(.disabled) {
|
|
.connect-btn:hover:not(.disabled) {
|
|
@@ -206,17 +236,19 @@
|
|
|
|
|
|
|
|
/* 断开按钮 */
|
|
/* 断开按钮 */
|
|
|
.disconnect-btn {
|
|
.disconnect-btn {
|
|
|
- padding: clamp(0.5rem, 1.5vw, 0.625rem) clamp(0.75rem, 2vw, 1.5rem);
|
|
|
|
|
|
|
+ /* match connect button sizing */
|
|
|
|
|
+ padding: clamp(0.4rem, 1.2cqw, 0.6rem) clamp(0.6rem, 1.8cqw, 1.1rem);
|
|
|
background: #dc2626;
|
|
background: #dc2626;
|
|
|
color: white;
|
|
color: white;
|
|
|
border: none;
|
|
border: none;
|
|
|
border-radius: clamp(6px, 1vw, 8px);
|
|
border-radius: clamp(6px, 1vw, 8px);
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
- font-size: clamp(0.75rem, 1.5vw, 1rem);
|
|
|
|
|
|
|
+ font-size: clamp(0.75rem, 2.2cqw, 0.95rem);
|
|
|
font-weight: 500;
|
|
font-weight: 500;
|
|
|
transition: all 0.2s ease;
|
|
transition: all 0.2s ease;
|
|
|
white-space: nowrap;
|
|
white-space: nowrap;
|
|
|
user-select: none;
|
|
user-select: none;
|
|
|
|
|
+ flex-shrink: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.disconnect-btn:hover:not(.disabled) {
|
|
.disconnect-btn:hover:not(.disabled) {
|