fix(foam-roller): remove button icons and optimize strength gears for internationalization
This commit is contained in:
@@ -226,18 +226,27 @@ body {
|
||||
border: 1px solid var(--color-primary-border);
|
||||
}
|
||||
|
||||
.strength-box { display: flex; flex-direction: column; gap: 6px; }
|
||||
.strength-title { font-size: 12.5px; font-weight: 700; color: var(--text-sub); }
|
||||
.strength-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
|
||||
.strength-box { display: flex; flex-direction: column; gap: 8px; }
|
||||
.strength-header-row {
|
||||
display: flex; justify-content: space-between; align-items: center;
|
||||
}
|
||||
.strength-title { font-size: 13px; font-weight: 700; color: var(--text-sub); }
|
||||
.strength-current-tag {
|
||||
font-size: 12px; font-weight: 800; color: var(--color-primary); background: var(--color-primary-light);
|
||||
border: 1px solid var(--color-primary-border); padding: 2px 8px; border-radius: 6px;
|
||||
}
|
||||
.strength-grid {
|
||||
display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; width: 100%;
|
||||
}
|
||||
.strength-btn {
|
||||
height: 36px; border-radius: 8px; border: 1px solid var(--divider); background: #F8FAFC;
|
||||
font-size: 12px; font-weight: 700; color: var(--text-sub); cursor: pointer; display: flex; align-items: center;
|
||||
height: 38px; min-width: 0; border-radius: 8px; border: 1.5px solid var(--divider); background: #F8FAFC;
|
||||
font-size: 14px; font-weight: 800; color: var(--text-main); cursor: pointer; display: flex; align-items: center;
|
||||
justify-content: center; transition: all 0.15s ease;
|
||||
}
|
||||
.strength-btn:hover { border-color: var(--color-primary); }
|
||||
.strength-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: white; }
|
||||
.strength-btn.active {
|
||||
background: var(--color-primary); color: white; border-color: var(--color-primary);
|
||||
box-shadow: 0 2px 8px var(--color-primary-glow);
|
||||
box-shadow: 0 4px 10px var(--color-primary-glow);
|
||||
}
|
||||
|
||||
.btn-save-full {
|
||||
|
||||
@@ -47,7 +47,6 @@
|
||||
|
||||
<div class="device-btn-group">
|
||||
<button class="btn-mini btn-ghost-neutral" id="btnRefresh" onclick="handleScanRefresh()">
|
||||
<svg style="width: 14px; height: 14px; fill: currentColor;" viewBox="0 0 24 24"><path d="M17.65 6.35C16.2 4.9 14.21 4 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08c-.82 2.33-3.04 4-5.65 4-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"/></svg>
|
||||
<span>刷新设备</span>
|
||||
</button>
|
||||
<button class="btn-mini btn-danger-outline" id="btnToggleConn" onclick="toggleConnectState()">
|
||||
@@ -103,11 +102,9 @@
|
||||
|
||||
<div class="timer-actions-row">
|
||||
<button class="btn-ctrl btn-start" id="btnStart" onclick="handleStartTimer()">
|
||||
<svg style="width: 18px; height: 18px; fill: currentColor;" viewBox="0 0 24 24"><path d="M8 5v14l11-7z"/></svg>
|
||||
<span>开始</span>
|
||||
</button>
|
||||
<button class="btn-ctrl btn-pause" id="btnPause" onclick="handlePauseTimer()">
|
||||
<svg style="width: 18px; height: 18px; fill: currentColor;" viewBox="0 0 24 24"><path d="M6 19h4V5H6v14zm8-14v14h4V5h-4z"/></svg>
|
||||
<span>暂停</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -145,22 +142,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 力量档位选择 -->
|
||||
<!-- 力量档位选择 (国际化防溢出优化:标题栏指示当前档位,按钮通用数字等宽分段) -->
|
||||
<div class="strength-box">
|
||||
<div class="strength-title">力量档位</div>
|
||||
<div class="strength-header-row">
|
||||
<span class="strength-title">力量档位</span>
|
||||
<span class="strength-current-tag" id="dispStrengthTag">4 档</span>
|
||||
</div>
|
||||
<div class="strength-grid">
|
||||
<button class="strength-btn" onclick="setStrengthLevel(1, this)">力量 : 1</button>
|
||||
<button class="strength-btn" onclick="setStrengthLevel(2, this)">力量 : 2</button>
|
||||
<button class="strength-btn" onclick="setStrengthLevel(3, this)">力量 : 3</button>
|
||||
<button class="strength-btn active" onclick="setStrengthLevel(4, this)">力量 : 4</button>
|
||||
<button class="strength-btn" onclick="setStrengthLevel(5, this)">力量 : 5</button>
|
||||
<button class="strength-btn" onclick="setStrengthLevel(1, this)">1</button>
|
||||
<button class="strength-btn" onclick="setStrengthLevel(2, this)">2</button>
|
||||
<button class="strength-btn" onclick="setStrengthLevel(3, this)">3</button>
|
||||
<button class="strength-btn active" onclick="setStrengthLevel(4, this)">4</button>
|
||||
<button class="strength-btn" onclick="setStrengthLevel(5, this)">5</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="right-bottom-section">
|
||||
<button class="btn-save-full" id="btnSaveConfig" onclick="handleSaveConfig()">
|
||||
<svg style="width: 16px; height: 16px; fill: currentColor;" viewBox="0 0 24 24"><path d="M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"/></svg>
|
||||
<span>保存</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -166,7 +166,9 @@ function setStrengthLevel(level, btn) {
|
||||
currentStrength = level;
|
||||
document.querySelectorAll('.strength-grid .strength-btn').forEach(b => b.classList.remove('active'));
|
||||
btn.classList.add('active');
|
||||
showToast(`力量档位已调节为:力量 ${level}`);
|
||||
const tag = document.getElementById('dispStrengthTag');
|
||||
if (tag) tag.innerText = level + ' 档';
|
||||
showToast(`力量档位已调节为:${level} 档`);
|
||||
}
|
||||
|
||||
function handleSaveConfig() {
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# 泡沫轴 (Foam Roller) - 版本变更履历 (Changelog)
|
||||
|
||||
## [2.1.0] - 2026-08-18
|
||||
|
||||
### 优化与调整 (Refined & Optimized)
|
||||
- **多语言国际化防溢出优化**:
|
||||
- 重构【力量档位】设计:标题栏采用双段式(左侧标题,右侧动态高亮当前档位徽章如 `4 档`);
|
||||
- 档位按钮升级为通用数字等宽分段键(`1` ~ `5`),彻底消除其他语种(德语、俄语、西班牙语等)长文本导致的挤压、遮挡与占位溢出风险。
|
||||
- **去除按钮前置图标**:
|
||||
- 【刷新设备】、【开始】、【暂停】、【保存】等所有操作按钮全面取消前置图标,呈现纯粹工控文字美学。
|
||||
|
||||
## [1.0.0] - 2026-08-18
|
||||
|
||||
### 🌟 初始现代化重构与全量 6 件套交付
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 109 KiB After Width: | Height: | Size: 107 KiB |
Reference in New Issue
Block a user