mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
added jackpot-history page
This commit is contained in:
@@ -125,6 +125,22 @@ button {
|
|||||||
grid-gap: 0.625rem;
|
grid-gap: 0.625rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jackpot-history__content-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-auto-columns: 1fr;
|
||||||
|
grid-template-columns: 0.35fr repeat(5, 1fr) 1fr;
|
||||||
|
grid-template-rows: auto 0fr repeat(4, 1fr);
|
||||||
|
grid-template-areas:
|
||||||
|
"menu header header header header header header"
|
||||||
|
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat"
|
||||||
|
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat"
|
||||||
|
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat"
|
||||||
|
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat"
|
||||||
|
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat"
|
||||||
|
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat";
|
||||||
|
grid-gap: 0.625rem;
|
||||||
|
}
|
||||||
|
|
||||||
.grid-crash {
|
.grid-crash {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 0.35fr repeat(5, 1fr) 1fr;
|
grid-template-columns: 0.35fr repeat(5, 1fr) 1fr;
|
||||||
@@ -227,6 +243,13 @@ button {
|
|||||||
margin: 0.625rem 2.438rem 1.125rem 1.125rem; */
|
margin: 0.625rem 2.438rem 1.125rem 1.125rem; */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.jackpot-history {
|
||||||
|
grid-area: jackpot-history;
|
||||||
|
background: #17181C;
|
||||||
|
border-radius: 20px;
|
||||||
|
height: 97%;
|
||||||
|
}
|
||||||
|
|
||||||
.double {
|
.double {
|
||||||
display: flex;
|
display: flex;
|
||||||
grid-area: double;
|
grid-area: double;
|
||||||
|
|||||||
@@ -85,3 +85,25 @@ export async function JoinJackpotGame(userData, amount) {
|
|||||||
console.log('Fetch error')
|
console.log('Fetch error')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function getJackpotHistoryGame () {
|
||||||
|
try {
|
||||||
|
const response = await fetch(`${BackendApiUrl}/GameJackpot/GetNewestJackpotGames`, {
|
||||||
|
method: 'POST',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
},
|
||||||
|
redirect: "follow"
|
||||||
|
})
|
||||||
|
|
||||||
|
if (!response.ok) {
|
||||||
|
console.log('Fetch error:', response.status)
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(response)
|
||||||
|
return await response.json()
|
||||||
|
}
|
||||||
|
catch (error) {
|
||||||
|
console.log('Fetch error')
|
||||||
|
}
|
||||||
|
}
|
||||||
70
luckydiamond/src/pages/JackpothistoryPage.vue
Normal file
70
luckydiamond/src/pages/JackpothistoryPage.vue
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
t<template>
|
||||||
|
<div class="jackpot-history__content-grid">
|
||||||
|
<aside-bar-element/>
|
||||||
|
|
||||||
|
<chat-component/>
|
||||||
|
|
||||||
|
<header-element-page/>
|
||||||
|
|
||||||
|
<div class="jackpot-history">
|
||||||
|
<div class="jackpot-history__content">
|
||||||
|
<ul class="jackpot-history__element">
|
||||||
|
<li v-for="(game, index) in historyGame" :key="index">
|
||||||
|
<div class="abc">
|
||||||
|
<div class="jackpot-history__element">
|
||||||
|
<div class="element-info">
|
||||||
|
<div class="element-info__icon">
|
||||||
|
<img :src="`https://avatar.spworlds.ru/face/55/${game.winnerUserName}`">
|
||||||
|
</div>
|
||||||
|
<div class="element-info__user-info">
|
||||||
|
<h2 class="username">{{ game.winnerUserName }}</h2>
|
||||||
|
<h2 class="user-deposit">
|
||||||
|
{{ game.winStake.toFixed(2) }}
|
||||||
|
<span class="img-width"><img src="@/assets/icons-profile/icon-diamond-ore.png"></span>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="element-chance">
|
||||||
|
<h2>
|
||||||
|
Шанс <span class="chance-style">{{ game.winnerPercentage.toFixed(2) }}%</span>
|
||||||
|
</h2>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { onMounted, reactive } from "vue";
|
||||||
|
|
||||||
|
import ChatComponent from "@/components/ChatComponent.vue";
|
||||||
|
import AsideBarElement from "@/components/AsidebarComponent.vue";
|
||||||
|
import HeaderElementPage from "@/components/HeaderComponent.vue";
|
||||||
|
|
||||||
|
import '@/assets/css/PagesStyles/jackpot-history.css'
|
||||||
|
import {getJackpotHistoryGame} from "@/assets/js/jackpot/JackpotLogic";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
components: {HeaderElementPage, ChatComponent, AsideBarElement},
|
||||||
|
setup() {
|
||||||
|
let historyGame = reactive({})
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getJackpotHistoryGame()
|
||||||
|
.then(response => {
|
||||||
|
Object.assign(historyGame, response)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
return { historyGame }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -6,6 +6,7 @@ import SapergamePage from "@/pages/games-pages/SapergamePage.vue";
|
|||||||
import SettingsPage from "@/pages/SettingsPage.vue";
|
import SettingsPage from "@/pages/SettingsPage.vue";
|
||||||
import CrashGamePage from "@/pages/games-pages/CrashgamePage.vue";
|
import CrashGamePage from "@/pages/games-pages/CrashgamePage.vue";
|
||||||
import JackpotPage from "@/pages/games-pages/JackpotPage.vue";
|
import JackpotPage from "@/pages/games-pages/JackpotPage.vue";
|
||||||
|
import JackopthistoryPage from "@/pages/JackopthistoryPage.vue";
|
||||||
import DoublePage from "@/pages/games-pages/DoublePage.vue";
|
import DoublePage from "@/pages/games-pages/DoublePage.vue";
|
||||||
import AboutPage from "@/pages/AboutPage.vue";
|
import AboutPage from "@/pages/AboutPage.vue";
|
||||||
import HelpPage from "@/pages/HelpPage.vue" ;
|
import HelpPage from "@/pages/HelpPage.vue" ;
|
||||||
@@ -18,6 +19,7 @@ export default createRouter({
|
|||||||
{ path: '/game/saper', component: SapergamePage, name: 'saper' },
|
{ path: '/game/saper', component: SapergamePage, name: 'saper' },
|
||||||
{ path: '/game/crash', component: CrashGamePage, name: 'crash' },
|
{ path: '/game/crash', component: CrashGamePage, name: 'crash' },
|
||||||
{ path: '/game/jackpot', component: JackpotPage, name: 'jackpot' },
|
{ path: '/game/jackpot', component: JackpotPage, name: 'jackpot' },
|
||||||
|
{ path: '/game/jackpot/history', component: JackopthistoryPage, name: 'jackpot-history' },
|
||||||
{ path: '/game/double', component: DoublePage, name: 'double' },
|
{ path: '/game/double', component: DoublePage, name: 'double' },
|
||||||
{ path: '/settings', component: SettingsPage, name: 'settings' },
|
{ path: '/settings', component: SettingsPage, name: 'settings' },
|
||||||
{ path: '/about', component: AboutPage, name: 'about' },
|
{ path: '/about', component: AboutPage, name: 'about' },
|
||||||
|
|||||||
Reference in New Issue
Block a user