Merge branch 'main' into DevelopMadara

This commit is contained in:
Madara0330E
2024-01-30 19:42:07 +03:00
7 changed files with 153 additions and 48 deletions

View File

@@ -1,30 +1,44 @@
![Lucky Diamond](https://github.com/danilt2000/LuckyDiamond/assets/96600211/26167263-51c4-4ae6-96e9-c941943c913f)
# Проект "Lucky Diamond Casino"
Сайт Онлайн-Казино на игровую валюту Майнкрафт сервера СПМ.
## Вклад и Разработка
Если вы хотите дополнить или улучшить визуал нашего сайта, то сделайте pull запрос к этому репозиторию.
### Запуск Проекта
- Переход к папке проекта:
`cd LuckyDiamond/luckydiamond`
- Установка всех зависимостей проекта:
`npm i`
- Запуск локального сервера:
`npm run serve`
### Добавление Куки-Файлов для локального сервера
- Зайти на vercel страницу
- Нажать сочетание клавиш ctrl + shift + i
- Перейти в Application(Приложение)
- Кликнуть на файлы Куки
- Нажать на нашу ссылку и скопировать AUTHTOKEN, SearchToken, SpUserName, UserId
- Вставить значения и названия на Локальный хост
- Обновить страницу
## Важные ссылки
[Документация SPWorlds](https://github.com/sp-worlds/api-docs)
[DiscordAPI](https://discord.com/developers/docs/topics/oauth2#oauth2)
<!DOCTYPE html> [Отображение Скинов](https://visage.surgeplay.com/index.html)
<html>
<head>
<meta charset="UTF-8">
</head> [Вдохновление](https://cs.fail/en/)
<body>
## Наша Команда
<h1>Важные ссылки</h1> ![team](https://github.com/danilt2000/LuckyDiamond/assets/96600211/0c1b43b7-fe67-4fca-85ef-16f314847b70)
<h2>Отображение головы</h2>
https://visage.surgeplay.com/index.html
![image](https://visage.surgeplay.com/head/512/Hepatir.png)
<h2>Sp api</h2>
https://github.com/sp-worlds/api-docs
<h2>Discord api </h2>
https://discord.com/developers/docs/topics/oauth2#oauth2
<h2>Откуда берём вдохновление </h2>
https://cs.fail/en/
</body>
</html>

View File

@@ -18,6 +18,7 @@
.chat { .chat {
margin: 1% 3.2% 0 0; margin: 1% 3.2% 0 0;
word-break: break-all;
} }
.chat__content { .chat__content {
@@ -55,7 +56,8 @@
} }
.chat__content--users { .chat__content--users {
height: 590px; /* height: 590px; */
height: 70vh;
width: auto; width: auto;
overflow-y: auto; overflow-y: auto;
overflow-x: auto; overflow-x: auto;

View File

@@ -452,7 +452,7 @@ input[type="number"]::-webkit-outer-spin-button {
display: flex; display: flex;
justify-content: center; justify-content: center;
position: relative; position: relative;
left: 7px; left: 17px;
} }
.circles { .circles {

View File

@@ -106,8 +106,9 @@ body, html {
grid-area: chat; grid-area: chat;
background: #16171B; background: #16171B;
filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25)); filter: drop-shadow(0px 4px 4px rgba(0, 0, 0, 0.25));
border-radius: 20px; border-radius: 0;
height: 90%; /* border-radius: 20px; */
height: 100%;
position: relative; position: relative;
z-index: 3; z-index: 3;
} }

View File

@@ -91,6 +91,7 @@ export default {
}, },
created() { created() {
GetChatHistory().then((response) => { GetChatHistory().then((response) => {
if (response && response.length) {
response.forEach((element) => { response.forEach((element) => {
let imageUrl = "https://avatar.spworlds.ru/face/55/" + element.userName; let imageUrl = "https://avatar.spworlds.ru/face/55/" + element.userName;
@@ -104,6 +105,7 @@ export default {
this.array.push(MsgUser); this.array.push(MsgUser);
}); });
this.ScrollToBottom(); this.ScrollToBottom();
}
}); });
}, },
}; };

View File

@@ -42,18 +42,21 @@ export default {
} }
}, },
SendmsgData() { SendmsgData() {
const formattedWord = this.InsertSpaceEvery24Chars(this.msg); // const formattedWord = this.InsertSpaceEvery24Chars(this.msg);
this.$emit("send", [formattedWord, this.username, this.icon]); this.$emit("send", [this.msg, this.username, this.icon]);
this.msg = ""; this.msg = "";
}, },
InsertSpaceEvery24Chars(word) { // InsertSpaceEvery24Chars(text) {
let result = ""; // let result = "";
for (let i = 0; i < word.length; i += 22) { // for (let i = 0; i < text.length; i++) {
result += word.substring(i, i + 22) + " "; // if (i > 0 && i % 24 === 0) {
} // result += " ";
return result.trim(); // }
}, // result += text[i];
// }
// return result;
// },
}, },
}; };
</script> </script>

View File

@@ -201,6 +201,7 @@ export default {
balance: 0, balance: 0,
winningAmount: 0, winningAmount: 0,
gamesCircle: 0, gamesCircle: 0,
gameTurn: 0,
ErrorClick: '', ErrorClick: '',
gameStart: false, gameStart: false,
offEventPointers: false, offEventPointers: false,
@@ -227,8 +228,85 @@ export default {
} }
}, },
watch: { watch: {
amountDeposit(DepositCount) {
if (![1, 5, 10, 50, 100, parseInt(this.balance)].includes(DepositCount)) {
this.clickedBtn = null
}
else {
let index
switch (DepositCount) {
case 1:
if (parseInt(this.balance) === DepositCount) {
index = 5
}
else {
index = 0
}
break
case 5:
if (parseInt(this.balance) === DepositCount) {
index = 5
}
else {
index = 1
}
break
case 10:
if (parseInt(this.balance) === DepositCount) {
index = 5
}
else {
index = 2
}
break
case 50:
if (parseInt(this.balance) === DepositCount) {
index = 5
}
else {
index = 3
}
break
case 100:
if (parseInt(this.balance) === DepositCount) {
index = 5
}
else {
index = 4
}
break
case parseInt(this.balance):
index = 5
break
}
this.clickedBtnChoice(index, DepositCount)
}
},
async amountCrystals(CrystalsCount) { async amountCrystals(CrystalsCount) {
this.PercentageGameSteps = [] this.PercentageGameSteps = []
if (![1, 5, 10, 24].includes(CrystalsCount)) {
this.clickedBtnCrystal = null
}
else {
let index
switch (CrystalsCount) {
case 1:
index = 0
break
case 5:
index = 1
break
case 10:
index = 2
break
case 24:
index = 3
break
}
this.clickedBtnCrystals(index, CrystalsCount)
}
if (CrystalsCount >= 1 && CrystalsCount <= 24) { if (CrystalsCount >= 1 && CrystalsCount <= 24) {
try { try {
await GetPercentageSteps(this.amountCrystals) await GetPercentageSteps(this.amountCrystals)
@@ -248,7 +326,7 @@ export default {
flippedCards: { flippedCards: {
async handler(value) { async handler(value) {
if (value.length < 1 || this.ValidationPlay.endGame === true) return if (value.length < 1 || this.ValidationPlay.endGame === true) return
const maxCircles = 25 - this.amountCrystals const maxCircles = 25 - this.amountCrystals - this.gameTurn
console.log(`MAXCIRLES - ${maxCircles} VALUE: ${value} GAMECIRCLE - ${this.gamesCircle}`) console.log(`MAXCIRLES - ${maxCircles} VALUE: ${value} GAMECIRCLE - ${this.gamesCircle}`)
if (this.gameStart !== false) { if (this.gameStart !== false) {
@@ -303,6 +381,7 @@ export default {
this.gameStart = false this.gameStart = false
this.gamesCircle = 0 this.gamesCircle = 0
this.winningAmount = 0 this.winningAmount = 0
this.gameTurn = 0
const SoundCorrect = new Howl({ const SoundCorrect = new Howl({
src: ['/sounds/incorrect-sound.mp3'], src: ['/sounds/incorrect-sound.mp3'],
volume: 0.5 volume: 0.5
@@ -329,6 +408,7 @@ export default {
this.offEventPointers = false this.offEventPointers = false
this.gameStart = false this.gameStart = false
this.gamesCircle = 0 this.gamesCircle = 0
this.gameTurn = 0
this.claimWinningAmount() this.claimWinningAmount()
@@ -360,6 +440,8 @@ export default {
this.amountCrystals = response.MinesCount this.amountCrystals = response.MinesCount
this.amountDeposit = response.PuttedMoney this.amountDeposit = response.PuttedMoney
this.winningAmount = response.WinningMoney this.winningAmount = response.WinningMoney
this.emeraldsAmount = 25 - this.amountCrystals - response.CurrentUserTurn
this.gameTurn = response.CurrentUserTurn
const soundStartGame = new Howl({ const soundStartGame = new Howl({
src: ['/sounds/start-game.mp3'], src: ['/sounds/start-game.mp3'],
@@ -431,6 +513,7 @@ export default {
this.offEventPointers = false this.offEventPointers = false
this.gameStart = false this.gameStart = false
this.gamesCircle = 0 this.gamesCircle = 0
this.gameTurn = 0
await GetWinningAmount({ SearchToken: GetCookie('SearchToken'), AuthToken: GetCookie('AUTHTOKEN') }) await GetWinningAmount({ SearchToken: GetCookie('SearchToken'), AuthToken: GetCookie('AUTHTOKEN') })
this.winningAmount = 0 this.winningAmount = 0