Files
NightSpire/web-next/app/armory.css
T
Inna 65f6776969 Armería: búsqueda insensible a mayúsculas, autocompletar y proxy del visor 3D
Tres arreglos:

1) Búsqueda insensible a mayúsculas/minúsculas. Las consultas usaban LIKE directo
   (sensible según la colación de la tabla), así que 'test' no encontraba 'Test'.
   Ahora comparan con LOWER(col) LIKE LOWER(?).

2) Autocompletar tipo wowhead. Nuevo /api/armory/suggest + ArmorySearchBox
   reescrito: al teclear (≥1 carácter, con debounce) muestra un desplegable con
   personajes, ítems y hermandades que coinciden; clic va directo a la ficha/wowhead.
   Enter o el botón siguen haciendo la búsqueda completa.

3) Visor 3D «no disponible». Causa: el contenido de wow.zamimg.com/modelviewer no
   envía cabeceras CORS (el propio README de wow-model-viewer pide un proxy). Se
   añade un rewrite en next.config (/modelviewer/* -> zamimg) para servirlo
   same-origin, y el visor usa esas rutas. Además, si falla la resolución de ítems
   se renderiza el personaje sin equipo, y los errores se registran en consola para
   diagnóstico.

Verificado: 'test' encuentra 'Test'; el autocompletar responde; el proxy
/modelviewer/live/viewer/viewer.min.js sirve 200 same-origin.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-16 14:41:06 +00:00

89 lines
4.5 KiB
CSS

/* Estilos de la armería, en la línea del tema (oscuro + dorado #d79602). Reutiliza
main-wide, nice_button, forum-input y los colores de calidad qN de forum.css. */
.armory-search { position: relative; margin: 10px 0 18px; }
.armory-search-form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.armory-search .forum-input { flex: 1 1 260px; margin: 0; }
/* Desplegable de autocompletar (tipo wowhead) */
.armory-suggest {
position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 50; max-height: 420px; overflow-y: auto;
background: #14110d; border: 1px solid #2a2723; border-radius: 4px;
box-shadow: 0 8px 24px rgba(0, 0, 0, .6);
}
.armory-suggest-group { border-bottom: 1px solid #201d18; }
.armory-suggest-group:last-child { border-bottom: 0; }
.armory-suggest-head {
font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #6d6a5e; font-weight: bold;
padding: 6px 12px; background: rgba(255, 255, 255, .02);
}
.armory-suggest-item {
display: flex; justify-content: space-between; align-items: center; gap: 10px; width: 100%;
padding: 8px 12px; background: none; border: 0; cursor: pointer; text-align: left; text-decoration: none;
font-size: 13px; font-weight: bold; color: #d4cdbb; transition: background .1s;
}
.armory-suggest-item:hover { background: rgba(255, 255, 255, .05); }
.armory-suggest-sub { font-size: 11px; color: #6d6a5e; font-weight: normal; white-space: nowrap; }
.armory-tabs { display: flex; gap: 6px; border-bottom: 1px solid #2a2723; margin-bottom: 16px; flex-wrap: wrap; }
.armory-tab {
padding: 8px 16px; color: #8a8578; text-decoration: none; font-weight: bold; text-transform: uppercase;
font-size: 13px; border-bottom: 2px solid transparent; transition: all .15s;
}
.armory-tab:hover { color: #d79602; }
.armory-tab.active { color: #d79602; border-bottom-color: #d79602; }
.armory-hint { color: #6d6a5e; text-align: center; padding: 24px 0; }
.armory-list { display: flex; flex-direction: column; gap: 6px; }
.armory-row {
display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
padding: 10px 14px; border-radius: 3px; text-decoration: none;
background: rgba(0, 0, 0, .18); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
transition: background .15s;
}
a.armory-row:hover { background: rgba(255, 255, 255, .05); }
.armory-name { font-weight: bold; font-size: 14px; color: #d4cdbb; text-decoration: none; }
a.armory-name:hover { text-decoration: underline; }
.armory-meta { font-size: 12px; color: #6d6a5e; }
/* Ficha de personaje: dos columnas (modelo 3D | equipo). */
.armory-char { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.armory-char-left { flex: 1 1 320px; }
.armory-char-right { flex: 1 1 320px; }
.armory-char-name { font-size: 28px; font-weight: bold; margin: 0; }
.armory-char-sub { color: #8a8578; font-size: 14px; margin: 6px 0 10px; }
.armory-char-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.armory-faction { font-size: 11px; text-transform: uppercase; font-weight: bold; padding: 2px 8px; border-radius: 3px; }
.armory-faction.alliance { color: #4a90d9; background: rgba(74, 144, 217, .12); }
.armory-faction.horde { color: #cc3038; background: rgba(204, 48, 56, .12); }
.armory-status { font-size: 11px; text-transform: uppercase; font-weight: bold; }
.armory-status.online { color: #1eff00; }
.armory-status.offline { color: #6d6a5e; }
.armory-guild-tag { color: #8a8578; font-size: 13px; text-decoration: none; }
.armory-guild-tag:hover { color: #d79602; }
.armory-section-title { font-size: 15px; text-transform: uppercase; color: #8a8578; margin: 0 0 12px; }
.armory-equip { display: flex; flex-direction: column; gap: 4px; }
.armory-equip-slot {
display: flex; justify-content: space-between; align-items: center; gap: 10px;
padding: 7px 12px; border-radius: 3px; background: rgba(0, 0, 0, .18);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.armory-equip-slot.empty { opacity: .45; }
.armory-item { font-weight: bold; font-size: 13px; text-decoration: none; }
.armory-item:hover { text-decoration: none; }
.armory-slot-name { font-size: 11px; color: #6d6a5e; text-align: right; white-space: nowrap; }
/* Visor 3D */
.armory-model {
margin-top: 8px; border-radius: 3px; overflow: hidden; background: rgba(0, 0, 0, .3);
box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .03);
}
.armory-model-canvas { width: 100%; height: 420px; }
.armory-model .armory-hint { padding: 12px; }
@media (max-width: 767px) {
.armory-model-canvas { height: 320px; }
}