mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
Add history for double games
This commit is contained in:
@@ -41,6 +41,8 @@
|
|||||||
height: 95%;
|
height: 95%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.container-double-history-text {
|
.container-double-history-text {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -150,7 +150,8 @@
|
|||||||
#diamonds-input {
|
#diamonds-input {
|
||||||
/* width: 347px;
|
/* width: 347px;
|
||||||
height: 38px; */
|
height: 38px; */
|
||||||
width: 37vh;
|
/* width: 37vh; */
|
||||||
|
width: 36vh;
|
||||||
height: 4vh;
|
height: 4vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,10 +96,9 @@
|
|||||||
<div class="double--history-carousel">
|
<div class="double--history-carousel">
|
||||||
<Carousel
|
<Carousel
|
||||||
ref="carouselHistory"
|
ref="carouselHistory"
|
||||||
:wrapAround="true"
|
|
||||||
class="no-pointer-events"
|
class="no-pointer-events"
|
||||||
:transition="150"
|
:transition="150"
|
||||||
:itemsToShow="28"
|
:itemsToShow="24"
|
||||||
>
|
>
|
||||||
<Slide v-for="(slide, index) in slidesHistory" :key="index">
|
<Slide v-for="(slide, index) in slidesHistory" :key="index">
|
||||||
<div>
|
<div>
|
||||||
@@ -199,7 +198,6 @@ export default {
|
|||||||
img: require("@/assets/icons-games/double-game/RectangleRedDouble.png"),
|
img: require("@/assets/icons-games/double-game/RectangleRedDouble.png"),
|
||||||
target: "Red",
|
target: "Red",
|
||||||
},
|
},
|
||||||
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// const slides = reactive([]);
|
// const slides = reactive([]);
|
||||||
@@ -263,10 +261,10 @@ export default {
|
|||||||
let { currentSlideIndex } = data;
|
let { currentSlideIndex } = data;
|
||||||
if (
|
if (
|
||||||
slides[currentSlideIndex + 1].target == targetColor.value &&
|
slides[currentSlideIndex + 1].target == targetColor.value &&
|
||||||
// slides[currentSlideIndex + 1].target == targetColor.value &&
|
|
||||||
endGame.value == true
|
endGame.value == true
|
||||||
) {
|
) {
|
||||||
stopAutoPlay();
|
stopAutoPlay();
|
||||||
|
loadGameHistory();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -278,29 +276,35 @@ export default {
|
|||||||
try {
|
try {
|
||||||
await GetNewestDoubleGames()
|
await GetNewestDoubleGames()
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
for (let i = 1; i < 29; i++) {
|
return response.json();
|
||||||
if (i === 15 || i === 28) {
|
})
|
||||||
slidesHistory.push({
|
.then((data) => {
|
||||||
img: require("@/assets/icons-games/double-game/HistoryRectangleGreenDouble.png"),
|
slidesHistory.value = [];
|
||||||
target: "Green",
|
slidesHistory.length = 0;
|
||||||
});
|
for (let i = 0; i < 25; i++) {
|
||||||
} else {
|
// doubleData = Object.assign(doubleData, dataDoubleParse);
|
||||||
if (i % 2 === 0) {
|
|
||||||
|
// timeToGame.value = doubleData.WaitingTime;
|
||||||
|
if (data[i].winColor == "Red") {
|
||||||
slidesHistory.push({
|
slidesHistory.push({
|
||||||
img: require("@/assets/icons-games/double-game/HistoryRectangleRedDouble.png"),
|
img: require("@/assets/icons-games/double-game/HistoryRectangleRedDouble.png"),
|
||||||
target: "Red",
|
target: "Red",
|
||||||
});
|
});
|
||||||
} else {
|
}
|
||||||
|
if (data[i].winColor == "Black") {
|
||||||
slidesHistory.push({
|
slidesHistory.push({
|
||||||
img: require("@/assets/icons-games/double-game/HistoryRectangleBlackDouble.png"),
|
img: require("@/assets/icons-games/double-game/HistoryRectangleBlackDouble.png"),
|
||||||
target: "Black",
|
target: "Black",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
if (data[i].winColor == "Green") {
|
||||||
|
slidesHistory.push({
|
||||||
|
img: require("@/assets/icons-games/double-game/HistoryRectangleGreenDouble.png"),
|
||||||
|
target: "Green",
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return response.json();
|
|
||||||
})
|
|
||||||
.then((data) => {
|
|
||||||
console.log(data);
|
console.log(data);
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
@@ -371,4 +375,17 @@ export default {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: rotateY(0) scale(1.1);
|
transform: rotateY(0) scale(1.1);
|
||||||
}
|
}
|
||||||
|
.double--history-carousel {
|
||||||
|
opacity: 1 !important;
|
||||||
|
transform: rotateY(0) scale(1) !important;
|
||||||
|
}
|
||||||
|
.double--history-carousel .carousel__slide--active ~ .carousel__slide,
|
||||||
|
.double--history-carousel .carousel__slide--prev,
|
||||||
|
.double--history-carousel .carousel__slide--next,
|
||||||
|
.double--history-carousel .carousel__slide--active {
|
||||||
|
opacity: 1;
|
||||||
|
transform: rotateY(0) scale(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user