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-weight: 700;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
margin-right: 3em;
|
margin-right: 3em;
|
||||||
|
transition: 250ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header__nav nav a:hover {
|
||||||
|
color: #EF4444;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header__nav--now {
|
.header__nav--now {
|
||||||
@@ -84,6 +89,7 @@
|
|||||||
padding: 20px 23px 20px 23px;
|
padding: 20px 23px 20px 23px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
margin-left: -15%;
|
margin-left: -15%;
|
||||||
|
transition: 200ms;
|
||||||
}
|
}
|
||||||
|
|
||||||
.header__auth--discord {
|
.header__auth--discord {
|
||||||
|
|||||||
@@ -137,6 +137,7 @@
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
padding: 0px 0px 0px 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line__footer {
|
.line__footer {
|
||||||
@@ -175,13 +176,36 @@
|
|||||||
|
|
||||||
.line__img__jackpot {
|
.line__img__jackpot {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 1% 6.6% 1% 4.7%;
|
margin: 1% 6.6% 1% 0%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.display-firstline {
|
.display-firstline {
|
||||||
display: flex;
|
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 {
|
.line__btn {
|
||||||
border-radius: 21px;
|
border-radius: 21px;
|
||||||
background: #FFF;
|
background: #FFF;
|
||||||
@@ -191,12 +215,29 @@
|
|||||||
font-family: Montserrat Alternates;
|
font-family: Montserrat Alternates;
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
padding: 11px 11px;
|
padding: 11px 0px 11px 11px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 5%;
|
bottom: 5%;
|
||||||
left: 2%;
|
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 {
|
.line__btn__jackpot {
|
||||||
@@ -208,12 +249,29 @@
|
|||||||
font-family: Montserrat Alternates;
|
font-family: Montserrat Alternates;
|
||||||
font-size: 36px;
|
font-size: 36px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
padding: 11px 11px;
|
padding: 11px 0px 11px 11px;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
position: relative;
|
position: relative;
|
||||||
bottom: 4%;
|
bottom: 4%;
|
||||||
left: 6%;
|
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 {
|
.line__btn--elm {
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ export function ConnectToChat() {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
if (webSocket && webSocket.readyState === WebSocket.OPEN) {
|
if (webSocket && webSocket.readyState === WebSocket.OPEN) {
|
||||||
console.log('WebSocket connection already established.');
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -22,17 +21,28 @@ export function ConnectToChat() {
|
|||||||
|
|
||||||
webSocket.onmessage = function (event) {
|
webSocket.onmessage = function (event) {
|
||||||
|
|
||||||
|
try {
|
||||||
const dataObject = JSON.parse(event.data);
|
const dataObject = JSON.parse(event.data);
|
||||||
|
|
||||||
if (dataObject && Object.prototype.hasOwnProperty.call(dataObject, 'SpUserName') && Object.prototype.hasOwnProperty.call(dataObject, 'Message')) {
|
if (dataObject && Object.prototype.hasOwnProperty.call(dataObject, 'SpUserName') && Object.prototype.hasOwnProperty.call(dataObject, 'Message')) {
|
||||||
eventBus.emit('dataChat', event.data);
|
eventBus.emit('dataChat', event.data);
|
||||||
console.log('CHAT')
|
return;
|
||||||
}
|
|
||||||
else {
|
|
||||||
eventBus.emit('crash', event.data)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 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 () {
|
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 { BackendApiUrl } from '@/properties/Сonfig.js';
|
||||||
import { eventBus } from "@/main";
|
// import { eventBus } from "@/main";
|
||||||
|
|
||||||
// import {
|
// import {
|
||||||
// GetCookie
|
// GetCookie
|
||||||
// } from "@/assets/js/storage/CookieStorage.js";
|
// } from "@/assets/js/storage/CookieStorage.js";
|
||||||
|
|
||||||
let webSocket;
|
// let webSocket;
|
||||||
|
|
||||||
export function ConnectToJackpotSocket() {
|
// export function ConnectToJackpotSocket() {
|
||||||
try {
|
// try {
|
||||||
|
|
||||||
if (webSocket && webSocket.readyState === WebSocket.OPEN) {
|
// if (webSocket && webSocket.readyState === WebSocket.OPEN) {
|
||||||
console.log('WebSocket connection already established.');
|
// console.log('WebSocket connection already established.');
|
||||||
return;
|
// 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 = new WebSocket(BackendWebSocketJackpotUrl);
|
||||||
|
|
||||||
webSocket.onclose = function () {
|
// webSocket.onopen = function () {
|
||||||
|
// console.log('Connection established');
|
||||||
|
// };
|
||||||
|
|
||||||
webSocket = new WebSocket(BackendWebSocketJackpotUrl);
|
// webSocket.onmessage = function (event) {
|
||||||
|
|
||||||
console.log('Connection closed and reconnected');
|
// // const dataObject = JSON.parse(event.data);
|
||||||
};
|
|
||||||
|
|
||||||
webSocket.onerror = function (event) {
|
// eventBus.emit('jackpotGameTik', event.data);
|
||||||
webSocket = new WebSocket(BackendWebSocketJackpotUrl);
|
|
||||||
console.error('WebSocket Error:', event);
|
// // console.log(dataObject)
|
||||||
};
|
// // if (dataObject && Object.prototype.hasOwnProperty.call(dataObject, 'SpUserName') && Object.prototype.hasOwnProperty.call(dataObject, 'Message')) {
|
||||||
} catch (error) {
|
// // eventBus.emit('dataChat', event.data);
|
||||||
console.error('Error in ConnectToChat:', error);
|
// // 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);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
export async function JoinJackpotGame(userData, amount) {
|
export async function JoinJackpotGame(userData, amount) {
|
||||||
const data = {
|
const data = {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
href="#"
|
href="#"
|
||||||
@click="$router.push({ name: 'saper' })"
|
@click="$router.push({ name: 'saper' })"
|
||||||
class="line__btn"
|
class="line__btn"
|
||||||
>play <span class="line__btn--elm--saper">></span></a
|
>play <span class="line__btn--elm--saper"></span></a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
href="#"
|
href="#"
|
||||||
@click="$router.push({ name: 'jackpot' })"
|
@click="$router.push({ name: 'jackpot' })"
|
||||||
class="line__btn__jackpot"
|
class="line__btn__jackpot"
|
||||||
>play <span class="line__btn--elm">></span></a
|
> play <span class="line__btn--elm"></span></a
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -84,8 +84,8 @@
|
|||||||
<h3 class="title-twoline">скоро</h3>
|
<h3 class="title-twoline">скоро</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<a href="#" class="line__btn"
|
<a href="#" class="cumming_soon_btn"
|
||||||
>play <span class="line__btn--elm">></span></a
|
>play <span class="line__btn--elm"></span></a
|
||||||
>
|
>
|
||||||
<img src="@/assets/icons-gamemodes/slots-icon.png" style="margin-bottom: 4%;" />
|
<img src="@/assets/icons-gamemodes/slots-icon.png" style="margin-bottom: 4%;" />
|
||||||
</div>
|
</div>
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
href="#"
|
href="#"
|
||||||
@click="$router.push({ name: 'crash' })"
|
@click="$router.push({ name: 'crash' })"
|
||||||
class="line__btn"
|
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" />
|
<img src="@/assets/icons-gamemodes/crush-icon.svg" />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ import "@/assets/css/PagesStyles/games-pages/jackpot.css";
|
|||||||
import "@/assets/css/global.css";
|
import "@/assets/css/global.css";
|
||||||
import JackpotNumbers from "@/mocks/JackpotNumbers";
|
import JackpotNumbers from "@/mocks/JackpotNumbers";
|
||||||
import {
|
import {
|
||||||
ConnectToJackpotSocket,
|
// ConnectToJackpotSocket,
|
||||||
JoinJackpotGame,
|
JoinJackpotGame,
|
||||||
} from "@/assets/js/jackpot/JackpotLogic.js";
|
} from "@/assets/js/jackpot/JackpotLogic.js";
|
||||||
import { useVuelidate } from "@vuelidate/core";
|
import { useVuelidate } from "@vuelidate/core";
|
||||||
@@ -659,7 +659,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
ConnectToJackpotSocket();
|
// ConnectToJackpotSocket();
|
||||||
|
|
||||||
eventBus.on("jackpotGameTik", (data) => {
|
eventBus.on("jackpotGameTik", (data) => {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -72,6 +72,12 @@
|
|||||||
font-family: Montserrat Alternates;
|
font-family: Montserrat Alternates;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
|
transition: 250ms;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header_other_text_menu:hover {
|
||||||
|
color: #EF4444;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.flex-container {
|
.flex-container {
|
||||||
|
|||||||
Reference in New Issue
Block a user