fix many indicators
This commit is contained in:
parent
9a02235eba
commit
46f7d04e2c
@ -39,11 +39,6 @@ const themeIcon = computed(() => dark.value ? 'mdi-moon-waxing-crescent' : 'mdi-
|
|||||||
|
|
||||||
const { status, data, send, open } = useWebSocket<string>(`wss://${window.location.host}/queue`, {
|
const { status, data, send, open } = useWebSocket<string>(`wss://${window.location.host}/queue`, {
|
||||||
immediate: false,
|
immediate: false,
|
||||||
onDisconnected: (_ws, evt) => {
|
|
||||||
console.warn('lost connection', { evt });
|
|
||||||
game.value = null;
|
|
||||||
dealer.value = null;
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
const game = ref<Game | null>(null);
|
const game = ref<Game | null>(null);
|
||||||
const dealer = ref<boolean | null>(null);
|
const dealer = ref<boolean | null>(null);
|
||||||
|
@ -6,13 +6,16 @@
|
|||||||
</v-sheet>
|
</v-sheet>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row class="d-flex flex-fill justify-center">
|
<v-row class="d-flex flex-fill justify-center">
|
||||||
<v-alert :text="msg" class="mt-2 text-button" density="compact"></v-alert>
|
<v-alert :text="msg" class="d-flex justify-center mt-2 text-button" density="compact"></v-alert>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row v-if="shellList.length > 0">
|
<v-row v-if="shellList.length > 0">
|
||||||
<v-sheet class="d-flex justify-center mt-2" :elevation="2">
|
<v-sheet class="d-flex justify-center mt-2" :elevation="2">
|
||||||
{{ shellList }}
|
{{ shellList }}
|
||||||
</v-sheet>
|
</v-sheet>
|
||||||
</v-row>
|
</v-row>
|
||||||
|
<v-row v-if="revealed != null">
|
||||||
|
<v-alert :text="revealed" class="d-flex justify-center mt-2 text-button" density="compact"></v-alert>
|
||||||
|
</v-row>
|
||||||
</v-container>
|
</v-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -37,7 +40,7 @@ const actionMessages: Record<Game["action"], (game: Game) => string> = {
|
|||||||
Shoot: (game) => game.previous ? "THE PAIN..." : "A BLANK CLATTERS ON THE TABLE",
|
Shoot: (game) => game.previous ? "THE PAIN..." : "A BLANK CLATTERS ON THE TABLE",
|
||||||
GameEnd: () => "THE DEALER RELOADS THE SHOTGUN",
|
GameEnd: () => "THE DEALER RELOADS THE SHOTGUN",
|
||||||
BeerGameEnd: () => "THE LAST SHELL CLATTERS ON THE TABLE",
|
BeerGameEnd: () => "THE LAST SHELL CLATTERS ON THE TABLE",
|
||||||
ChallengerWins: (game) => game.round < 3 ? "THE DEALER FALLS... BRIEFLY" : "THE DEALER FALLS... FOREVER",
|
ChallengerWins: (game) => game.winner != null ? "THE DEALER FALLS... BRIEFLY" : "THE DEALER FALLS... FOREVER",
|
||||||
DealerWins: () => "THE CHALLENGER FALLS",
|
DealerWins: () => "THE CHALLENGER FALLS",
|
||||||
Lens: (game) => `THE ${game.dealer ? "DEALER" : "CHALLENGER"} PEERS INTO THE CHAMBER`,
|
Lens: (game) => `THE ${game.dealer ? "DEALER" : "CHALLENGER"} PEERS INTO THE CHAMBER`,
|
||||||
Cig: (game) => `THE ${game.dealer ? "DEALER" : "CHALLENGER"} TAKES A DRAG`,
|
Cig: (game) => `THE ${game.dealer ? "DEALER" : "CHALLENGER"} TAKES A DRAG`,
|
||||||
@ -56,6 +59,16 @@ const msg = computed(() => {
|
|||||||
return f(props.game);
|
return f(props.game);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const revealed = computed(() => {
|
||||||
|
if (props.game.shell === true) {
|
||||||
|
return 'INSIDE, YOU SEE 🟥';
|
||||||
|
}
|
||||||
|
if (props.game.shell === false) {
|
||||||
|
return 'INSIDE, YOU SEE 🟦';
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
})
|
||||||
|
|
||||||
const shellList = ref<string[]>([]);
|
const shellList = ref<string[]>([]);
|
||||||
watch(props.game, (game) => {
|
watch(props.game, (game) => {
|
||||||
if (game.live == null || game.blank == null) {
|
if (game.live == null || game.blank == null) {
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<v-container>
|
<v-container>
|
||||||
<v-row :class="closeClass">
|
<v-row :class="closeClass">
|
||||||
|
<v-sheet v-if="props.dealer && stats.cuffs" class="mr-4 text-button" :elevation="2">CUFFED</v-sheet>
|
||||||
<PlayerHP :hp="props.stats.hp" />
|
<PlayerHP :hp="props.stats.hp" />
|
||||||
|
<v-sheet v-if="!props.dealer && stats.cuffs" class="ml-4 text-button" :elevation="2">CUFFED</v-sheet>
|
||||||
</v-row>
|
</v-row>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="4"></v-col>
|
<v-col cols="4"></v-col>
|
||||||
|
Loading…
Reference in New Issue
Block a user