abre UUID en nueva pestaña en lugar de redirigir
- Cambia comportamiento de selectUuid() para usar window.open() - Aplica también a botón "Seleccionar Aleatorio" - Mantiene comportamiento de QR modal cuando modo QR está activo - Mejora flujo de trabajo para abrir múltiples jugadores
This commit is contained in:
@@ -206,15 +206,23 @@ function selectUuid(uuid: string) {
|
||||
printQR(uuidInfo);
|
||||
}
|
||||
} else {
|
||||
// Normal behavior: navigate to the UUID
|
||||
router.push(`/${uuid}`);
|
||||
// Open in new tab instead of redirecting
|
||||
const url = `${window.location.origin}/${uuid}`;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
}
|
||||
|
||||
function selectRandom() {
|
||||
if (allUuids.value.length > 0) {
|
||||
const randomUuidInfo = allUuids.value[Math.floor(Math.random() * allUuids.value.length)];
|
||||
selectUuid(randomUuidInfo.uuid);
|
||||
if (qrMode.value) {
|
||||
// Show QR modal if in QR mode
|
||||
printQR(randomUuidInfo);
|
||||
} else {
|
||||
// Open in new tab
|
||||
const url = `${window.location.origin}/${randomUuidInfo.uuid}`;
|
||||
window.open(url, '_blank');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user