mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
added finaly version for player list crash
This commit is contained in:
@@ -228,11 +228,17 @@
|
||||
.user-bid-crash {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
font-size: 20px;
|
||||
align-items: center;
|
||||
grid-area: bid;
|
||||
}
|
||||
|
||||
.user-bid-crash h2 {
|
||||
color: #848484;
|
||||
font-weight: 700;
|
||||
font-family: 'Montserrat';
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.user-bid-crash img {
|
||||
margin: 5px 0 0 5px;
|
||||
}
|
||||
@@ -247,6 +253,43 @@
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.wingame__win-bid-crash {
|
||||
color: #28BD49 !important;
|
||||
}
|
||||
|
||||
.ingame-crash {
|
||||
color: #61647F;
|
||||
font-family: 'Montserrat';
|
||||
font-weight: 700;
|
||||
font-size: 12px;
|
||||
background: #22252F;
|
||||
box-shadow: 0px 4px 4px 0px #00000040;
|
||||
border-radius: 5px;
|
||||
width: 70px;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.lostgame-crash {
|
||||
color: #fff;
|
||||
font-weight: 700;
|
||||
font-family: 'Montserrat';
|
||||
background: #EF4847;
|
||||
box-shadow: 0px 4px 4px 0px #00000040;
|
||||
border-radius: 5px;
|
||||
margin-left: -26px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.wingame-crash {
|
||||
box-shadow: 0px 4px 4px 0px #00000040;
|
||||
font-family: 'Montserrat';
|
||||
font-weight: 700;
|
||||
color: #28BD49;
|
||||
border: 1px solid #28BD49;
|
||||
border-radius: 5px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
.ratio {
|
||||
position: relative;
|
||||
left: 50%;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<h2>{{ textError }}</h2>
|
||||
</div>
|
||||
<div class="crash-game-window__btn-start">
|
||||
<button v-if="startGame && crashObject.Status !== 'WaitingForPlayers'" @click="clickClaimDep" class="claim-btn-crash__prize">Забрать {{ getUserPrize.toFixed(2) }} АР</button>
|
||||
<button v-if="startGame && crashObject.Status !== 'WaitingForPlayers'" @click="clickClaimDep" class="claim-btn-crash__prize">Забрать</button>
|
||||
<button v-if="startGame && crashObject.Status === 'WaitingForPlayers'" class="waiting-btn-crash">Ожидание игроков...</button>
|
||||
<button v-if="!startGame" :disabled="offBtn" @click="clickPlayBtn" :class="{ 'animate-start-btn': ErrorClick }">Начать игру</button>
|
||||
</div>
|
||||
@@ -59,11 +59,12 @@
|
||||
<h2>{{ player.UserName }}</h2>
|
||||
</div>
|
||||
<div class="user-bid-crash">
|
||||
<h2>{{ player.Bid }}</h2>
|
||||
<h2 v-if="player.WinningMoney >= 1" class="wingame__win-bid-crash">{{ player.WinningMoney.toFixed(2) }}</h2>
|
||||
<h2 v-else>{{ player.Bid }}</h2>
|
||||
<img src="@/assets/icons-games/saper-game/icon-diamond-ore-saper.png">
|
||||
</div>
|
||||
<div class="user-game-status-crash">
|
||||
<h2 class="ingame-crash" v-if="crashObject.Status === 'WaitingForPlayers' && player.WinningX <= 0 || crashObject.Status === 'InGame' && player.WinningX <= 0">В игре</h2>
|
||||
<h2 class="ingame-crash" v-if="crashObject.Status === 'WaitingForPlayers' && player.WinningX <= 1 || crashObject.Status === 'InGame' && player.WinningX <= 0">В игре</h2>
|
||||
<h2 class="lostgame-crash" v-if="crashObject.Status === 'GameEnd' && player.WinningX <= 0">Проиграл</h2>
|
||||
<h2 class="wingame-crash" v-if="player.WinningX >= 1">{{ player.WinningX.toFixed(2) }}x</h2>
|
||||
</div>
|
||||
@@ -109,18 +110,6 @@ export default {
|
||||
offBtn: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
getUserPrize() {
|
||||
const currentUser = this.crashObject.Players.find(player => player.UserName === GetCookie('SpUserName'));
|
||||
|
||||
if (currentUser && currentUser.UserGameState !== 'Win') {
|
||||
return currentUser.Bid * this.crashObject.CurrentX
|
||||
}
|
||||
else {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
},
|
||||
setup() {
|
||||
return { v$: useVuelidate() }
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user