diff --git a/luckydiamond/src/assets/css/ComponentsStyles/header.css b/luckydiamond/src/assets/css/ComponentsStyles/header.css index 510c86a..a41484b 100644 --- a/luckydiamond/src/assets/css/ComponentsStyles/header.css +++ b/luckydiamond/src/assets/css/ComponentsStyles/header.css @@ -24,6 +24,11 @@ font-weight: 700; font-size: 18px; margin-right: 3em; + transition: 250ms; +} + +.header__nav nav a:hover { + color: #EF4444; } .header__nav--now { @@ -84,6 +89,7 @@ padding: 20px 23px 20px 23px; text-decoration: none; margin-left: -15%; + transition: 200ms; } .header__auth--discord { diff --git a/luckydiamond/src/assets/css/PagesStyles/home.css b/luckydiamond/src/assets/css/PagesStyles/home.css index a2ad6b8..9c2f496 100644 --- a/luckydiamond/src/assets/css/PagesStyles/home.css +++ b/luckydiamond/src/assets/css/PagesStyles/home.css @@ -137,6 +137,7 @@ font-weight: 700; text-transform: uppercase; text-align: center; + padding: 0px 0px 0px 28px; } .line__footer { @@ -175,13 +176,36 @@ .line__img__jackpot { display: flex; - margin: 1% 6.6% 1% 4.7%; + margin: 1% 6.6% 1% 0%; } .display-firstline { display: flex; } +.cumming_soon_btn { + 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 0px 11px 11px; + text-decoration: none; + text-transform: uppercase; + position: relative; + bottom: 5%; + left: 2%; + transition: 250ms; + cursor: default; +} + +.cumming_soon_btn:hover { + background-color: #525252; +} + .line__btn { border-radius: 21px; background: #FFF; @@ -191,14 +215,31 @@ font-family: Montserrat Alternates; font-size: 36px; font-weight: 700; - padding: 11px 11px; + padding: 11px 0px 11px 11px; text-decoration: none; text-transform: uppercase; position: relative; bottom: 5%; left: 2%; + transition: 250ms; } +.line__btn span:after { + content: '\00bb'; + opacity: 0; + transition: 250ms; + } + +.line__btn:hover span:after { + opacity: 1; + right: 0; + padding-right: 0px; + } + +.line__btn:hover { + padding:11px 11px 11px 22px ; + } + .line__btn__jackpot { border-radius: 21px; background: #FFF; @@ -208,14 +249,31 @@ font-family: Montserrat Alternates; font-size: 36px; font-weight: 700; - padding: 11px 11px; + padding: 11px 0px 11px 11px; text-decoration: none; text-transform: uppercase; position: relative; bottom: 4%; left: 6%; + transition: 250ms; } +.line__btn__jackpot span:after { + content: '\00bb'; + opacity: 0; + transition: 250ms; + } + +.line__btn__jackpot:hover span:after { + opacity: 1; + right: 0; + padding-right: 0px; + } + +.line__btn__jackpot:hover { + padding:11px 11px 11px 22px ; + } + .line__btn--elm { color: #000; font-size: 38px ; diff --git a/luckydiamond/src/assets/js/chat/ChatLogic.js b/luckydiamond/src/assets/js/chat/ChatLogic.js index 9dea039..8566c14 100644 --- a/luckydiamond/src/assets/js/chat/ChatLogic.js +++ b/luckydiamond/src/assets/js/chat/ChatLogic.js @@ -10,7 +10,6 @@ export function ConnectToChat() { try { if (webSocket && webSocket.readyState === WebSocket.OPEN) { - console.log('WebSocket connection already established.'); return; } @@ -22,17 +21,28 @@ export function ConnectToChat() { webSocket.onmessage = function (event) { - const dataObject = JSON.parse(event.data); + try { + const dataObject = JSON.parse(event.data); - 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) - } + if (dataObject && Object.prototype.hasOwnProperty.call(dataObject, 'SpUserName') && Object.prototype.hasOwnProperty.call(dataObject, 'Message')) { + eventBus.emit('dataChat', event.data); + return; + } - // console.log('Message from Server:', event.data); + if (dataObject.MessageType == "CrashGameState") { + eventBus.emit('crash', event.data); + return; + + } + + if (Array.isArray(dataObject.CurrentGame.PlayerList)) { + eventBus.emit('jackpotGameTik', event.data); + return; + } + + } catch (error) { + void(error); + } }; webSocket.onclose = function () { diff --git a/luckydiamond/src/assets/js/jackpot/JackpotLogic.js b/luckydiamond/src/assets/js/jackpot/JackpotLogic.js index ef1fa78..3213b34 100644 --- a/luckydiamond/src/assets/js/jackpot/JackpotLogic.js +++ b/luckydiamond/src/assets/js/jackpot/JackpotLogic.js @@ -1,59 +1,59 @@ -import { BackendWebSocketJackpotUrl } from '@/properties/Сonfig.js'; +// import { BackendWebSocketJackpotUrl } from '@/properties/Сonfig.js'; import { BackendApiUrl } from '@/properties/Сonfig.js'; -import { eventBus } from "@/main"; +// import { eventBus } from "@/main"; // import { // GetCookie // } from "@/assets/js/storage/CookieStorage.js"; -let webSocket; +// let webSocket; -export function ConnectToJackpotSocket() { - try { +// export function ConnectToJackpotSocket() { +// try { - if (webSocket && webSocket.readyState === WebSocket.OPEN) { - console.log('WebSocket connection already established.'); - return; - } +// if (webSocket && webSocket.readyState === WebSocket.OPEN) { +// console.log('WebSocket connection already established.'); +// return; +// } - webSocket = new WebSocket(BackendWebSocketJackpotUrl); +// webSocket = new WebSocket(BackendWebSocketJackpotUrl); - webSocket.onopen = function () { - console.log('Connection established'); - }; +// webSocket.onopen = function () { +// console.log('Connection established'); +// }; - webSocket.onmessage = function (event) { +// webSocket.onmessage = function (event) { - // const dataObject = JSON.parse(event.data); +// // const dataObject = JSON.parse(event.data); - eventBus.emit('jackpotGameTik', 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) - // } +// // 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.onclose = function () { - webSocket = new WebSocket(BackendWebSocketJackpotUrl); +// webSocket = new WebSocket(BackendWebSocketJackpotUrl); - console.log('Connection closed and reconnected'); - }; +// 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); - } -} +// webSocket.onerror = function (event) { +// webSocket = new WebSocket(BackendWebSocketJackpotUrl); +// console.error('WebSocket Error:', event); +// }; +// } catch (error) { +// console.error('Error in ConnectToChat:', error); +// } +// } export async function JoinJackpotGame(userData, amount) { const data = { diff --git a/luckydiamond/src/pages/HomePage.vue b/luckydiamond/src/pages/HomePage.vue index 41ce281..4fd965b 100644 --- a/luckydiamond/src/pages/HomePage.vue +++ b/luckydiamond/src/pages/HomePage.vue @@ -42,7 +42,7 @@ href="#" @click="$router.push({ name: 'saper' })" class="line__btn" - >play >play @@ -66,7 +66,7 @@ href="#" @click="$router.push({ name: 'jackpot' })" class="line__btn__jackpot" - >play > play @@ -84,8 +84,8 @@