diff --git a/README.md b/README.md index b0dbb36..2b0f14d 100644 --- a/README.md +++ b/README.md @@ -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) - - - - - - - +[Отображение Скинов](https://visage.surgeplay.com/index.html) - -

Важные ссылки

-

Отображение головы

-https://visage.surgeplay.com/index.html +[Вдохновление](https://cs.fail/en/) - ![image](https://visage.surgeplay.com/head/512/Hepatir.png) -

Sp api

-https://github.com/sp-worlds/api-docs -

Discord api

- https://discord.com/developers/docs/topics/oauth2#oauth2 +## Наша Команда - -

Откуда берём вдохновление

- https://cs.fail/en/ - - - +![team](https://github.com/danilt2000/LuckyDiamond/assets/96600211/0c1b43b7-fe67-4fca-85ef-16f314847b70) diff --git a/luckydiamond/src/assets/css/ComponentsStyles/chat.css b/luckydiamond/src/assets/css/ComponentsStyles/chat.css index 87ef473..32f6ef6 100644 --- a/luckydiamond/src/assets/css/ComponentsStyles/chat.css +++ b/luckydiamond/src/assets/css/ComponentsStyles/chat.css @@ -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; diff --git a/luckydiamond/src/assets/css/PagesStyles/games-pages/saper.css b/luckydiamond/src/assets/css/PagesStyles/games-pages/saper.css index 6090765..645b198 100644 --- a/luckydiamond/src/assets/css/PagesStyles/games-pages/saper.css +++ b/luckydiamond/src/assets/css/PagesStyles/games-pages/saper.css @@ -452,7 +452,7 @@ input[type="number"]::-webkit-outer-spin-button { display: flex; justify-content: center; position: relative; - left: 7px; + left: 17px; } .circles { diff --git a/luckydiamond/src/assets/css/global.css b/luckydiamond/src/assets/css/global.css index 2fa6e95..3e048ac 100644 --- a/luckydiamond/src/assets/css/global.css +++ b/luckydiamond/src/assets/css/global.css @@ -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; } diff --git a/luckydiamond/src/components/ChatComponent.vue b/luckydiamond/src/components/ChatComponent.vue index c0ebe58..9ad4b69 100644 --- a/luckydiamond/src/components/ChatComponent.vue +++ b/luckydiamond/src/components/ChatComponent.vue @@ -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(); + } }); }, }; diff --git a/luckydiamond/src/components/WritechatComponent.vue b/luckydiamond/src/components/WritechatComponent.vue index ead608a..78fba92 100644 --- a/luckydiamond/src/components/WritechatComponent.vue +++ b/luckydiamond/src/components/WritechatComponent.vue @@ -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; + // }, }, }; diff --git a/luckydiamond/src/pages/games-pages/SapergamePage.vue b/luckydiamond/src/pages/games-pages/SapergamePage.vue index 95d6486..3045527 100644 --- a/luckydiamond/src/pages/games-pages/SapergamePage.vue +++ b/luckydiamond/src/pages/games-pages/SapergamePage.vue @@ -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