mirror of
https://github.com/Pandipipas/scoreko-dev.git
synced 2026-06-06 03:32:06 +00:00
Arreglar selección de jugador existente en ScoreboardPanel
This commit is contained in:
@@ -14,6 +14,8 @@ const leftInput = ref('');
|
|||||||
const rightInput = ref('');
|
const rightInput = ref('');
|
||||||
const leftFocused = ref(false);
|
const leftFocused = ref(false);
|
||||||
const rightFocused = ref(false);
|
const rightFocused = ref(false);
|
||||||
|
const leftIgnoreInputSync = ref(false);
|
||||||
|
const rightIgnoreInputSync = ref(false);
|
||||||
|
|
||||||
const leftCountryInput = ref('');
|
const leftCountryInput = ref('');
|
||||||
const rightCountryInput = ref('');
|
const rightCountryInput = ref('');
|
||||||
@@ -202,6 +204,8 @@ const onLeftSelect = (playerId: string) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
leftIgnoreInputSync.value = true;
|
||||||
|
leftFocused.value = false;
|
||||||
scoreboardStore.scoreboard.leftNameOverride = '';
|
scoreboardStore.scoreboard.leftNameOverride = '';
|
||||||
leftFilter.value = '';
|
leftFilter.value = '';
|
||||||
leftInput.value = getPlayerLabel(playerId);
|
leftInput.value = getPlayerLabel(playerId);
|
||||||
@@ -214,6 +218,8 @@ const onRightSelect = (playerId: string) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
rightIgnoreInputSync.value = true;
|
||||||
|
rightFocused.value = false;
|
||||||
scoreboardStore.scoreboard.rightNameOverride = '';
|
scoreboardStore.scoreboard.rightNameOverride = '';
|
||||||
rightFilter.value = '';
|
rightFilter.value = '';
|
||||||
rightInput.value = getPlayerLabel(playerId);
|
rightInput.value = getPlayerLabel(playerId);
|
||||||
@@ -309,6 +315,11 @@ const saveRightSelectedPlayerChanges = () => {
|
|||||||
watch(
|
watch(
|
||||||
leftInput,
|
leftInput,
|
||||||
(value) => {
|
(value) => {
|
||||||
|
if (leftIgnoreInputSync.value) {
|
||||||
|
leftIgnoreInputSync.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!leftFocused.value) {
|
if (!leftFocused.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -323,6 +334,11 @@ watch(
|
|||||||
watch(
|
watch(
|
||||||
rightInput,
|
rightInput,
|
||||||
(value) => {
|
(value) => {
|
||||||
|
if (rightIgnoreInputSync.value) {
|
||||||
|
rightIgnoreInputSync.value = false;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!rightFocused.value) {
|
if (!rightFocused.value) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user