fix(frontend): toolbar layout + engine-select styling
- Restructure toolbar to use toolbar-row for horizontal layout - Fix emotion emoji buttons wrapping to vertical - Enlarge engine-select with better padding, font-size, min-width - Add toolbar-divider between engine and emotion sections - Add hover/focus box-shadow to engine-select - Remove toolbar-hint text to save space
This commit is contained in:
+3
-5
@@ -35,14 +35,13 @@
|
|||||||
|
|
||||||
<!-- Toolbar -->
|
<!-- Toolbar -->
|
||||||
<div class="toolbar">
|
<div class="toolbar">
|
||||||
<div class="toolbar-group">
|
<div class="toolbar-row">
|
||||||
<span class="toolbar-label">引擎:</span>
|
<span class="toolbar-label">引擎:</span>
|
||||||
<select id="engine-select">
|
<select id="engine-select">
|
||||||
<option value="minimax">MiniMax</option>
|
<option value="minimax">MiniMax</option>
|
||||||
<option value="cosyvoice">CosyVoice</option>
|
<option value="cosyvoice">CosyVoice</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
<span class="toolbar-divider"></span>
|
||||||
<div class="toolbar-group emotion-group">
|
|
||||||
<span class="toolbar-label">情绪:</span>
|
<span class="toolbar-label">情绪:</span>
|
||||||
<div id="emotion-global">
|
<div id="emotion-global">
|
||||||
<button class="emotion-btn" data-emotion="happy" title="开心愉快">😊</button>
|
<button class="emotion-btn" data-emotion="happy" title="开心愉快">😊</button>
|
||||||
@@ -51,10 +50,9 @@
|
|||||||
<button class="emotion-btn" data-emotion="surprised" title="惊讶">❗</button>
|
<button class="emotion-btn" data-emotion="surprised" title="惊讶">❗</button>
|
||||||
<button class="emotion-btn" data-emotion="fearful" title="害怕">😨</button>
|
<button class="emotion-btn" data-emotion="fearful" title="害怕">😨</button>
|
||||||
<button class="emotion-btn" data-emotion="disgusted" title="厌恶">😒</button>
|
<button class="emotion-btn" data-emotion="disgusted" title="厌恶">😒</button>
|
||||||
<span class="toolbar-hint">← 选择整段语音的情绪风格</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div id="emotion-per-sentence" style="display:none">
|
<div id="emotion-per-sentence" style="display:none">
|
||||||
逐句标注模式:选中句子后点击情绪标签(即将支持)
|
逐句标注模式(即将支持)
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
+28
-11
@@ -117,35 +117,52 @@ body {
|
|||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.toolbar-group { display: flex; align-items: center; gap: 8px; }
|
.toolbar-row {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 12px;
|
||||||
|
width: 100%;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
.toolbar-label { font-size: 0.85rem; color: var(--text-secondary); }
|
.toolbar-label { font-size: 0.85rem; color: var(--text-secondary); }
|
||||||
.toolbar-hint { font-size: 0.7rem; color: var(--text-muted); margin-left: 8px; }
|
.toolbar-divider {
|
||||||
|
width: 1px;
|
||||||
|
height: 20px;
|
||||||
|
background: var(--border-color);
|
||||||
|
}
|
||||||
|
|
||||||
#engine-select {
|
#engine-select {
|
||||||
padding: 6px 12px;
|
padding: 10px 36px 10px 16px;
|
||||||
background: #1a1a25;
|
background: var(--bg-card);
|
||||||
border: 1px solid #2a2a3a;
|
border: 1px solid var(--border-color);
|
||||||
border-radius: var(--radius-sm);
|
border-radius: var(--radius-md);
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-size: 0.85rem;
|
font-size: 0.95rem;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: var(--transition-fast);
|
transition: var(--transition-fast);
|
||||||
outline: none;
|
outline: none;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
|
min-width: 140px;
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2371717a' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
background-position: right 8px center;
|
background-position: right 12px center;
|
||||||
padding-right: 28px;
|
}
|
||||||
|
#engine-select:hover {
|
||||||
|
border-color: var(--border-hover);
|
||||||
|
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
|
||||||
|
}
|
||||||
|
#engine-select:focus {
|
||||||
|
border-color: var(--accent-primary);
|
||||||
|
box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
|
||||||
}
|
}
|
||||||
#engine-select:hover { border-color: var(--border-hover); }
|
|
||||||
#engine-select:focus { border-color: var(--accent-primary); }
|
|
||||||
#engine-select option { background: #1a1a25; color: #ffffff; }
|
#engine-select option { background: #1a1a25; color: #ffffff; }
|
||||||
|
|
||||||
#emotion-global {
|
#emotion-global {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
|
flex-wrap: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
#emotion-per-sentence {
|
#emotion-per-sentence {
|
||||||
|
|||||||
Reference in New Issue
Block a user