mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-09 19:59:27 +02:00
Reverted, fixed problems
This commit is contained in:
@@ -185,18 +185,21 @@
|
||||
height: 50px;
|
||||
border-radius: 18px;
|
||||
margin-left: 455px;
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: auto auto auto;
|
||||
gap: 10px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.crash-history__component {
|
||||
background: linear-gradient(#18213E, #263873);
|
||||
width: 12%;
|
||||
.grid-item {
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
border: 1px solid rgba(0, 0, 0, 0.8);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.crash-history__element {
|
||||
height: 80%;
|
||||
display: inline;
|
||||
margin: auto;
|
||||
border-radius: 10px;
|
||||
border-radius: 18px;
|
||||
background: rgba(34, 37, 47, 0.8);
|
||||
}
|
||||
|
||||
/* Crash-Players */
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
import { BackendApiUrl } from '@/properties/Сonfig.js';
|
||||
import { GetCookie } from "@/assets/js/storage/CookieStorage";
|
||||
|
||||
|
||||
|
||||
export async function GetReferralData () {
|
||||
|
||||
const myHeaders = new Headers();
|
||||
|
||||
@@ -1,24 +1,5 @@
|
||||
import { BackendApiUrl } from '@/properties/Сonfig.js';
|
||||
|
||||
|
||||
export async function CrashHistory () {
|
||||
const myHeaders = new Headers();
|
||||
myHeaders.append("Cookie", "ARRAffinity=a6e48b9e9d2653435be7b61998d8624b44115214104213d6c8b8c526cc56dc70; ARRAffinitySameSite=a6e48b9e9d2653435be7b61998d8624b44115214104213d6c8b8c526cc56dc70");
|
||||
|
||||
const requestOptions = {
|
||||
method: "POST",
|
||||
headers: myHeaders,
|
||||
redirect: "follow"
|
||||
};
|
||||
|
||||
fetch("https://spsystemcore20231122004605.azurewebsites.net/api/GameCrash/GetCrashXHistory", requestOptions)
|
||||
.then((response) => response.text())
|
||||
.then((result) => console.log(result))
|
||||
.catch((error) => console.error(error));
|
||||
}
|
||||
|
||||
|
||||
|
||||
export async function JoinCrashGame(userData, amount) {
|
||||
const data = {
|
||||
userCredentials: {
|
||||
|
||||
@@ -63,24 +63,20 @@
|
||||
<ul class="user-list" v-if="crashObject.Players.length">
|
||||
<li class="user-crash" v-for="(player, index) in crashObject.Players.sort((a, b) => b.Bid - a.Bid)" :key="index">
|
||||
<div class="user-crash-content" :class="{ 'user-crash-content__lose' : crashObject.Status === 'GameEnd' && player.WinningX <= 0, 'user-crash-content__win' : player.WinningX >= 1 }">
|
||||
|
||||
<div class="user-name-crash">
|
||||
<img class="user-crash__icon" :src="`https://avatar.spworlds.ru/face/55/${player.UserName}`">
|
||||
<h2>{{ player.UserName }}</h2>
|
||||
</div>
|
||||
|
||||
<div class="user-bid-crash">
|
||||
<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 <= 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>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -105,7 +101,7 @@ import SaperNumbers from "@/mocks/SaperNumbers";
|
||||
import {GetCurrentMoney} from "@/assets/js/rest/RestMethods";
|
||||
import {GetCookie} from "@/assets/js/storage/CookieStorage";
|
||||
import {eventBus} from "@/main";
|
||||
import {ExitAndTakeMoneyFromCrashGame, JoinCrashGame, CrashHistory} from "@/assets/js/games/crash/CrashAPI";
|
||||
import {ExitAndTakeMoneyFromCrashGame, JoinCrashGame} from "@/assets/js/games/crash/CrashAPI";
|
||||
|
||||
export default {
|
||||
components: { HeaderComponent, AsideBarComponent, ChatComponent, CrashGraphComponent },
|
||||
@@ -231,9 +227,13 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
props: ["payments"],
|
||||
async created() {
|
||||
this.CHistory = await CrashHistory();
|
||||
if (GetCookie('AUTHTOKEN') && GetCookie('SearchToken')) {
|
||||
await GetCurrentMoney(GetCookie('AUTHTOKEN'), GetCookie('SearchToken'))
|
||||
.then((response) => {
|
||||
this.balance = response.currentMoney
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
async updateUserMoney() {
|
||||
|
||||
Reference in New Issue
Block a user