mirror of
https://github.com/Pandipipas/scoreko-dev.git
synced 2026-06-06 03:32:06 +00:00
Evitar mostrar IDs custom en selector de jugador
This commit is contained in:
@@ -62,12 +62,22 @@ const onRightCountryFilter = (value: string, update: (callback: () => void) => v
|
|||||||
|
|
||||||
const playerOptions = computed(() => {
|
const playerOptions = computed(() => {
|
||||||
const base = [{ label: '(Sin asignar)', value: '' }];
|
const base = [{ label: '(Sin asignar)', value: '' }];
|
||||||
|
const custom = [
|
||||||
|
{
|
||||||
|
value: CUSTOM_LEFT_PLAYER_ID,
|
||||||
|
label: scoreboardStore.scoreboard.leftNameOverride || 'Jugador personalizado (izq)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: CUSTOM_RIGHT_PLAYER_ID,
|
||||||
|
label: scoreboardStore.scoreboard.rightNameOverride || 'Jugador personalizado (der)',
|
||||||
|
},
|
||||||
|
];
|
||||||
const entries = Object.entries(playersStore.players) as [string, Schemas.Players[string]][];
|
const entries = Object.entries(playersStore.players) as [string, Schemas.Players[string]][];
|
||||||
const options = entries.map(([id, player]) => ({
|
const options = entries.map(([id, player]) => ({
|
||||||
value: id,
|
value: id,
|
||||||
label: player.gamertag || id,
|
label: player.gamertag || id,
|
||||||
}));
|
}));
|
||||||
return base.concat(options);
|
return base.concat(custom).concat(options);
|
||||||
});
|
});
|
||||||
|
|
||||||
const leftSelectedPlayer = computed(() => playersStore.players[scoreboardStore.scoreboard.leftPlayerId]);
|
const leftSelectedPlayer = computed(() => playersStore.players[scoreboardStore.scoreboard.leftPlayerId]);
|
||||||
|
|||||||
Reference in New Issue
Block a user