utopia-ia/elffuss-claw public
Changesets · Branches · Tags · Compare
| Changeset | e28a6a0b8e80a0b437b1645e044e8f80e66306c389618b4a0b9e60b4e13a5db9 |
|---|---|
| Author | KikoCis <kikocisneros@gmail.com> · 2026-10-11 18:30 +02:00 |
| Committer | KikoCis <kikocisneros@gmail.com> · 2026-10-11 18:30 +02:00 |
| Parents | 2401d59705ea |
5 files changed
modified tests/ux-modelo.mjs +5 −0
| @@ -41,6 +41,11 @@ | ||
| 41 | 41 | await p.evaluate(() => document.getElementById('loading-stage') ? 'escaparate puesto' : 'sin placeholder')); |
| 42 | 42 | ok('el selector se llama «Cerebro (modelo de IA)» y el punto dice su estado', await p.getAttribute('#model-select', 'aria-label') === 'Cerebro (modelo de IA)' |
| 43 | 43 | && await p.getAttribute('#model-status', 'aria-label') === 'Modelo listo'); |
| 44 | +// …y lo dice también a la vista, con palabras: el punto solo era un color. | |
| 45 | +ok('junto al punto, el estado en palabras («Listo»), visible', await p.evaluate(() => { | |
| 46 | + const t = document.getElementById('model-status-txt'); | |
| 47 | + return t?.textContent === 'Listo' && t.getClientRects().length > 0 && getComputedStyle(t).visibility !== 'hidden'; | |
| 48 | +})); | |
| 44 | 49 | |
| 45 | 50 | await p.click('#tabs button[data-tab="ajustes"]'); |
| 46 | 51 | await p.evaluate(() => { |
modified web/css/elffuss.css +6 −1
| @@ -70,11 +70,15 @@ | ||
| 70 | 70 | padding: 6px 8px; |
| 71 | 71 | font-size: .85rem; |
| 72 | 72 | } |
| 73 | -.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; } | |
| 73 | +.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; } | |
| 74 | 74 | .dot.off { background: #4a5062; } |
| 75 | 75 | .dot.loading { background: var(--warn); animation: pulse 1.2s ease-in-out infinite; } |
| 76 | 76 | .dot.on { background: var(--ok); } |
| 77 | 77 | .dot.gpu { background: var(--accent2); box-shadow: 0 0 8px var(--accent2); } |
| 78 | +/* El estado del cerebro en palabras, junto al punto (el color solo no basta). | |
| 79 | + El margen negativo lo arrima al punto: el hueco entre controles es mayor. */ | |
| 80 | +.model-st-txt { font-size: .72rem; color: var(--muted); white-space: nowrap; flex: none; margin-left: -5px; } | |
| 81 | +.model-st-txt.loading { color: var(--warn); } | |
| 78 | 82 | @keyframes pulse { 50% { opacity: .35; } } |
| 79 | 83 | |
| 80 | 84 | /* ---------- layout ---------- */ |
| @@ -489,6 +493,7 @@ | ||
| 489 | 493 | .brand { flex: none; } |
| 490 | 494 | .brand b, #model-ico, .model-card { display: none; } |
| 491 | 495 | #btn-clear, #btn-perms { padding: 7px 9px; font-size: .78rem; } |
| 496 | + .model-st-txt { margin-left: -2px; font-size: .68rem; } | |
| 492 | 497 | |
| 493 | 498 | #log { padding: 10px; } |
| 494 | 499 | .msg { max-width: 100%; font-size: .9rem; } |
modified web/index.html +3 −0
| @@ -39,6 +39,9 @@ | ||
| 39 | 39 | </label> |
| 40 | 40 | <a id="model-card" class="model-card" target="_blank" rel="noopener noreferrer" hidden>ⓘ</a> |
| 41 | 41 | <span id="model-status" class="dot off" role="img" title="estado del modelo"></span> |
| 42 | + <!-- El estado también en palabras, a la vista: el punto solo era un color. Para | |
| 43 | + un lector de pantalla ya lo dice el aria-label del punto. --> | |
| 44 | + <span id="model-status-txt" class="model-st-txt" aria-hidden="true"></span> | |
| 42 | 45 | <button id="btn-clear" class="ghost icon-btn" title="Nueva conversación"></button> |
| 43 | 46 | <button id="btn-mind" class="ghost icon-btn" title="Mente de Elffuss — cerebro autónomo">🧠</button> |
| 44 | 47 | <button id="disk-chip" class="ghost" hidden></button> |
modified web/js/i18n.js +3 −0
| @@ -265,6 +265,8 @@ | ||
| 265 | 265 | webResults: 'Resultados para «{q}»:', webNoResults: 'Sin resultados para «{q}».', |
| 266 | 266 | webImagesBad: 'respuesta inesperada del buscador de imágenes', webNoImages: 'Sin imágenes para «{q}».', |
| 267 | 267 | webGallery: 'Galería con {n} imágenes de «{q}» abierta en el visualizador.', |
| 268 | + // Estado del cerebro en corto, a la vista junto al punto (ui.modelStatus) | |
| 269 | + modelStOffShort: 'Básico', modelStLoadingShort: 'Cargando…', modelStOnShort: 'Listo', modelStGpuShort: 'Listo · GPU', | |
| 268 | 270 | }, |
| 269 | 271 | en: { |
| 270 | 272 | welcome: 'An operating system with a soul that lives in your browser. Here apps aren’t installed: they’re created when you ask, appearing on the right. I can use your folders (with permission), store encrypted secrets, schedule tasks and browse for you. Everything stays on your machine.', |
| @@ -512,6 +514,7 @@ | ||
| 512 | 514 | webResults: 'Results for “{q}”:', webNoResults: 'No results for “{q}”.', |
| 513 | 515 | webImagesBad: 'unexpected answer from the image search', webNoImages: 'No images for “{q}”.', |
| 514 | 516 | webGallery: 'Gallery with {n} images of “{q}” open in the viewer.', |
| 517 | + modelStOffShort: 'Basic', modelStLoadingShort: 'Loading…', modelStOnShort: 'Ready', modelStGpuShort: 'Ready · GPU', | |
| 515 | 518 | }, |
| 516 | 519 | uk: { |
| 517 | 520 | claim: "застосунків не існує: їх створюють", |
modified web/js/ui.js +7 −1
| @@ -864,10 +864,16 @@ | ||
| 864 | 864 | export function modelStatus(state) { // 'off' | 'loading' | 'on' | 'gpu' |
| 865 | 865 | const d = $('model-status'); |
| 866 | 866 | d.className = 'dot ' + state; |
| 867 | - // El punto solo era color (y un title en español): ahora dice el estado. | |
| 867 | + // El punto solo era color (y un title en español): ahora dice el estado, en su | |
| 868 | + // nombre accesible y, en corto, con palabras a la vista junto a él. | |
| 868 | 869 | const txt = tr({ off: 'modelStOff', loading: 'modelStLoading', on: 'modelStOn', gpu: 'modelStGpu' }[state] || 'modelStOff'); |
| 869 | 870 | d.title = txt; |
| 870 | 871 | d.setAttribute('aria-label', txt); |
| 872 | + const corto = $('model-status-txt'); | |
| 873 | + if (corto) { | |
| 874 | + corto.textContent = tr({ off: 'modelStOffShort', loading: 'modelStLoadingShort', on: 'modelStOnShort', gpu: 'modelStGpuShort' }[state] || 'modelStOffShort'); | |
| 875 | + corto.className = 'model-st-txt ' + state; | |
| 876 | + } | |
| 871 | 877 | } |
| 872 | 878 | |
| 873 | 879 | // ---------- selector de modelo (dinámico) ---------- |