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>
<html>
<head>
<meta charset="UTF-8">
</head>
<body>
[Отображение Скинов](https://visage.surgeplay.com/index.html)
<h1>Важные ссылки</h1>
<h2>Отображение головы</h2>
https://visage.surgeplay.com/index.html
[Вдохновление](https://cs.fail/en/)
![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>
![team](https://github.com/danilt2000/LuckyDiamond/assets/96600211/0c1b43b7-fe67-4fca-85ef-16f314847b70)

View File

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

View File

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

View File

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

View File

@@ -91,19 +91,21 @@ export default {
},
created() {
GetChatHistory().then((response) => {
response.forEach((element) => {
let imageUrl = "https://avatar.spworlds.ru/face/55/" + element.userName;
if (response && response.length) {
response.forEach((element) => {
let imageUrl = "https://avatar.spworlds.ru/face/55/" + element.userName;
const MsgUser = {
id: this.id + 1,
msg: element.message,
username: element.userName,
icon: imageUrl,
};
const MsgUser = {
id: this.id + 1,
msg: element.message,
username: element.userName,
icon: imageUrl,
};
this.array.push(MsgUser);
});
this.ScrollToBottom();
this.array.push(MsgUser);
});
this.ScrollToBottom();
}
});
},
};

View File

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

View File

@@ -201,6 +201,7 @@ export default {
balance: 0,
winningAmount: 0,
gamesCircle: 0,
gameTurn: 0,
ErrorClick: '',
gameStart: false,
offEventPointers: false,
@@ -227,8 +228,85 @@ export default {
}
},
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) {
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) {
try {
await GetPercentageSteps(this.amountCrystals)
@@ -248,7 +326,7 @@ export default {
flippedCards: {
async handler(value) {
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}`)
if (this.gameStart !== false) {
@@ -303,6 +381,7 @@ export default {
this.gameStart = false
this.gamesCircle = 0
this.winningAmount = 0
this.gameTurn = 0
const SoundCorrect = new Howl({
src: ['/sounds/incorrect-sound.mp3'],
volume: 0.5
@@ -329,6 +408,7 @@ export default {
this.offEventPointers = false
this.gameStart = false
this.gamesCircle = 0
this.gameTurn = 0
this.claimWinningAmount()
@@ -360,6 +440,8 @@ export default {
this.amountCrystals = response.MinesCount
this.amountDeposit = response.PuttedMoney
this.winningAmount = response.WinningMoney
this.emeraldsAmount = 25 - this.amountCrystals - response.CurrentUserTurn
this.gameTurn = response.CurrentUserTurn
const soundStartGame = new Howl({
src: ['/sounds/start-game.mp3'],
@@ -431,6 +513,7 @@ export default {
this.offEventPointers = false
this.gameStart = false
this.gamesCircle = 0
this.gameTurn = 0
await GetWinningAmount({ SearchToken: GetCookie('SearchToken'), AuthToken: GetCookie('AUTHTOKEN') })
this.winningAmount = 0