mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 04:09:29 +02:00
Merge branch 'main' of https://github.com/danilt2000/LuckyDiamond
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 ;
|
||||
|
||||
@@ -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 () {
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
href="#"
|
||||
@click="$router.push({ name: 'saper' })"
|
||||
class="line__btn"
|
||||
>play <span class="line__btn--elm--saper">></span></a
|
||||
>play <span class="line__btn--elm--saper"></span></a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,7 +66,7 @@
|
||||
href="#"
|
||||
@click="$router.push({ name: 'jackpot' })"
|
||||
class="line__btn__jackpot"
|
||||
>play <span class="line__btn--elm">></span></a
|
||||
> play <span class="line__btn--elm"></span></a
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,8 +84,8 @@
|
||||
<h3 class="title-twoline">скоро</h3>
|
||||
</div>
|
||||
<div class="container">
|
||||
<a href="#" class="line__btn"
|
||||
>play <span class="line__btn--elm">></span></a
|
||||
<a href="#" class="cumming_soon_btn"
|
||||
>play <span class="line__btn--elm"></span></a
|
||||
>
|
||||
<img src="@/assets/icons-gamemodes/slots-icon.png" style="margin-bottom: 4%;" />
|
||||
</div>
|
||||
@@ -104,7 +104,7 @@
|
||||
href="#"
|
||||
@click="$router.push({ name: 'crash' })"
|
||||
class="line__btn"
|
||||
>play <span class="line__btn--elm">></span></a
|
||||
>play <span class="line__btn--elm"></span></a
|
||||
>
|
||||
<img src="@/assets/icons-gamemodes/crush-icon.svg" />
|
||||
</div>
|
||||
|
||||
@@ -263,7 +263,7 @@ import "@/assets/css/PagesStyles/games-pages/jackpot.css";
|
||||
import "@/assets/css/global.css";
|
||||
import JackpotNumbers from "@/mocks/JackpotNumbers";
|
||||
import {
|
||||
ConnectToJackpotSocket,
|
||||
// ConnectToJackpotSocket,
|
||||
JoinJackpotGame,
|
||||
} from "@/assets/js/jackpot/JackpotLogic.js";
|
||||
import { useVuelidate } from "@vuelidate/core";
|
||||
@@ -659,7 +659,7 @@ export default {
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
ConnectToJackpotSocket();
|
||||
// ConnectToJackpotSocket();
|
||||
|
||||
eventBus.on("jackpotGameTik", (data) => {
|
||||
try {
|
||||
|
||||
@@ -72,6 +72,12 @@
|
||||
font-family: Montserrat Alternates;
|
||||
font-size: 18px;
|
||||
font-weight: 700;
|
||||
transition: 250ms;
|
||||
}
|
||||
|
||||
.header_other_text_menu:hover {
|
||||
color: #EF4444;
|
||||
|
||||
}
|
||||
|
||||
.flex-container {
|
||||
|
||||
Reference in New Issue
Block a user