Spaces:
Running
Running
Mobile: give persona/diary content real space on phones
Browse filesOn phones the controls panel and result were two scroll panes splitting a fixed-
height box, squeezing the story/persona to a sliver, and the floating ☰ button
overlapped the top of the content. Now (≤768px): the whole .persona-view scrolls
as one column, the result gets min-height 62vh, controls clear the hamburger
(padding-top), inputs use 16px (no iOS focus-zoom) with bigger tap targets, and
tapping Generate/Write scrolls the result into view.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- web/diaryPanel.js +1 -0
- web/personaPanel.js +1 -0
- web/shell/persona.css +18 -2
web/diaryPanel.js
CHANGED
|
@@ -90,6 +90,7 @@ export function mountDiaryPanel(host) {
|
|
| 90 |
async function write() {
|
| 91 |
if (busy) return
|
| 92 |
busy = true; btn.disabled = true; stats.textContent = ''
|
|
|
|
| 93 |
stopNarration()
|
| 94 |
const header = `— Diary of ${(unit.value || 'a nameless soldier').trim()} —\n\n`
|
| 95 |
out.textContent = header
|
|
|
|
| 90 |
async function write() {
|
| 91 |
if (busy) return
|
| 92 |
busy = true; btn.disabled = true; stats.textContent = ''
|
| 93 |
+
if (window.innerWidth <= 768) result.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
| 94 |
stopNarration()
|
| 95 |
const header = `— Diary of ${(unit.value || 'a nameless soldier').trim()} —\n\n`
|
| 96 |
out.textContent = header
|
web/personaPanel.js
CHANGED
|
@@ -58,6 +58,7 @@ export function mountPersonaPanel(host) {
|
|
| 58 |
async function generate() {
|
| 59 |
if (busy) return
|
| 60 |
busy = true; btn.disabled = true
|
|
|
|
| 61 |
nameEl.textContent = '…'; aboutEl.textContent = ''; tagsEl.replaceChildren()
|
| 62 |
thinkEl.textContent = ''; thinkWrap.open = true; stats.textContent = ''
|
| 63 |
try {
|
|
|
|
| 58 |
async function generate() {
|
| 59 |
if (busy) return
|
| 60 |
busy = true; btn.disabled = true
|
| 61 |
+
if (window.innerWidth <= 768) result.scrollIntoView({ behavior: 'smooth', block: 'start' })
|
| 62 |
nameEl.textContent = '…'; aboutEl.textContent = ''; tagsEl.replaceChildren()
|
| 63 |
thinkEl.textContent = ''; thinkWrap.open = true; stats.textContent = ''
|
| 64 |
try {
|
web/shell/persona.css
CHANGED
|
@@ -119,6 +119,22 @@
|
|
| 119 |
.tts-status { min-height: 14px; }
|
| 120 |
|
| 121 |
@media (max-width: 768px) {
|
| 122 |
-
|
| 123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
}
|
|
|
|
| 119 |
.tts-status { min-height: 14px; }
|
| 120 |
|
| 121 |
@media (max-width: 768px) {
|
| 122 |
+
/* The whole view scrolls as one column (instead of two fighting scroll panes in
|
| 123 |
+
a fixed-height box), so the story gets real room and the page scrolls. */
|
| 124 |
+
.persona-view { flex-direction: column; height: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
|
| 125 |
+
.persona-controls {
|
| 126 |
+
width: 100%; border-right: 0; border-bottom: 2px solid var(--p-ink);
|
| 127 |
+
overflow: visible; flex-shrink: 0; gap: 6px;
|
| 128 |
+
padding: 54px 14px 16px; /* top clears the floating ☰ reopen button */
|
| 129 |
+
}
|
| 130 |
+
/* The generated content (persona / war story) gets the majority of the screen. */
|
| 131 |
+
.persona-result { flex: 1 0 auto; min-height: 62vh; padding: 18px 16px; overflow: visible; }
|
| 132 |
+
.persona-name { font-size: 26px; }
|
| 133 |
+
.persona-about { font-size: 16px; max-width: none; }
|
| 134 |
+
.persona-tags { margin: 10px 0 14px; }
|
| 135 |
+
.persona-think { max-height: 150px; }
|
| 136 |
+
/* 16px inputs avoid iOS focus-zoom; bigger pads = easier taps. */
|
| 137 |
+
.persona-input { font-size: 16px !important; padding: 10px !important; }
|
| 138 |
+
.model-select { font-size: 15px !important; padding: 9px 10px !important; }
|
| 139 |
+
.persona-go, .persona-go-alt { padding: 12px !important; }
|
| 140 |
}
|