mirror of
https://github.com/wahyd4/links.git
synced 2026-08-08 21:04:53 +10:00
jbot: anchor voice button to bottom via unified right-footer
- Merged hint text + VoiceButton into a single .right-footer div
(flex column, white bg, border-top) so they form one solid footer bar
visually anchored to the bottom of the right column — no more floating
- .right-col gets min-height:0 so flex children can shrink properly
- .vbtn-wrap is now a transparent width:100% wrapper inside right-footer
(desktop); mobile keeps its own fixed-position overlay
- .right-footer { display: none } on mobile (fixed vbtn-wrap takes over)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+14
-10
@@ -105,6 +105,7 @@
|
||||
.right-col {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
@@ -599,21 +600,27 @@ kbd {
|
||||
/* Chat padding tighter on mobile */
|
||||
.chat-panel { padding: 10px 12px; }
|
||||
|
||||
/* Right hint hidden on mobile — space is tight */
|
||||
.right-hint { display: none; }
|
||||
/* On mobile the footer is replaced by the fixed vbtn-wrap */
|
||||
.right-footer { display: none; }
|
||||
}
|
||||
|
||||
|
||||
/* ── Right column hint bar ────────────────────────────────── */
|
||||
.right-hint {
|
||||
.right-footer {
|
||||
flex: 0 0 auto;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 8px 16px 14px;
|
||||
background: var(--surface);
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
.right-hint {
|
||||
font-size: 0.72rem;
|
||||
color: var(--text3);
|
||||
text-align: center;
|
||||
padding: 3px 16px 2px;
|
||||
line-height: 1.7;
|
||||
border-top: 1px solid var(--border);
|
||||
background: var(--surface);
|
||||
}
|
||||
|
||||
|
||||
@@ -923,12 +930,9 @@ kbd {
|
||||
|
||||
/* ── Hold-to-talk voice button ────────────────────────────── */
|
||||
.vbtn-wrap {
|
||||
flex: 0 0 auto;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
padding: 10px 16px 14px;
|
||||
background: var(--surface);
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
.vbtn {
|
||||
position: relative;
|
||||
|
||||
@@ -376,15 +376,17 @@ export default function App() {
|
||||
</section>
|
||||
</aside>
|
||||
|
||||
{/* ── Right column: memory + chat + hint + voice button ── */}
|
||||
{/* ── Right column: memory + chat + bottom bar ── */}
|
||||
<div className="right-col">
|
||||
<MemoryPanel memories={memories} onMemoriesChange={refreshMemories} />
|
||||
<ChatPanel messages={chatMessages} voiceStatus={voiceStatus} />
|
||||
<p className="right-hint">
|
||||
按住 <kbd>Space</kbd> 或按钮说话 · 松开发送 · 🔊{' '}
|
||||
<button className="hist-inline-link" onClick={() => navigate('/settings')}>{currentVoiceLabel}</button>
|
||||
</p>
|
||||
<VoiceButton phase={voicePhase} onStart={handleSpaceDown} onEnd={handleSpaceUp} />
|
||||
<div className="right-footer">
|
||||
<p className="right-hint">
|
||||
按住 <kbd>Space</kbd> 或按钮说话 · 松开发送 · 🔊{' '}
|
||||
<button className="hist-inline-link" onClick={() => navigate('/settings')}>{currentVoiceLabel}</button>
|
||||
</p>
|
||||
<VoiceButton phase={voicePhase} onStart={handleSpaceDown} onEnd={handleSpaceUp} />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user