ux mejoras

This commit is contained in:
2025-08-28 18:31:11 -06:00
parent fa46d3d106
commit 6f2f7a4e12
2 changed files with 63 additions and 65 deletions

View File

@@ -41,6 +41,12 @@
placeholder="Ingresa tu nombre"
class="name-input"
maxlength="20"
autocomplete="off"
autocapitalize="off"
autocorrect="off"
spellcheck="false"
name="sg_player_name"
inputmode="text"
/>
<button @click="updateName" class="btn btn-secondary">Confirmar Nombre</button>
</div>
@@ -182,7 +188,7 @@ onMounted(async () => {
const room = await colyseusService.joinLobby();
colorInput.value = colyseusService.playerColor.value || '#667eea';
inputName.value = colyseusService.playerName.value || '';
// Mantener el input vacío por defecto; no precargar nombres previos
let resumed = false;
const guardResume = () => { if (resumed) return true; resumed = true; return false; };
@@ -461,7 +467,8 @@ function dismissBanner() {
function startEditName() {
editingName.value = true;
inputName.value = colyseusService.playerName.value || '';
// Siempre iniciar la edición con el campo vacío (sin sugerencias)
inputName.value = '';
nextTick(() => {
nameInputRef.value?.focus();
});