Skip to content

Commit

Permalink
Render placeholder character when server is starting
Browse files Browse the repository at this point in the history
This fixes an annoying jump on load
  • Loading branch information
lorgan3 committed Jun 23, 2024
1 parent 3fa3831 commit 735bcc6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/components/pages/Host.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import TeamDialog from "../organisms/TeamDialog.vue";
import { IPlayer } from "../types";
import GameSettingsComponent from "../organisms/GameSettings.vue";
import MapSelect from "../organisms/MapSelect.vue";
import GameSettingsComponent from "../molecules/GameSettings.vue";
import { COLORS } from "../../data/network/constants";
const { onPlay } = defineProps<{
onPlay: (key: string, map: Map | Config, settings: GameSettings) => void;
Expand Down Expand Up @@ -228,6 +228,14 @@ const handleSelectMap = (map: Map, name: string) => {
</h2>

<div class="teams">
<TeamDisplay
v-if="players.length === 0"
:player="{
name: settings.name,
color: COLORS.at(-1)!,
team: settings.team,
}"
/>
<TeamDisplay
v-for="(player, index) in players"
:key="player.color"
Expand Down

0 comments on commit 735bcc6

Please sign in to comment.