From db686f490de685734152480ca6b50ad701aa5370 Mon Sep 17 00:00:00 2001 From: Bloody <116832305+Radomir228@users.noreply.github.com> Date: Sat, 17 Feb 2024 22:03:16 +0700 Subject: [PATCH 01/32] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2b0f14d..0044a09 100644 --- a/README.md +++ b/README.md @@ -41,4 +41,4 @@ ## Наша Команда -![team](https://github.com/danilt2000/LuckyDiamond/assets/96600211/0c1b43b7-fe67-4fca-85ef-16f314847b70) +![team](https://cdn.discordapp.com/attachments/1175674631684898866/1208428357952348170/Group_92.png?ex=65e33f9c&is=65d0ca9c&hm=9279223a5486b16e30267bced4fd1f7cc63ff59292cb5e29d741914b5902e5e0&) From 3ffb20f56775125ab245619aab68881881c23a97 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sat, 17 Feb 2024 16:36:56 +0100 Subject: [PATCH 02/32] add productionSourceMap --- luckydiamond/vue.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luckydiamond/vue.config.js b/luckydiamond/vue.config.js index 07978e9..1afce2e 100644 --- a/luckydiamond/vue.config.js +++ b/luckydiamond/vue.config.js @@ -15,7 +15,7 @@ const path = require('path'); module.exports = { // Установка базового URL-адреса для проекта publicPath: '/', - + productionSourceMap: false, // Настройка Webpack configureWebpack: { resolve: { From 48d3486866c9074e5f602b20d4c4efb167b93154 Mon Sep 17 00:00:00 2001 From: Rafael Chasman <96600211+rafael1209@users.noreply.github.com> Date: Sat, 17 Feb 2024 19:36:21 +0200 Subject: [PATCH 03/32] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0044a09..d2e5fe8 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ - Нажать сочетание клавиш ctrl + shift + i - Перейти в Application(Приложение) - Кликнуть на файлы Куки -- Нажать на нашу ссылку и скопировать AUTHTOKEN, SearchToken, SpUserName, UserId +- Нажать на нашу ссылку и скопировать AUTHTOKEN, SearchToken, SpUserName - Вставить значения и названия на Локальный хост - Обновить страницу From 4d73c6c37056c14df815570a4f544a39fa43dd7a Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 18 Feb 2024 17:42:20 +0100 Subject: [PATCH 04/32] Add fix for chat + jackpot logo --- .../src/assets/css/ComponentsStyles/chat.css | 2 +- .../src/assets/css/PagesStyles/home.css | 47 ++++++++++++++++++- .../assets/icons-gamemodes/jackpot_icon.svg | 9 ++++ luckydiamond/src/mocks/GameModes.js | 2 +- luckydiamond/src/pages/HomePage.vue | 8 ++-- 5 files changed, 60 insertions(+), 8 deletions(-) create mode 100644 luckydiamond/src/assets/icons-gamemodes/jackpot_icon.svg diff --git a/luckydiamond/src/assets/css/ComponentsStyles/chat.css b/luckydiamond/src/assets/css/ComponentsStyles/chat.css index f7c4a42..4f5777b 100644 --- a/luckydiamond/src/assets/css/ComponentsStyles/chat.css +++ b/luckydiamond/src/assets/css/ComponentsStyles/chat.css @@ -191,4 +191,4 @@ .mention-message { background-color: rgb(169, 113, 0); -} +} \ No newline at end of file diff --git a/luckydiamond/src/assets/css/PagesStyles/home.css b/luckydiamond/src/assets/css/PagesStyles/home.css index 99e4150..c62de9d 100644 --- a/luckydiamond/src/assets/css/PagesStyles/home.css +++ b/luckydiamond/src/assets/css/PagesStyles/home.css @@ -117,7 +117,17 @@ color: #fff; text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); font-family: Montserrat Alternates; - font-size: 91px; + font-size:91px; + font-weight: 700; + text-transform: uppercase; + text-align: center; +} + +.title-jackpot { + color: #fff; + text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); + font-family: Montserrat Alternates; + font-size:80px; font-weight: 700; text-transform: uppercase; text-align: center; @@ -157,6 +167,11 @@ margin: 1% 6.6% 1% 4.7%; } +.line__img__jackpot { + display: flex; + margin: 1% 6.6% 1% 4.7%; +} + .display-firstline { display: flex; } @@ -178,6 +193,23 @@ left: 2%; } +.line__btn__jackpot { + border-radius: 21px; + background: #FFF; + box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.25); + color: #000; + text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); + font-family: Montserrat Alternates; + font-size: 36px; + font-weight: 700; + padding: 11px 11px; + text-decoration: none; + text-transform: uppercase; + position: relative; + bottom: 4%; + left: 6%; +} + .line__btn--elm { color: #000; font-size: 38px; @@ -377,10 +409,21 @@ } } -@media screen and (min-height: 910px) { +@media screen and (min-height: 820px) { .chat { height: 87vh !important; } } + @media screen and (max-width: 1850px) { + .line__img__jackpot { + display: none !important; + } + } +/* +@media screen and (min-height: 800) { + .chat { + height: 85vh !important; + } +} */ /* /Media */ diff --git a/luckydiamond/src/assets/icons-gamemodes/jackpot_icon.svg b/luckydiamond/src/assets/icons-gamemodes/jackpot_icon.svg new file mode 100644 index 0000000..d6eacae --- /dev/null +++ b/luckydiamond/src/assets/icons-gamemodes/jackpot_icon.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/luckydiamond/src/mocks/GameModes.js b/luckydiamond/src/mocks/GameModes.js index c8c06de..acc5dda 100644 --- a/luckydiamond/src/mocks/GameModes.js +++ b/luckydiamond/src/mocks/GameModes.js @@ -6,7 +6,7 @@ export default [ }, { id: 2, - title: 'кейсы', + title: 'джекпот', players: 0 }, { diff --git a/luckydiamond/src/pages/HomePage.vue b/luckydiamond/src/pages/HomePage.vue index cd20b17..c807ba0 100644 --- a/luckydiamond/src/pages/HomePage.vue +++ b/luckydiamond/src/pages/HomePage.vue @@ -60,18 +60,18 @@ >
-

{{ mode.title }}

+

{{ mode.title }}

play >
-
- +
+
From 398a12db081a01c5f721e3445b3d6f33509cf7e1 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 18 Feb 2024 17:50:22 +0100 Subject: [PATCH 05/32] Add fix for padding top --- luckydiamond/src/assets/css/PagesStyles/home.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luckydiamond/src/assets/css/PagesStyles/home.css b/luckydiamond/src/assets/css/PagesStyles/home.css index c62de9d..1cf6905 100644 --- a/luckydiamond/src/assets/css/PagesStyles/home.css +++ b/luckydiamond/src/assets/css/PagesStyles/home.css @@ -137,7 +137,7 @@ display: flex; justify-content: center; align-items: center; - padding-top: 4.7%; + padding-top: 5.5%; } .line__content .line__btn--main .line__btn { From 0d3ae3147c2096796733f5f5ac4a166ea6a0ad23 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Mon, 19 Feb 2024 21:49:15 +0100 Subject: [PATCH 06/32] Add jackpot --- luckydiamond/public/index.html | 5 +- .../css/PagesStyles/games-pages/jackpot.css | 43 ++++++ luckydiamond/src/assets/css/global.css | 23 +++ luckydiamond/src/components/ChatComponent.vue | 23 +-- luckydiamond/src/mocks/JackpotNumbers.js | 20 +++ .../src/pages/games-pages/JackpotPage.vue | 136 ++++++++++++++++-- 6 files changed, 229 insertions(+), 21 deletions(-) create mode 100644 luckydiamond/src/mocks/JackpotNumbers.js diff --git a/luckydiamond/public/index.html b/luckydiamond/public/index.html index 8e3f7fd..e132356 100644 --- a/luckydiamond/public/index.html +++ b/luckydiamond/public/index.html @@ -17,6 +17,9 @@ + + + LuckyDiamond @@ -35,5 +38,5 @@ - + \ No newline at end of file diff --git a/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css b/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css index e69de29..d57c92d 100644 --- a/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css +++ b/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css @@ -0,0 +1,43 @@ +.jackpot-start { + z-index: 1; + /* margin-left: 5%; */ + border-radius: 20px; + background: #22252F; + box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25); + width: 42vh; + /* height: 480px; */ + height: 32vh; + /* margin-top: 2.6%; */ +} + +.jackpot-start__content p { + color: #FFFFFF84; + font-weight: 700; + line-height: 31px; + text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); + font-family: Montserrat Alternates; + font-size: 13px; +} + +.padding-elements-jackpot { + padding-left: 5%; + padding-right: 5%; +} + +.jackpot-start__btns { + margin-top: 5%; + display: flex; + flex-direction: column; +} +.jackpot-start__btns button { + width: 100%; + padding: 12px; + margin-bottom: 5px; + border: none; + color: #FFF; + font-weight: 700; + line-height: 19px; + font-style: normal; + font-family: Inter; + font-size: 16px; +} \ No newline at end of file diff --git a/luckydiamond/src/assets/css/global.css b/luckydiamond/src/assets/css/global.css index 59af522..4c97956 100644 --- a/luckydiamond/src/assets/css/global.css +++ b/luckydiamond/src/assets/css/global.css @@ -257,6 +257,29 @@ button { } +.bg-gradient-left { + background: #293561; + filter: blur(120px); + position: absolute; + top: 250px; + transform: rotate(180deg); + left: 200px; + width: 40%; + height: 55%; + z-index: 0; +} + +.bg-two-gradient-right { + background: #293561; + filter: blur(120px); + position: absolute; + top: 220px; + transform: rotate(330deg); + left: 600px; + width: 60%; + height: 35%; + z-index: 0; +} /* /Crash */ /* Media */ diff --git a/luckydiamond/src/components/ChatComponent.vue b/luckydiamond/src/components/ChatComponent.vue index 3103651..43706b8 100644 --- a/luckydiamond/src/components/ChatComponent.vue +++ b/luckydiamond/src/components/ChatComponent.vue @@ -11,7 +11,13 @@
  • -
    +
    @@ -55,7 +61,7 @@ export default { }); }, isCurrentUser(msg) { - return msg.msg.includes(GetCookie('SpUserName')) + return msg.msg.includes(GetCookie("SpUserName")); }, ClaimDatamsg(msg) { const now = Date.now(); @@ -71,7 +77,7 @@ export default { eventBus.on("dataChat", (dataFromServer) => { try { const dataObject = JSON.parse(dataFromServer); - + let imageUrl = "https://avatar.spworlds.ru/face/55/" + dataObject.SpUserName; @@ -82,8 +88,8 @@ export default { icon: imageUrl, }; - if (MsgUser.username === '🛠️ System') { - MsgUser.icon = 'https://avatar.spworlds.ru/face/55/CONSOLE' + if (MsgUser.username === "🛠️ System") { + MsgUser.icon = "https://avatar.spworlds.ru/face/55/CONSOLE"; } this.array.push(MsgUser); @@ -98,7 +104,8 @@ export default { GetChatHistory().then((response) => { if (response && response.length) { response.forEach((element) => { - let imageUrl = "https://avatar.spworlds.ru/face/55/" + element.userName; + let imageUrl = + "https://avatar.spworlds.ru/face/55/" + element.userName; const MsgUser = { id: this.id + 1, @@ -107,8 +114,8 @@ export default { icon: imageUrl, }; - if (MsgUser.username === '🛠️ System') { - MsgUser.icon = 'https://avatar.spworlds.ru/face/55/CONSOLE' + if (MsgUser.username === "🛠️ System") { + MsgUser.icon = "https://avatar.spworlds.ru/face/55/CONSOLE"; } this.array.push(MsgUser); diff --git a/luckydiamond/src/mocks/JackpotNumbers.js b/luckydiamond/src/mocks/JackpotNumbers.js new file mode 100644 index 0000000..cac83b1 --- /dev/null +++ b/luckydiamond/src/mocks/JackpotNumbers.js @@ -0,0 +1,20 @@ +export default [ + { + diamonds: 1, + }, + { + diamonds: 5, + }, + { + diamonds: 10, + }, + { + diamonds: 50, + }, + { + diamonds: 100, + }, + { + diamonds: 'max', + } +] \ No newline at end of file diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index 62c5d55..98d73e2 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -1,22 +1,83 @@ + + From 921048c969b06c59e56d6da9a11508aba0bacfea Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sat, 24 Feb 2024 00:26:39 +0100 Subject: [PATCH 09/32] Working on jackpot --- .../css/PagesStyles/games-pages/jackpot.css | 5 + luckydiamond/src/assets/js/chat/ChatLogic.js | 6 + .../src/assets/js/jackpot/JackpotLogic.js | 55 +++++ .../src/components/DevelopComponent.vue | 4 +- .../src/pages/games-pages/JackpotPage.vue | 221 ++++++++++++++++-- luckydiamond/src/properties/Сonfig.js | 2 + 6 files changed, 272 insertions(+), 21 deletions(-) create mode 100644 luckydiamond/src/assets/js/jackpot/JackpotLogic.js diff --git a/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css b/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css index 003c686..cc768c2 100644 --- a/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css +++ b/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css @@ -133,6 +133,11 @@ font-size: 14px; /* Smaller text size for 'БАНК' */ } +.progress-text { + transition: opacity 0.5s ease; + opacity: 1; +} + .progress-bar { width: 95%; background-color: #D9D9D9; /* Navy blue background */ diff --git a/luckydiamond/src/assets/js/chat/ChatLogic.js b/luckydiamond/src/assets/js/chat/ChatLogic.js index 0bbece7..9dea039 100644 --- a/luckydiamond/src/assets/js/chat/ChatLogic.js +++ b/luckydiamond/src/assets/js/chat/ChatLogic.js @@ -8,6 +8,12 @@ let webSocket; export function ConnectToChat() { try { + + if (webSocket && webSocket.readyState === WebSocket.OPEN) { + console.log('WebSocket connection already established.'); + return; + } + webSocket = new WebSocket(BackendWebSocketUrl); webSocket.onopen = function () { diff --git a/luckydiamond/src/assets/js/jackpot/JackpotLogic.js b/luckydiamond/src/assets/js/jackpot/JackpotLogic.js new file mode 100644 index 0000000..2d0242e --- /dev/null +++ b/luckydiamond/src/assets/js/jackpot/JackpotLogic.js @@ -0,0 +1,55 @@ +import { BackendWebSocketJackpotUrl } from '@/properties/Сonfig.js'; +import { eventBus } from "@/main"; + +// import { +// GetCookie +// } from "@/assets/js/storage/CookieStorage.js"; + +let webSocket; + +export function ConnectToJackpotSocket() { + try { + + if (webSocket && webSocket.readyState === WebSocket.OPEN) { + console.log('WebSocket connection already established.'); + return; + } + + webSocket = new WebSocket(BackendWebSocketJackpotUrl); + + webSocket.onopen = function () { + console.log('Connection established'); + }; + + webSocket.onmessage = function (event) { + + // const dataObject = JSON.parse(event.data); + + eventBus.emit('jackpotGameTik', event.data); + + // console.log(dataObject) + // if (dataObject && Object.prototype.hasOwnProperty.call(dataObject, 'SpUserName') && Object.prototype.hasOwnProperty.call(dataObject, 'Message')) { + // eventBus.emit('dataChat', event.data); + // console.log('CHAT') + // } + // else { + // eventBus.emit('crash', event.data) + // } + + }; + + webSocket.onclose = function () { + + webSocket = new WebSocket(BackendWebSocketJackpotUrl); + + console.log('Connection closed and reconnected'); + }; + + webSocket.onerror = function (event) { + webSocket = new WebSocket(BackendWebSocketJackpotUrl); + console.error('WebSocket Error:', event); + }; + } catch (error) { + console.error('Error in ConnectToChat:', error); + } +} diff --git a/luckydiamond/src/components/DevelopComponent.vue b/luckydiamond/src/components/DevelopComponent.vue index 7f773bd..812a516 100644 --- a/luckydiamond/src/components/DevelopComponent.vue +++ b/luckydiamond/src/components/DevelopComponent.vue @@ -55,7 +55,7 @@
    -

    Бэкендер

    +

    Фронтэндер

    Ckutls_

    @@ -130,7 +130,7 @@
    -

    фронтэндер

    +

    Фронтэндер

    busha888

    diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index 74f3fd9..b7876e2 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -117,10 +117,16 @@
    -
    15.00 СЕК
    +
    + {{ + remainingSeconds >= 0 ? remainingSeconds + " СЕК" : "" + }} +
    -
    @@ -130,21 +136,23 @@
    @@ -175,10 +183,14 @@ import "@/assets/css/PagesStyles/games-pages/jackpot.css"; import "@/assets/css/global.css"; import JackpotNumbers from "@/mocks/JackpotNumbers"; +import { ConnectToJackpotSocket } from "@/assets/js/jackpot/JackpotLogic.js"; + import { Carousel, Slide } from "vue3-carousel"; import "vue3-carousel/dist/carousel.css"; +import { eventBus } from "@/main"; + // import ProgressBar from "vue-bulma-progress-bar"; // import '@/assets/css/PagesStyles/games-pages/jackpot.css' @@ -192,32 +204,203 @@ export default { // Pagination // ProgressBar, }, + inject: ["eventBus"], data() { return { JackpotNumbers, - // clickedBtn: null, - // ErrorClick: false, - // ErrorJoin: false, - // balance: 0, + autoplay: 0, + slides: [ + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Hepatir.png", + nickname: "Hepatir", + }, + ], + currentSlide: 0, value: 0, max: 100, amountDeposit: 0, - - // crashObject: '', - // textError: '', - // startGame: false, - // offBtn: false + isCarouselStopped: false, + targetNickname: "", + isStopButtonPressed: false, + isGameTimerStarted: false, + remainingSeconds: 0, + progressBarWidth: 0, + // idCurrentGame: "", + lastUserWinner: "", + // lastIdGame: "", }; }, + methods: { + checkGameEnd(endGameUtc) { + const endTime = new Date(endGameUtc).getTime(); + const currentTime = new Date().getTime(); + const timeLeft = endTime - currentTime; + + if (timeLeft > 0) { + // Устанавливаем таймер, который сработает, когда игра должна закончиться + setTimeout(() => { + eventBus.emit("gameEnded"); // Транслируем событие окончания игры + console.log("Game has ended"); + }, timeLeft); + } else { + // Игра уже закончилась + // eventBus.emit("gameEnded"); // Транслируем событие окончания игры + console.log("Game has already ended"); + } + }, startAutoScroll() { this.interval = setInterval(() => { this.$refs.carousel.next(); }, 1); }, + startGameTimer(startGameUtc) { + if (!this.isGameTimerStarted) { + this.isGameTimerStarted = true; + const startTime = new Date(startGameUtc).getTime(); + const updateTimer = () => { + const currentTime = new Date().getTime(); + const diff = startTime - currentTime; + this.remainingSeconds = Math.max(0, Math.floor(diff / 1000)); + if (diff <= 0) { + this.remainingSeconds = 0; + this.progressBarWidth = 100; // Полный прогресс + clearInterval(this.timerInterval); // Остановить таймер + this.autoplay = 20; + + // Действия после окончания таймера, если необходимо + } else { + this.remainingSeconds = Math.floor(diff / 1000); // Обновляем оставшееся время в секундах + const totalDuration = 30; // Допустим, обратный отсчет идет с 60 секунд + this.progressBarWidth = + ((totalDuration - this.remainingSeconds) / totalDuration) * 100; + } + + // Обновление текста и ширины прогресс-бара + const progressBarElement = document.querySelector(".progress"); + if (progressBarElement) { + const progressText = + progressBarElement.querySelector(".progress-text"); + if (progressText) { + progressText.style.opacity = "0"; + setTimeout(() => { + progressBarElement.style.width = `${this.progressBarWidth}%`; + progressText.textContent = `${this.remainingSeconds} СЕК`; + progressText.style.opacity = "1"; + }, 500); // Задержка должна соответствовать продолжительности анимации + } + } + }; + + // Запускаем таймер + this.timerInterval = setInterval(updateTimer, 1000); + updateTimer(); // Вызываем сразу для инициализации + } + }, + handleSlideStart(data) { + try { + const { slidingToIndex } = data; + this.currentSlideIndex = slidingToIndex; + if (this.isStopButtonPressed) { + if ( + this.slides[this.currentSlideIndex].nickname === + this.targetNickname && + !this.isCarouselStopped + ) { + this.stopAutoplay(); + } + } + } catch (error) { + console.error("Error in handleSlideStart:", error); + // Здесь вы можете обработать ошибку, например, остановить карусель + } + }, + stopCarousel() { + this.isStopButtonPressed = true; + this.autoplay = 200; + }, + stopAutoplay() { + this.autoplay = 0; + this.isCarouselStopped = true; + if (this.interval) { + clearInterval(this.interval); + } + }, + changeLastFiveImages() { + const newImage = "https://avatar.spworlds.ru/face/55/Hepatir.png"; + console.log(this.slides); + this.slides[9].img = newImage; + }, + stopOnTarget(targetNickname) { + if (this.slides[this.currentSlide].nickname === targetNickname) { + this.autoplay = 0; // Остановить автопрокрутку + return true; // Возвращаем true, если нашли нужный слайд + } + return false; // Возвращаем false, если нужный слайд не найден + }, }, mounted() { - this.startAutoScroll(); + ConnectToJackpotSocket(); + eventBus.on("jackpotGameTik", (data) => { + try { + if (data) { + const dataObject = JSON.parse(data); + console.log(dataObject); + + this.lastUserWinner=dataObject.LastGame.WinnerUserName; + + if (dataObject.CurrentGame.GameState == "StartGameTimer") { + this.startGameTimer(dataObject.CurrentGame.StartGameUtc); + } + + if ( + dataObject.CurrentGame.GameState != "WaitingForPlayers" && + dataObject.CurrentGame.GameState == "Running" + ) { + this.checkGameEnd(dataObject.CurrentGame.EndGameUtc); + // this.idCurrentGame = dataObject.CurrentGame.Id; + } + // Дальнейшая обработка dataObject... + } else { + // Если данные не определены или пусты, выводим соответствующее сообщение в консоль + console.log("Received undefined or null data"); + } + // console.log(dataFromServer); + } catch (error) { + console.log(error); + } + }); + eventBus.on("gameEnded", () => { + setTimeout(() => { + this.targetNickname = this.lastUserWinner; + this.stopCarousel(); + }, 2000); + }); + // this.startAutoScroll(); }, watch: { amountDeposit(DepositCount) { diff --git a/luckydiamond/src/properties/Сonfig.js b/luckydiamond/src/properties/Сonfig.js index 375f3b8..04955cb 100644 --- a/luckydiamond/src/properties/Сonfig.js +++ b/luckydiamond/src/properties/Сonfig.js @@ -1,5 +1,7 @@ export const BackendApiUrl = 'https://spsystemcore20231122004605.azurewebsites.net/api'; export const BackendWebSocketUrl = 'wss://spsystemcore20231122004605.azurewebsites.net'; + +export const BackendWebSocketJackpotUrl = 'wss://spsystemcore20231122004605.azurewebsites.net/jackpot'; // export const BackendApiUrl = 'https://localhost:7062/api'; \ No newline at end of file From 8d1316b7ac23c66d7c3fd55a01201d2cdca9af09 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sat, 24 Feb 2024 02:49:59 +0100 Subject: [PATCH 10/32] hdfhfdhf --- .../src/pages/games-pages/JackpotPage.vue | 156 ++++++++++++------ 1 file changed, 103 insertions(+), 53 deletions(-) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index b7876e2..9a5d4b7 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -191,9 +191,6 @@ import "vue3-carousel/dist/carousel.css"; import { eventBus } from "@/main"; -// import ProgressBar from "vue-bulma-progress-bar"; - -// import '@/assets/css/PagesStyles/games-pages/jackpot.css' export default { components: { HeaderComponent, @@ -209,41 +206,41 @@ export default { return { JackpotNumbers, autoplay: 0, - slides: [ - { - img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - nickname: "Ckutls_", - }, - { - img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - nickname: "Ckutls_", - }, - { - img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - nickname: "Ckutls_", - }, - { - img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - nickname: "Ckutls_", - }, - { - img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - nickname: "Ckutls_", - }, - { - img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - nickname: "Ckutls_", - }, - { - img: "https://avatar.spworlds.ru/face/55/Hepatir.png", - nickname: "Hepatir", - }, - ], + // slides: [ + // { + // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + // nickname: "Ckutls_", + // }, + // { + // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + // nickname: "Ckutls_", + // }, + // { + // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + // nickname: "Ckutls_", + // }, + // { + // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + // nickname: "Ckutls_", + // }, + // { + // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + // nickname: "Ckutls_", + // }, + // { + // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + // nickname: "Ckutls_", + // }, + // { + // img: "https://avatar.spworlds.ru/face/55/Hepatir.png", + // nickname: "Hepatir", + // }, + // ], + slides: [], currentSlide: 0, value: 0, max: 100, amountDeposit: 0, - isCarouselStopped: false, targetNickname: "", isStopButtonPressed: false, isGameTimerStarted: false, @@ -256,6 +253,18 @@ export default { }, methods: { + mapPlayersToSlides(players) { + this.slides = []; + players.forEach((player) => { + const numberOfCards = player.WinningPercentage / 10; // Предполагаем, что 10% это 1 карточка + for (let i = 0; i < numberOfCards; i++) { + this.slides.push({ + img: `https://avatar.spworlds.ru/face/55/${player.UserName}.png`, // Предполагаем структуру URL из имени пользователя + nickname: player.UserName, + }); + } + }); + }, checkGameEnd(endGameUtc) { const endTime = new Date(endGameUtc).getTime(); const currentTime = new Date().getTime(); @@ -281,6 +290,7 @@ export default { startGameTimer(startGameUtc) { if (!this.isGameTimerStarted) { this.isGameTimerStarted = true; + const startTime = new Date(startGameUtc).getTime(); const updateTimer = () => { const currentTime = new Date().getTime(); @@ -324,20 +334,48 @@ export default { handleSlideStart(data) { try { const { slidingToIndex } = data; - this.currentSlideIndex = slidingToIndex; - if (this.isStopButtonPressed) { - if ( - this.slides[this.currentSlideIndex].nickname === - this.targetNickname && - !this.isCarouselStopped - ) { - this.stopAutoplay(); - } - } - } catch (error) { + // Проверяем, существует ли слайд и имеет ли он свойство nickname + if (this.slides[slidingToIndex] && this.slides[slidingToIndex].nickname) { + this.currentSlideIndex = slidingToIndex; + if (this.isStopButtonPressed) { + if (this.slides[this.currentSlideIndex].nickname == "Hepatir") { + // if (this.slides[this.currentSlideIndex].nickname == this.targetNickname) { + this.stopAutoplay(); + } + } + } + } catch (error) { console.error("Error in handleSlideStart:", error); - // Здесь вы можете обработать ошибку, например, остановить карусель - } + } + // try { + // const { slidingToIndex } = data; + // this.currentSlideIndex = slidingToIndex; + // if (this.isStopButtonPressed) { + // if ( + // this.slides[this.currentSlideIndex].nickname == this.targetNickname + // ) { + // this.stopAutoplay(); + // } + // } + // } catch (error) { + // console.error("Error in handleSlideStart:", error); + // // Здесь вы можете обработать ошибку, например, остановить карусель + // } + // try { + // const { slidingToIndex } = data; + // this.currentSlideIndex = slidingToIndex; + // if (this.isStopButtonPressed) { + // if ( + // this.slides[this.currentSlideIndex].nickname == + // "Hepatir" + // ) { + // this.stopAutoplay(); + // } + // } + // } catch (error) { + // console.error("Error in handleSlideStart:", error); + // // Здесь вы можете обработать ошибку, например, остановить карусель + // } }, stopCarousel() { this.isStopButtonPressed = true; @@ -345,7 +383,9 @@ export default { }, stopAutoplay() { this.autoplay = 0; - this.isCarouselStopped = true; + this.targetNickname = ""; + this.isGameTimerStarted = false; + this.isStopButtonPressed = false; if (this.interval) { clearInterval(this.interval); } @@ -371,14 +411,22 @@ export default { const dataObject = JSON.parse(data); console.log(dataObject); - this.lastUserWinner=dataObject.LastGame.WinnerUserName; + if (dataObject.CurrentGame.GameState == "WaitingForPlayers") { + console.log("Waiting for players"); + console.log("Put there earlies cards"); + this.lastUserWinner = dataObject.LastGame.WinnerUserName; + // this.mapPlayersToSlides(dataObject.LastGame.PlayerList); + } if (dataObject.CurrentGame.GameState == "StartGameTimer") { + if (!this.isGameTimerStarted) { + console.log("Set players"); + this.mapPlayersToSlides(dataObject.CurrentGame.PlayerList); + } this.startGameTimer(dataObject.CurrentGame.StartGameUtc); } if ( - dataObject.CurrentGame.GameState != "WaitingForPlayers" && dataObject.CurrentGame.GameState == "Running" ) { this.checkGameEnd(dataObject.CurrentGame.EndGameUtc); @@ -396,9 +444,11 @@ export default { }); eventBus.on("gameEnded", () => { setTimeout(() => { - this.targetNickname = this.lastUserWinner; - this.stopCarousel(); - }, 2000); + if (!this.isStopButtonPressed) { + this.targetNickname = this.lastUserWinner; + this.stopCarousel(); + } + }, 2000); }); // this.startAutoScroll(); }, From fb336ddaacd6096d2d91f7f9700709c5e1c2689e Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sat, 24 Feb 2024 17:50:30 +0100 Subject: [PATCH 11/32] sdfgef dgsdf --- .../src/pages/games-pages/JackpotPage.vue | 159 ++++++++++-------- 1 file changed, 88 insertions(+), 71 deletions(-) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index 9a5d4b7..5c108f9 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -150,9 +150,9 @@
    - +
    @@ -190,7 +190,6 @@ import { Carousel, Slide } from "vue3-carousel"; import "vue3-carousel/dist/carousel.css"; import { eventBus } from "@/main"; - export default { components: { HeaderComponent, @@ -205,38 +204,50 @@ export default { data() { return { JackpotNumbers, - autoplay: 0, - // slides: [ - // { - // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - // nickname: "Ckutls_", - // }, - // { - // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - // nickname: "Ckutls_", - // }, - // { - // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - // nickname: "Ckutls_", - // }, - // { - // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - // nickname: "Ckutls_", - // }, - // { - // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - // nickname: "Ckutls_", - // }, - // { - // img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", - // nickname: "Ckutls_", - // }, - // { - // img: "https://avatar.spworlds.ru/face/55/Hepatir.png", - // nickname: "Hepatir", - // }, - // ], - slides: [], + autoplay: 20, + slides: [ + { + img: "https://avatar.spworlds.ru/face/55/Hepatir.png", + nickname: "Hepatir", + }, + { + img: "https://avatar.spworlds.ru/face/55/Hepatir.png", + nickname: "Hepatir", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Hepatir.png", + nickname: "Hepagfdtir", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Ckutls_.png", + nickname: "Ckutls_", + }, + { + img: "https://avatar.spworlds.ru/face/55/Hepatir.png", + nickname: "Hepgdfatir", + }, + ], + // slides: [], currentSlide: 0, value: 0, max: 100, @@ -258,6 +269,12 @@ export default { players.forEach((player) => { const numberOfCards = player.WinningPercentage / 10; // Предполагаем, что 10% это 1 карточка for (let i = 0; i < numberOfCards; i++) { + if (i==0) { + this.slides.push({ + img: `https://avatar.spworlds.ru/face/55/${player.UserName}.png`, // Предполагаем структуру URL из имени пользователя + nickname: player.UserName, + }) + } this.slides.push({ img: `https://avatar.spworlds.ru/face/55/${player.UserName}.png`, // Предполагаем структуру URL из имени пользователя nickname: player.UserName, @@ -299,8 +316,6 @@ export default { if (diff <= 0) { this.remainingSeconds = 0; this.progressBarWidth = 100; // Полный прогресс - clearInterval(this.timerInterval); // Остановить таймер - this.autoplay = 20; // Действия после окончания таймера, если необходимо } else { @@ -332,21 +347,25 @@ export default { } }, handleSlideStart(data) { - try { - const { slidingToIndex } = data; - // Проверяем, существует ли слайд и имеет ли он свойство nickname - if (this.slides[slidingToIndex] && this.slides[slidingToIndex].nickname) { - this.currentSlideIndex = slidingToIndex; - if (this.isStopButtonPressed) { - if (this.slides[this.currentSlideIndex].nickname == "Hepatir") { - // if (this.slides[this.currentSlideIndex].nickname == this.targetNickname) { - this.stopAutoplay(); - } - } - } - } catch (error) { - console.error("Error in handleSlideStart:", error); - } + // try { + // let { slidingToIndex,currentSlideIndex } = data; + // // Проверяем, существует ли слайд и имеет ли он свойство nickname + // if (this.slides[slidingToIndex] && this.slides[slidingToIndex].nickname) { + // if (this.isStopButtonPressed) { + // if (this.slides[currentSlideIndex].nickname == "Hepatir") { + + // // this.$refs.carousel.slideTo(this.currentSlideIndex); + + + + // // if (this.slides[this.currentSlideIndex].nickname == this.targetNickname) { + // this.stopAutoplay(); + // } + // } + // } + // } catch (error) { + // console.error("Error in handleSlideStart:", error); + // } // try { // const { slidingToIndex } = data; // this.currentSlideIndex = slidingToIndex; @@ -361,34 +380,32 @@ export default { // console.error("Error in handleSlideStart:", error); // // Здесь вы можете обработать ошибку, например, остановить карусель // } - // try { - // const { slidingToIndex } = data; - // this.currentSlideIndex = slidingToIndex; - // if (this.isStopButtonPressed) { - // if ( - // this.slides[this.currentSlideIndex].nickname == - // "Hepatir" - // ) { - // this.stopAutoplay(); - // } - // } - // } catch (error) { - // console.error("Error in handleSlideStart:", error); - // // Здесь вы можете обработать ошибку, например, остановить карусель - // } + try { + const { slidingToIndex } = data; + this.currentSlideIndex = slidingToIndex; + if (this.isStopButtonPressed) { + if ( + this.slides[this.currentSlideIndex].nickname == + "Hepatir" + ) { + this.stopAutoplay(); + } + } + } catch (error) { + console.error("Error in handleSlideStart:", error); + // Здесь вы можете обработать ошибку, например, остановить карусель + } }, stopCarousel() { this.isStopButtonPressed = true; this.autoplay = 200; }, stopAutoplay() { - this.autoplay = 0; this.targetNickname = ""; + this.autoplay = 0; this.isGameTimerStarted = false; this.isStopButtonPressed = false; - if (this.interval) { - clearInterval(this.interval); - } + }, changeLastFiveImages() { const newImage = "https://avatar.spworlds.ru/face/55/Hepatir.png"; From 1f17828c52de550686009687d59a0cb9e4cc9c9b Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sat, 24 Feb 2024 23:39:52 +0100 Subject: [PATCH 12/32] work stable jackpot --- .../games-components/CrashGraphComponent.vue | 81 +++--- .../src/pages/games-pages/JackpotPage.vue | 246 ++++++++---------- 2 files changed, 143 insertions(+), 184 deletions(-) diff --git a/luckydiamond/src/components/games-components/CrashGraphComponent.vue b/luckydiamond/src/components/games-components/CrashGraphComponent.vue index e79e616..0d61c51 100644 --- a/luckydiamond/src/components/games-components/CrashGraphComponent.vue +++ b/luckydiamond/src/components/games-components/CrashGraphComponent.vue @@ -1,11 +1,13 @@ From 71264d32e220ca7679263098912eae1fc626011c Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 25 Feb 2024 05:15:38 +0100 Subject: [PATCH 18/32] fix bug in jackpot --- .../src/pages/games-pages/JackpotPage.vue | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index ece279d..1748fb8 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -438,37 +438,37 @@ export default { this.offBtn = false; this.errorPlayButton(); } - const userData = { - searchToken: GetCookie("SearchToken"), - authtoken: GetCookie("AUTHTOKEN"), - }; + const userData = { + searchToken: GetCookie("SearchToken"), + authtoken: GetCookie("AUTHTOKEN"), + }; - await JoinJackpotGame(userData, this.amountDeposit).then((response) => { - console.log(this.balance); - console.log(response); - if ( - response === `You can't join to started or ended game` || - response === "Player alredy in the game." - ) { - this.offBtn = false; + await JoinJackpotGame(userData, this.amountDeposit).then((response) => { + console.log(this.balance); + console.log(response); + if ( + response === `You can't join to started or ended game` || + response === "Player alredy in the game." + ) { + this.offBtn = false; - if (response === `You can't join to started or ended game`) { - this.textError = "Игра уже началась или только закончилась!"; - this.errorPlayButton(); - } else if (response === "Player alredy in the game.") { - this.textError = "Вы уже в игре!"; - this.errorPlayButton(); - } - - return; + if (response === `You can't join to started or ended game`) { + this.textError = "Игра уже началась или только закончилась!"; + this.errorPlayButton(); + } else if (response === "Player alredy in the game.") { + this.textError = "Вы уже в игре!"; + this.errorPlayButton(); } - if (response.ok) { - this.offBtn = false; - this.startGame = true; - } - }); - this.offBtn = false; + return; + } + + if (response.ok) { + this.offBtn = false; + this.startGame = true; + } + }); + this.offBtn = false; }, updatePlayerInfo(newName, newGems, newChance) { this.player.name = newName; @@ -491,7 +491,7 @@ export default { }); players.forEach((player) => { - const numberOfCards = player.WinningPercentage / 10; // Предполагаем, что 10% это 1 карточка + const numberOfCards = player.WinningPercentage; // Предполагаем, что 10% это 1 карточка // const numberOfCards = player.WinningPercentage / 10; // Предполагаем, что 10% это 1 карточка for (let i = 0; i < numberOfCards; i++) { if (i == 0) { @@ -687,12 +687,12 @@ export default { if (dataObject.CurrentGame.GameState == "StartGameTimer") { if (!this.isGameTimerStarted) { console.log("Set players"); - this.mapPlayersToSlides( - dataObject.CurrentGame.PlayerList, - dataObject.CurrentGame.PlayerList - ); this.idCurrentGame = dataObject.CurrentGame.Id; } + this.mapPlayersToSlides( + dataObject.CurrentGame.PlayerList, + dataObject.CurrentGame.PlayerList + ); this.startGameTimer(dataObject.CurrentGame.StartGameUtc); } From dc6c46efbee8d33a0327d6b3bc5f4281be7b9e08 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 25 Feb 2024 05:20:20 +0100 Subject: [PATCH 19/32] change number of cards --- luckydiamond/src/pages/games-pages/JackpotPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index 1748fb8..76fb13c 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -491,7 +491,7 @@ export default { }); players.forEach((player) => { - const numberOfCards = player.WinningPercentage; // Предполагаем, что 10% это 1 карточка + const numberOfCards = player.WinningPercentage/5; // Предполагаем, что 10% это 1 карточка // const numberOfCards = player.WinningPercentage / 10; // Предполагаем, что 10% это 1 карточка for (let i = 0; i < numberOfCards; i++) { if (i == 0) { From f18cff9842ea2c0fbd32e0f9cdef11201b8a8ee9 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 25 Feb 2024 05:22:26 +0100 Subject: [PATCH 20/32] gfdgfdg --- luckydiamond/src/pages/games-pages/JackpotPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index 76fb13c..b4fd657 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -491,7 +491,7 @@ export default { }); players.forEach((player) => { - const numberOfCards = player.WinningPercentage/5; // Предполагаем, что 10% это 1 карточка + const numberOfCards = player.WinningPercentage/7; // Предполагаем, что 10% это 1 карточка // const numberOfCards = player.WinningPercentage / 10; // Предполагаем, что 10% это 1 карточка for (let i = 0; i < numberOfCards; i++) { if (i == 0) { From 277d103103661a5a8c07500bc4e5608aaeda9948 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 25 Feb 2024 05:34:39 +0100 Subject: [PATCH 21/32] fdsfds --- luckydiamond/src/pages/games-pages/JackpotPage.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index b4fd657..cb2e6da 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -396,6 +396,7 @@ export default { lastUserWinerGameId: " ", lastUserWinner: "", firstStartOfPage: false, + winStake: 0, // lastIdGame: "", }; }, @@ -491,7 +492,7 @@ export default { }); players.forEach((player) => { - const numberOfCards = player.WinningPercentage/7; // Предполагаем, что 10% это 1 карточка + const numberOfCards = player.WinningPercentage / 7; // Предполагаем, что 10% это 1 карточка // const numberOfCards = player.WinningPercentage / 10; // Предполагаем, что 10% это 1 карточка for (let i = 0; i < numberOfCards; i++) { if (i == 0) { @@ -665,6 +666,8 @@ export default { try { if (data) { const dataObject = JSON.parse(data); + this.winStake = dataObject.CurrentGame.winStake; + console.log(dataObject); if (dataObject.CurrentGame.GameState == "WaitingForPlayers") { @@ -699,6 +702,7 @@ export default { if (dataObject.CurrentGame.GameState == "Running") { this.autoplay = 20; } + this.updatePlayerInfo( dataObject.LastGame.WinnerUserName, dataObject.LastGame.WinStake, From 1b16c9b50da5fdc890a3f1517c012da97eec8115 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 25 Feb 2024 05:38:21 +0100 Subject: [PATCH 22/32] fsdgfdsg --- luckydiamond/src/pages/games-pages/JackpotPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index cb2e6da..9b32745 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -105,7 +105,7 @@
    -
    3500
    +
    {{ bankValue }}
    БАНК
    From 5085e0c857d8e48bdb3303ce0d00d151a8220a39 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 25 Feb 2024 05:40:54 +0100 Subject: [PATCH 23/32] gdfg fdgfdgdfgf --- luckydiamond/src/pages/games-pages/JackpotPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index 9b32745..df37271 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -666,7 +666,7 @@ export default { try { if (data) { const dataObject = JSON.parse(data); - this.winStake = dataObject.CurrentGame.winStake; + this.winStake = dataObject.CurrentGame.WinStake; console.log(dataObject); From b9fa901d013ddcd8e4c91e594ee9209036de42e4 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 25 Feb 2024 05:56:09 +0100 Subject: [PATCH 24/32] gfdgfd gdfgfd --- .../src/assets/css/PagesStyles/games-pages/jackpot.css | 3 +++ luckydiamond/src/pages/games-pages/JackpotPage.vue | 9 +++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css b/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css index 98036ab..b0c9c26 100644 --- a/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css +++ b/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css @@ -145,6 +145,7 @@ /* Adjust based on your shield size */ height: auto; margin-left: 10px; + margin-bottom: -10px; } .bank-info { @@ -195,6 +196,8 @@ font-size: 24px; /* Large text size */ font-weight: bold; + margin-left: 1%; + /* Make the number bold */ } diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index df37271..6705293 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -104,10 +104,11 @@
    -
    -
    {{ bankValue }}
    -
    БАНК
    -
    + +
    БАНК:
    +

    +
    +
    Date: Sun, 25 Feb 2024 05:59:47 +0100 Subject: [PATCH 25/32] gfdgdfg --- .../src/assets/css/PagesStyles/games-pages/jackpot.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css b/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css index b0c9c26..eab476d 100644 --- a/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css +++ b/luckydiamond/src/assets/css/PagesStyles/games-pages/jackpot.css @@ -197,12 +197,16 @@ /* Large text size */ font-weight: bold; margin-left: 1%; - + font-family: Montserrat; + font-weight: bold; + color: #FFFFFF84; + text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); /* Make the number bold */ } .bank-name { - font-size: 14px; + font-size: 24px; + font-family: Montserrat; font-weight: bold; /* Smaller text size for 'БАНК' */ From e5b98e6408c4ece518f07fb341b62291e6450d2b Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 25 Feb 2024 06:12:23 +0100 Subject: [PATCH 26/32] gfdgfdgdf gdfsg sdfg --- luckydiamond/src/pages/games-pages/JackpotPage.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index 6705293..f2a6c34 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -702,6 +702,13 @@ export default { if (dataObject.CurrentGame.GameState == "Running") { this.autoplay = 20; + if (this.idCurrentGame=="") { + this.idCurrentGame = dataObject.CurrentGame.Id; + this.mapPlayersToSlides( + dataObject.CurrentGame.PlayerList, + dataObject.CurrentGame.PlayerList + ); + } } this.updatePlayerInfo( From 72aea3ad3f90457f2e64801fb854d99b09899163 Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 25 Feb 2024 06:23:36 +0100 Subject: [PATCH 27/32] gdfgdfdfg --- .../src/pages/games-pages/JackpotPage.vue | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index f2a6c34..63578fd 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -105,9 +105,9 @@
    -
    БАНК:
    -

    -
    +
    БАНК:
    +

    +
    Date: Sun, 25 Feb 2024 17:19:17 +0100 Subject: [PATCH 28/32] teryt --- .../src/components/HeaderComponent.vue | 72 +++++++++++++------ 1 file changed, 50 insertions(+), 22 deletions(-) diff --git a/luckydiamond/src/components/HeaderComponent.vue b/luckydiamond/src/components/HeaderComponent.vue index 3f840dd..94b72d8 100644 --- a/luckydiamond/src/components/HeaderComponent.vue +++ b/luckydiamond/src/components/HeaderComponent.vue @@ -4,7 +4,7 @@ import "@/assets/css/ComponentsStyles/header.css"; import { LogIn } from "@/assets/js/authentication/AuthService.js"; import { GetCurrentMoney } from "@/assets/js/rest/RestMethods.js"; -import {eventBus} from "@/main"; +import { eventBus } from "@/main"; import { SetCookie, @@ -18,30 +18,31 @@ export default { logout() { this.auth = false; this.balance = 0; - this.authtoken = '' + this.authtoken = ""; DeleteAllCookie(); }, updateBalanceMethod() { - GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")) - .then(response => { - this.balance = response.currentMoney - }) - eventBus.emit('Updatebalance-saper') - } + GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")).then( + (response) => { + this.balance = response.currentMoney; + } + ); + eventBus.emit("Updatebalance-saper"); + }, }, data() { return { balance: 0, auth: false, - authtoken: '', + authtoken: "", imageUrl: "https://avatar.spworlds.ru/face/55/", userName: "", }; }, mounted() { - eventBus.on('Updatebalance', () => { - this.updateBalanceMethod() - }) + eventBus.on("Updatebalance", () => { + this.updateBalanceMethod(); + }); }, created() { try { @@ -58,7 +59,7 @@ export default { this.imageUrl = this.imageUrl + `${response.spUserName}.png`; this.userName = response.spUserName; this.auth = true; - this.authtoken = response.authtoken + this.authtoken = response.authtoken; GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")) .then((response) => { this.balance = response.currentMoney; @@ -82,7 +83,7 @@ export default { this.imageUrl = this.imageUrl + `${currentUserName}.png`; this.userName = GetCookie("SpUserName"); this.auth = true; - this.authtoken = GetCookie('AUTHTOKEN') + this.authtoken = GetCookie("AUTHTOKEN"); } else { this.auth = false; this.balance = 0; @@ -104,7 +105,7 @@ export default { this.imageUrl = this.imageUrl + `${currentUserName}.png`; this.userName = GetCookie("SpUserName"); this.auth = true; - this.authtoken = GetCookie('AUTHTOKEN') + this.authtoken = GetCookie("AUTHTOKEN"); } else { this.auth = false; this.balance = 0; @@ -120,14 +121,39 @@ export default {
    @@ -160,7 +186,7 @@ export default {
    Вход - + + +
    From 49b0020527cffa1c52a6f2e2c9902f2a95e2527e Mon Sep 17 00:00:00 2001 From: Hepatica Date: Sun, 25 Feb 2024 17:31:48 +0100 Subject: [PATCH 29/32] change total duration --- luckydiamond/src/pages/games-pages/JackpotPage.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luckydiamond/src/pages/games-pages/JackpotPage.vue b/luckydiamond/src/pages/games-pages/JackpotPage.vue index 63578fd..f98f594 100644 --- a/luckydiamond/src/pages/games-pages/JackpotPage.vue +++ b/luckydiamond/src/pages/games-pages/JackpotPage.vue @@ -569,7 +569,7 @@ export default { // Действия после окончания таймера, если необходимо } else { this.remainingSeconds = Math.floor(diff / 1000); // Обновляем оставшееся время в секундах - const totalDuration = 10; // Допустим, обратный отсчет идет с 10 секунд1 + const totalDuration = 30; // Допустим, обратный отсчет идет с 10 секунд1 this.progressBarWidth = ((totalDuration - this.remainingSeconds) / totalDuration) * 100; } From 26a81269c7efa2e64a65660f15ab03601e44bb07 Mon Sep 17 00:00:00 2001 From: Hepatica <75219332+danilt2000@users.noreply.github.com> Date: Mon, 26 Feb 2024 18:56:31 +0100 Subject: [PATCH 30/32] Update HeaderComponent.vue --- luckydiamond/src/components/HeaderComponent.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/luckydiamond/src/components/HeaderComponent.vue b/luckydiamond/src/components/HeaderComponent.vue index 94b72d8..4104ea6 100644 --- a/luckydiamond/src/components/HeaderComponent.vue +++ b/luckydiamond/src/components/HeaderComponent.vue @@ -186,7 +186,7 @@ export default {
    Вход + + @@ -205,4 +207,4 @@ export default {
    \ No newline at end of file + From a7916360b95fd3aeb9d68345b7c549df4ea359bf Mon Sep 17 00:00:00 2001 From: Hepatica Date: Mon, 26 Feb 2024 21:05:44 +0100 Subject: [PATCH 31/32] Revert "Update HeaderComponent.vue" This reverts commit 26a81269c7efa2e64a65660f15ab03601e44bb07. --- luckydiamond/src/components/HeaderComponent.vue | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/luckydiamond/src/components/HeaderComponent.vue b/luckydiamond/src/components/HeaderComponent.vue index 4104ea6..94b72d8 100644 --- a/luckydiamond/src/components/HeaderComponent.vue +++ b/luckydiamond/src/components/HeaderComponent.vue @@ -186,7 +186,7 @@ export default {
    Вход - - @@ -207,4 +205,4 @@ export default { + \ No newline at end of file From 754cfabf3787713a86a0f151ce914c7e4bf074ee Mon Sep 17 00:00:00 2001 From: Hepatica Date: Mon, 26 Feb 2024 21:09:13 +0100 Subject: [PATCH 32/32] Revert "Revert "Update HeaderComponent.vue"" This reverts commit a7916360b95fd3aeb9d68345b7c549df4ea359bf. --- luckydiamond/src/components/HeaderComponent.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/luckydiamond/src/components/HeaderComponent.vue b/luckydiamond/src/components/HeaderComponent.vue index 94b72d8..4104ea6 100644 --- a/luckydiamond/src/components/HeaderComponent.vue +++ b/luckydiamond/src/components/HeaderComponent.vue @@ -186,7 +186,7 @@ export default {
    Вход + + @@ -205,4 +207,4 @@ export default { \ No newline at end of file +