fix(frontend): improve responsive transcripts and simplify theme styles
This commit is contained in:
@@ -0,0 +1,298 @@
|
||||
/* Shared layout. Theme colors and voice artwork remain in legacy-theme.css. */
|
||||
body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: auto;
|
||||
min-height: 100dvh;
|
||||
padding: max(8px, env(safe-area-inset-top)) max(8px, env(safe-area-inset-right)) 0 max(8px, env(safe-area-inset-left));
|
||||
}
|
||||
#app {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
}
|
||||
.stage,
|
||||
html[data-theme="white"] .stage {
|
||||
padding: 12px 12px 8px;
|
||||
gap: 12px;
|
||||
flex: none;
|
||||
}
|
||||
.chat-panel {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
flex: 1 0 auto;
|
||||
flex-direction: column;
|
||||
height: clamp(240px, 45dvh, 640px);
|
||||
min-width: 0;
|
||||
margin: 8px 12px 0;
|
||||
}
|
||||
.circle-caption {
|
||||
color: var(--text-dim);
|
||||
}
|
||||
.chat-panel-inner {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
max-width: 920px;
|
||||
margin-inline: auto;
|
||||
padding: 12px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.chat-panel-header {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
padding: 0 0 10px;
|
||||
flex: none;
|
||||
}
|
||||
.chat-panel-header h2 {
|
||||
min-width: 0;
|
||||
}
|
||||
.chat-header-actions,
|
||||
html[data-theme="white"] .chat-header-actions {
|
||||
gap: 6px;
|
||||
}
|
||||
.chat-export-btn {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
.chat-history {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
gap: 14px;
|
||||
padding: 12px 4px;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
overflow-anchor: none;
|
||||
overscroll-behavior: contain;
|
||||
scrollbar-width: thin;
|
||||
}
|
||||
.chat-history:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: -2px;
|
||||
border-radius: 8px;
|
||||
}
|
||||
.hist-msg {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-shrink: 0;
|
||||
gap: 6px;
|
||||
max-width: 86%;
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
}
|
||||
.hist-msg.user {
|
||||
align-self: flex-start;
|
||||
margin-right: auto;
|
||||
}
|
||||
.hist-msg.assistant {
|
||||
align-self: flex-end;
|
||||
margin-left: auto;
|
||||
}
|
||||
.hist-msg.tool {
|
||||
align-self: flex-start;
|
||||
max-width: 100%;
|
||||
}
|
||||
.hist-meta {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: baseline;
|
||||
gap: 4px 10px;
|
||||
color: var(--text-dim);
|
||||
font-size: 12px;
|
||||
}
|
||||
.hist-meta span {
|
||||
overflow-wrap: anywhere;
|
||||
font-weight: 600;
|
||||
}
|
||||
.hist-meta time {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.hist-body {
|
||||
min-width: 0;
|
||||
}
|
||||
.hist-body:not(.markdown-content) {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
.jump-to-latest {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
bottom: 18px;
|
||||
right: 18px;
|
||||
z-index: 2;
|
||||
gap: 6px;
|
||||
box-shadow: var(--shadow-soft);
|
||||
}
|
||||
html[data-theme="white"] .chat-panel {
|
||||
background: #fff;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 20px;
|
||||
box-shadow: var(--shadow-soft);
|
||||
}
|
||||
html[data-theme="white"] .chat-panel-header {
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
html[data-theme="white"] .chat-history .hist-msg {
|
||||
max-width: calc(100% - 40px);
|
||||
padding-top: 0;
|
||||
}
|
||||
html[data-theme="white"] .chat-history .hist-msg.assistant {
|
||||
align-self: flex-start;
|
||||
margin: 4px auto 4px 40px;
|
||||
}
|
||||
html[data-theme="white"] .chat-history .hist-msg.user {
|
||||
align-self: flex-end;
|
||||
margin: 4px 40px 4px auto;
|
||||
}
|
||||
html[data-theme="white"] .chat-history .hist-msg.tool {
|
||||
max-width: 100%;
|
||||
margin: 4px 0;
|
||||
}
|
||||
html[data-theme="white"] .chat-history .hist-msg::before {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
font-size: 11px;
|
||||
}
|
||||
html[data-theme="white"] .hist-meta {
|
||||
color: #64748b;
|
||||
}
|
||||
html[data-theme="white"] .hist-msg.user .hist-meta {
|
||||
justify-content: flex-end;
|
||||
}
|
||||
.app-footer {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 16px 12px max(12px, env(safe-area-inset-bottom));
|
||||
flex: none;
|
||||
text-align: center;
|
||||
}
|
||||
.feedback-link {
|
||||
font-size: 13px;
|
||||
color: var(--text-dim);
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 3px;
|
||||
border: 0;
|
||||
padding: 4px;
|
||||
}
|
||||
.feedback-link:hover {
|
||||
color: var(--text);
|
||||
}
|
||||
.feedback-link:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 3px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
@media (min-width: 1024px) {
|
||||
#app.has-reports {
|
||||
padding-left: 320px;
|
||||
}
|
||||
body:has(#app.has-reports) .app-footer {
|
||||
margin-left: 320px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.topbar {
|
||||
flex-wrap: wrap;
|
||||
gap: 12px;
|
||||
}
|
||||
.topbar-right {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.chat-panel {
|
||||
margin-inline: 0;
|
||||
}
|
||||
.chat-panel-inner {
|
||||
padding: 10px;
|
||||
}
|
||||
html[data-theme="white"] .chat-panel-header h2 {
|
||||
font-size: 17px;
|
||||
}
|
||||
html[data-theme="white"] .chat-status-pill {
|
||||
font-size: 11px;
|
||||
padding: 5px 7px;
|
||||
}
|
||||
.orb-wrap {
|
||||
flex-direction: row;
|
||||
gap: 18px;
|
||||
}
|
||||
.circle {
|
||||
width: clamp(110px, 32vw, 176px);
|
||||
}
|
||||
.orb-wrap.live .side-btn {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
}
|
||||
.mic-gate-arc {
|
||||
width: 62px;
|
||||
height: 62px;
|
||||
}
|
||||
html[data-theme="white"] .white-mic-stage {
|
||||
gap: 12px;
|
||||
padding-top: 16px;
|
||||
}
|
||||
html[data-theme="white"] .white-waveform {
|
||||
top: 74px;
|
||||
}
|
||||
html[data-theme="white"] .white-session-controls {
|
||||
gap: 8px;
|
||||
}
|
||||
html[data-theme="white"] .white-mute-btn,
|
||||
html[data-theme="white"] .white-stop-btn {
|
||||
font-size: 13px;
|
||||
padding: 8px 10px;
|
||||
min-height: 44px;
|
||||
gap: 6px;
|
||||
}
|
||||
}
|
||||
@media (max-height: 640px) {
|
||||
.stage,
|
||||
html[data-theme="white"] .stage {
|
||||
padding-block: 8px;
|
||||
}
|
||||
html[data-theme="white"] .white-mic-stage {
|
||||
padding-top: 8px;
|
||||
gap: 8px;
|
||||
}
|
||||
html[data-theme="white"] .white-waveform {
|
||||
top: 57px;
|
||||
}
|
||||
html[data-theme="white"] .white-mic-caption {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
:root {
|
||||
--audio-level: 0 !important;
|
||||
--ai-audio-level: 0 !important;
|
||||
--bar0: 0 !important;
|
||||
--bar1: 0 !important;
|
||||
--bar2: 0 !important;
|
||||
--bar3: 0 !important;
|
||||
--bar4: 0 !important;
|
||||
}
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
animation: none !important;
|
||||
transition: none !important;
|
||||
scroll-behavior: auto !important;
|
||||
}
|
||||
.circle.state-ai-speaking .bar,
|
||||
.circle.state-user-speaking .bar {
|
||||
transform: none !important;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user