Revert "Merge pull request #21 from danilt2000/DevelopCkutls"

This reverts commit 25c8bab94f, reversing
changes made to 3b06b7ef2d.
This commit is contained in:
rafael1209
2024-04-08 21:05:36 +03:00
parent cf57aaa54c
commit 2d65e4cd74
16 changed files with 94 additions and 1324 deletions

View File

@@ -5,14 +5,13 @@
border-radius: 20px;
background: #17181C;
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
height: 130px;
height: 45%;
}
.header-mobile__content {
display: flex;
align-items: center;
justify-content: space-between;
margin-right: 5%;
}
.header-mobile__logo {
@@ -86,41 +85,4 @@
margin-left: 15px;
}
.mobile-auth__card--content a {
padding: 6px 5px;
font-size: 14px;
margin-left: 5%;
}
.mobile-auth__card--content img {
width: 1.8em;
}
.mobile-discord__card {
margin: 0 1.5em 0 1.5em;
}
.mobile-discord__card .discord__card--name {
margin: 0 5% 0 -10%;
}
.mobile-discord__card .header__card--discord img {
width: 60%;
}
/* /Header */
@media screen and (max-width: 430px) {
.header-mobile__end {
align-items: unset;
justify-content: unset;
flex-direction: column;
margin-top: .5em;
}
.header-mobile__balance--content {
margin-bottom: .5em;
}
.mobile-auth__card--content a {
padding: 6px 30px;
}
}
/* /Header */

View File

@@ -26,12 +26,16 @@
width: 100%;
}
.icon-start {
margin-left: 8%;
}
.icon-end {
margin-left: 9%;
}
.icon-center {
margin-left: 9%;
}
.disabled {
pointer-events: none;
}
/* /Footer */

View File

@@ -69,7 +69,6 @@ body {
text-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
font-family: Montserrat Alternates;
text-transform: uppercase;
word-break: break-word;
}
.card-two {

View File

@@ -2,6 +2,10 @@ body {
overflow-y: scroll;
}
.header-mobile {
height: 70%;
}
.profile-mobile {
grid-area: profile-mobile;
width: 100%;
@@ -44,11 +48,8 @@ body {
}
.macroinfo-profile img {
width: 55%;
width: 45%;
height: 100%;
background: #969c8d;
border-radius: 20px;
padding: 2%;
}
.img-margin img {

View File

@@ -1,67 +0,0 @@
.jackpot-history__content {
display: flex;
max-height: 800px;
overflow-y: auto;
margin: 0 auto;
}
.jackpot-history__element {
display: flex;
flex-direction: column;
flex-wrap: wrap;
margin: 15px;
}
.abc {
}
.element-info {
display: flex;
align-items: center;
}
.element-info .element-info__icon img {
height: 50px;
}
.element-info .element-info__user-info {
margin-left: 4px;
}
.element-info .element-info__user-info .username {
color: #515D83;
font-family: 'Montserrat';
font-weight: 700;
font-size: 20px;
}
.element-info .element-info__user-info .user-deposit {
font-family: 'Montserrat';
font-weight: 700;
font-size: 20px;
}
.element-info .element-info__user-info .img-width img {
width: 16px;
height: 16px;
}
.element-chance {
margin-top: 10px;
}
.element-chance h2 {
font-family: 'Montserrat';
font-weight: 700;
font-size: 18px;
text-align: center;
background: #27345C;
border-radius: 7px;
}
.element-chance .chance-style {
color: #EF4444;
margin-left: 2px;
}

View File

@@ -109,19 +109,19 @@ button {
grid-gap: 0.625rem;
}
.jackpot-history__content-grid {
.content-grid--double {
display: grid;
grid-auto-columns: 1fr;
grid-template-columns: 0.35fr repeat(5, 1fr) 1fr;
grid-template-rows: auto 0fr repeat(4, 1fr);
grid-template-areas:
"menu header header header header header header"
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat"
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat"
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat"
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat"
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat"
"menu jackpot-history jackpot-history jackpot-history jackpot-history jackpot-history chat";
"menu double double double double double chat"
"menu double double double double double chat"
"menu double double double double double chat"
"menu double double double double double chat"
"menu double double double double double chat"
"menu double double double double double chat";
grid-gap: 0.625rem;
}
@@ -227,11 +227,10 @@ button {
margin: 0.625rem 2.438rem 1.125rem 1.125rem; */
}
.jackpot-history {
grid-area: jackpot-history;
background: #17181C;
border-radius: 20px;
height: 97%;
.double {
display: flex;
grid-area: double;
}
.about {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -85,25 +85,3 @@ export async function JoinJackpotGame(userData, amount) {
console.log('Fetch error')
}
}
export async function getJackpotHistoryGame () {
try {
const response = await fetch(`${BackendApiUrl}/GameJackpot/GetNewestJackpotGames`, {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
redirect: "follow"
})
if (!response.ok) {
console.log('Fetch error:', response.status)
}
console.log(response)
return await response.json()
}
catch (error) {
console.log('Fetch error')
}
}

View File

@@ -8,45 +8,15 @@
<div class="header-mobile__balance">
<div class="header-mobile__balance--content">
<div class="header-mobile__card card-display card-text card-img">
<h2><img src="@/assets/icons-adaptive/home-adaptive/icon-diamond-ore.png">{{ balance }}</h2>
<h2><img src="@/assets/icons-adaptive/home-adaptive/icon-diamond-ore.png">999</h2>
</div>
<div class="header-mobile__btn--balance btn-card btn-card__margin">
<a href="#" @click="$router.push({ name: 'profile' })"><img src="@/assets/icons-adaptive/home-adaptive/icon-wallet.svg"></a>
</div>
</div>
</div>
<!-- <div class="header-mobile__user-icon user-icon">-->
<!-- <img src="@/assets/icons-test/person-icon-profile-userinfo.png">-->
<!-- </div>-->
<div class="header__auth--discord">
<div v-if="auth" class="header__card--discord mobile-discord__card">
<div class="discord__card--name">
<h2>{{ userName }}</h2>
<a href="#" @click="logout"
>Выход<span
><img src="@/assets/icons-header/exit-icon.png" /></span
></a>
</div>
<img :src="imageUrl" alt="test-ico" />
<!-- <img src="../assets/icons-test/person-icon.svg" alt="test-ico"> -->
</div>
<div v-else class="header__card--auth">
<!-- <div class="header__card--auth"> -->
<div class="auth__card--content mobile-auth__card--content">
<a
href="https://discord.com/oauth2/authorize?client_id=1148644854797176932&response_type=code&redirect_uri=https%3A%2F%2Fwww.lucky-diamonds.ru&scope=identify"
@click="auth = true"
><span
><img
width="30"
height="30"
src="@/assets/icons-header/discord-icon.svg" /></span
>Вход</a
>
<!-- https://media.discordapp.net/attachments/1175674631684898866/1214143880073842698/Undwadtitled.png?ex=65f80a9a&is=65e5959a&hm=9cb0ffffa2bfc6ee9302f8d96be7f8c3049dc04df478dd05cdd94f697c662e1d&=&format=webp&quality=lossless -->
<!-- https://discord.com/oauth2/authorize?client_id=1148644854797176932&response_type=code&redirect_uri=https%3A%2F%2Fwww.lucky-diamonds.ru&scope=identify-->
</div>
</div>
<div class="header-mobile__user-icon user-icon">
<img src="@/assets/icons-test/person-icon-profile-userinfo.png">
</div>
</div>
</div>
@@ -55,119 +25,8 @@
<script>
import '@/assets/css/ComponentsStyles/AdaptiveStyles/headermobile.css'
import { LogIn } from "@/assets/js/authentication/AuthService.js";
import { GetCurrentMoney } from "@/assets/js/rest/RestMethods.js";
import { eventBus } from "@/main";
import {
SetCookie,
GetCookie,
DeleteAllCookie,
} from "@/assets/js/storage/CookieStorage.js";
export default {
methods: {
logout() {
this.auth = false;
this.balance = 0;
this.authtoken = "";
DeleteAllCookie();
},
updateBalanceMethod() {
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")).then(
(response) => {
this.balance = response.currentMoney;
}
);
eventBus.emit("Updatebalance-saper");
},
},
data() {
return {
balance: 0,
auth: false,
authtoken: "",
imageUrl: "https://avatar.spworlds.ru/face/55/",
userName: "",
};
},
mounted() {
eventBus.on("Updatebalance", () => {
this.updateBalanceMethod();
});
},
created() {
try {
let authCode = this.$route.query.code;
if (authCode) {
LogIn(authCode)
.then((response) => {
SetCookie("UserId", response.userId);
SetCookie("SpUserName", response.spUserName);
SetCookie("AUTHTOKEN", response.authtoken);
SetCookie("SearchToken", response.searchToken);
this.imageUrl = this.imageUrl + `${response.spUserName}.png`;
this.userName = response.spUserName;
this.auth = true;
this.authtoken = response.authtoken;
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
.then((response) => {
this.balance = response.currentMoney;
})
.catch((error) => {
console.error(error);
});
})
.catch(() => {
let currentUserName = GetCookie("SpUserName");
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
.then((response) => {
this.balance = response.currentMoney;
console.log(response);
})
.catch((error) => {
console.error(error);
});
if (currentUserName) {
this.imageUrl = this.imageUrl + `${currentUserName}.png`;
this.userName = GetCookie("SpUserName");
this.auth = true;
this.authtoken = GetCookie("AUTHTOKEN");
} else {
this.auth = false;
this.balance = 0;
}
});
} else {
let currentUserName = GetCookie("SpUserName");
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
.then((response) => {
this.balance = response.currentMoney;
})
.catch((error) => {
// Обработка ошибки
console.error(error);
});
if (currentUserName) {
this.imageUrl = this.imageUrl + `${currentUserName}.png`;
this.userName = GetCookie("SpUserName");
this.auth = true;
this.authtoken = GetCookie("AUTHTOKEN");
} else {
this.auth = false;
this.balance = 0;
}
}
} catch (error) {
console.error("Auth Code error:", error);
}
},
}
</script>

View File

@@ -2,11 +2,11 @@
<footer class="footer-mobile">
<div class="footer-mobile__content">
<div class="footer-mobile__icons icons-size">
<a class="icon-center" @click="$router.push({ name: 'home' })" href="#"><img src="@/assets/icons-adaptive/home-adaptive/icon-home-menu.png"></a>
<a :class="{ 'disabled': cokiehave }" @click="$router.push({ name: 'profile' })" class="icon-center" href="#"><img src="@/assets/icons-adaptive/home-adaptive/icon-wallet-menu.svg"></a>
<a class="icon-center" href="#"><img src="@/assets/icons-adaptive/home-adaptive/icon-chat-menu.png"></a>
<a class="icon-center" href="#"><img src="@/assets/icons-adaptive/home-adaptive/icon-info-menu.png"></a>
<a class="icon-center" href="#"><img src="@/assets/icons-adaptive/home-adaptive/icon-menu.png"></a>
<a href="#"><img class="icon-start" src="@/assets/icons-adaptive/home-adaptive/icon-home-menu.png"></a>
<a href="#" @click="$router.push({ name: 'profile' })"><img class="icon-center" src="@/assets/icons-adaptive/home-adaptive/icon-wallet-menu.svg"></a>
<a href="#"><img class="icon-center" src="@/assets/icons-adaptive/home-adaptive/icon-chat-menu.png"></a>
<a href="#"><img class="icon-center" src="@/assets/icons-adaptive/home-adaptive/icon-info-menu.png"></a>
<a href="#"><img class="icon-end" src="@/assets/icons-adaptive/home-adaptive/icon-menu.png"></a>
</div>
</div>
</footer>
@@ -14,24 +14,11 @@
<script>
import '@/assets/css/ComponentsStyles/AdaptiveStyles/menumobile.css'
import { GetCookie } from "@/assets/js/storage/CookieStorage";
export default {
data() {
return {
cokiehave: true
}
},
created() {
const auth = GetCookie('AUTHTOKEN')
const search = GetCookie('SearchToken')
if (auth && search) {
this.cokiehave = false
}
}
}
</script>
<style scoped>
</style>
</style>

View File

@@ -12,39 +12,27 @@
<h2>Сумма {{ payments.paymentsView ? 'пополнения' : 'вывода' }}</h2>
<div class="payments-modal__input input-style__mobile img-style">
<img src="@/assets/icons-games/saper-game/icon-diamond-ore-saper.png">
<input type="number" v-model="amount" class="input-mobile__number">
<input type="number" v-model="number" class="input-mobile__number">
<div class="payments-modal__btns-mobile">
<ul class="button-style__mobile">
<li v-for="(number, index) in PaymentsModalNumbers" :key="index">
<button
@click="clickedBtnChoice(index, number.diamonds)"
:class="{
'btn-click': clickedBtn === index,
[number]: clickedBtn === number,
}"
>
{{ number.diamonds }}
</button>
<li v-for="number in PaymentsModalNumbers" :key="number">
<button>{{ number.diamonds }}</button>
</li>
</ul>
</div>
<div class="payments-modal__card input-style__mobile" v-if="payments.paymentsView === false">
<h2>Номер карты</h2>
<input type="text" v-model="card" class="input-mobile__number">
</div>
</div>
<div class="payments-modal__promocode input-style__mobile" v-if="payments.paymentsView === true">
<input type="text" placeholder="Введите промокод">
</div>
<div class="payments-modal__agree checkbox-styles">
<input v-if="!payments.paymentsView" type="checkbox" @click="agreeUser = !agreeUser">
<input v-else type="checkbox" @click="agreeUserDonate = !agreeUserDonate">
<input v-if="!payments.paymentsView" type="checkbox" v-model="agreeUser">
<input v-else type="checkbox">
<h3>Я согласен с пользовательским соглашением.</h3>
</div>
<captcha-component class="captcha-mobile" @captchatokendata="claimCaptchaToken" :showcaptcha="agreeUser"></captcha-component>
<captcha-component class="captcha-mobile" :showcaptcha="agreeUser"></captcha-component>
<div class="payments-modal__submit">
<p>Вы подтверждаете правильность введенных данных при создании вывода.</p>
<button @click="clickBtn()">{{ payments.paymentsView ? 'Пополнить' : 'Вывод' }}</button>
<button @click="closeModal()">{{ payments.paymentsView ? 'Пополнить' : 'Вывод' }}</button>
</div>
</div>
</div>
@@ -54,26 +42,6 @@
import PaymentsModalNumbers from "@/mocks/PaymentsModalNumbers";
import CaptchaComponent from "@/components/CaptchaComponent.vue";
import {
GettingMoneyOperation,
WithdrawMoneyOperation,
} from "@/assets/js/moneyoperation/Claimmoney";
import { eventBus } from "@/main";
import { useVuelidate } from "@vuelidate/core";
import {
minValue,
required,
numeric,
integer,
minLength,
maxLength,
} from "@vuelidate/validators";
import { GetCurrentMoney } from "@/assets/js/rest/RestMethods";
import { GetCookie } from "@/assets/js/storage/CookieStorage";
// import { ApplyPromoCode } from "@/assets/js/rest/RestMethods.js"; // Замените на правильный путь к файлу с функцией ApplyPromoCode
import '@/assets/css/ComponentsStyles/AdaptiveStyles/payments-modalmobile.css'
export default {
@@ -83,147 +51,13 @@ export default {
return {
PaymentsModalNumbers,
agreeUser: false,
agreeUserDonate: false,
amount: 0,
card: '',
captchaToken: null,
url: '',
clickedBtn: "",
}
},
watch: {
amount(DepositCount) {
console.log(DepositCount);
if (![1, 5, 10, 50, 100, 1000].includes(DepositCount)) {
this.clickedBtn = null;
} else {
let index;
switch (DepositCount) {
case 1:
index = 0;
break;
case 5:
index = 1;
break;
case 10:
index = 2;
break;
case 50:
index = 3;
break;
case 100:
index = 4;
break;
case 1000:
index = 5;
break;
}
this.clickedBtnChoice(index, DepositCount);
}
}
},
setup() {
return { v$: useVuelidate() };
},
validations() {
return {
amount: { required, numeric, minValue: minValue(1), integer },
card: { required, numeric, minLength: minLength(5), maxLength: maxLength(5), integer }
number: 0
}
},
methods: {
closeModal() {
return this.$emit('closemodal')
},
clickBtn() {
this.v$.$touch()
if (this.payments.paymentsView === true) {
if (this.v$.amount.$error) {
console.log('error amount')
}
if (this.agreeUserDonate !== true) {
console.log('agreeuser error')
}
if (
!this.v$.amount.$error &&
this.agreeUserDonate === true
) {
try {
GettingMoneyOperation(this.amount).then((response) => {
this.url = response
window.location.href = this.url;
})
}
catch (e) {
console.error(e)
}
}
}
else if (this.payments.paymentsView === false) {
this.v$.$touch()
if (this.v$.amount.$error) {
console.log('amount error')
}
if (this.v$.card.$error) {
console.log('card error')
}
if (this.agreeUser !== true) {
console.log('agree error')
}
if (this.captchaToken === null) {
console.log('token error')
}
let balanceUser = 0
GetCurrentMoney(GetCookie('AUTHTOKEN'), GetCookie('SearchToken'))
.then((response) => {
balanceUser = response.currentMoney
})
if (this.amount < balanceUser) {
console.log('money small balance')
}
if (
!this.v$.amount.$error &&
!this.v$.card.$error &&
this.agreeUser === true &&
this.captchaToken !== null &&
this.amount >= balanceUser
) {
WithdrawMoneyOperation(
this.amount,
this.card.toString(),
this.captchaToken
) .then((response) => {
try {
console.log('work', response)
eventBus.emit('Updatebalance')
return this.$emit('closemodal')
}
catch (e) {
console.error(e)
}
})
}
}
},
claimCaptchaToken(Token) {
this.captchaToken = Token
},
clickedBtnChoice(index, content) {
this.clickedBtn = index;
this.amount = content;
console.log(index);
},
}
}
}
</script>

View File

@@ -1,70 +0,0 @@
t<template>
<div class="jackpot-history__content-grid">
<aside-bar-element/>
<chat-component/>
<header-element-page/>
<div class="jackpot-history">
<div class="jackpot-history__content">
<ul class="jackpot-history__element">
<li v-for="(game, index) in historyGame" :key="index">
<div class="abc">
<div class="jackpot-history__element">
<div class="element-info">
<div class="element-info__icon">
<img :src="`https://avatar.spworlds.ru/face/55/${game.winnerUserName}`">
</div>
<div class="element-info__user-info">
<h2 class="username">{{ game.winnerUserName }}</h2>
<h2 class="user-deposit">
{{ game.winStake.toFixed(2) }}
<span class="img-width"><img src="@/assets/icons-profile/icon-diamond-ore.png"></span>
</h2>
</div>
</div>
<div class="element-chance">
<h2>
Шанс <span class="chance-style">{{ game.winnerPercentage.toFixed(2) }}%</span>
</h2>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</template>
<script>
import { onMounted, reactive } from "vue";
import ChatComponent from "@/components/ChatComponent.vue";
import AsideBarElement from "@/components/AsidebarComponent.vue";
import HeaderElementPage from "@/components/HeaderComponent.vue";
import '@/assets/css/PagesStyles/jackpot-history.css'
import {getJackpotHistoryGame} from "@/assets/js/jackpot/JackpotLogic";
export default {
components: {HeaderElementPage, ChatComponent, AsideBarElement},
setup() {
let historyGame = reactive({})
onMounted(() => {
getJackpotHistoryGame()
.then(response => {
Object.assign(historyGame, response)
})
})
return { historyGame }
}
}
</script>
<style>
</style>

View File

@@ -6,11 +6,11 @@
<div class="profile-mobile__content">
<div class="macroinfo-profile text-default-mobile img-margin">
<h2>Профиль</h2>
<img :src="imageUrl">
<img src="@/assets/icons-test/person-icon-profile-userinfo.png">
</div>
<div class="info-profile">
<h3 class="text-nickname-user">{{ username }}</h3>
<h3 class="balance-border balance-display balance-text"><img src="@/assets/icons-profile/icon-diamond-ore.png">{{ balance }}</h3>
<h3 class="text-nickname-user">Artmeka</h3>
<h3 class="balance-border balance-display balance-text"><img src="@/assets/icons-profile/icon-diamond-ore.png">999</h3>
<div class="profile-mobile__btns-payments">
<a href="#" @click="paymetsCall('dep')" class="deposit-button"><img class="icon-margin-deposit-withdraw" src="@/assets/icons-profile/icon-deposit.svg"> Пополнить</a>
<a href="#" @click="paymetsCall('with')" class="withdraw-button"><img class="icon-margin-deposit-withdraw" src="@/assets/icons-profile/icon-withdraw.png"> Вывести</a>
@@ -28,11 +28,7 @@ import HeaderMobileComponent from "@/components/adaptive-components/HeaderMobile
import MenuMobileComponent from "@/components/adaptive-components/MenuMobileComponent.vue";
import PaymentsMobile from "@/components/adaptive-components/PaymentsMobile.vue";
import { GetCookie } from "@/assets/js/storage/CookieStorage";
import {GetCurrentMoney} from "@/assets/js/rest/RestMethods";
import '@/assets/css/PagesStyles/adaptive-pages/profilemobile.css'
import {eventBus} from "@/main";
export default {
components: { HeaderMobileComponent, MenuMobileComponent, PaymentsMobile },
@@ -40,29 +36,10 @@ export default {
return {
payments: {
paymentsWindow: false,
paymentsView: false,
paymentsView: false
},
username: 'Artemka',
imageUrl: '',
balance: 0
}
},
created() {
if (GetCookie('AUTHTOKEN') && GetCookie('SearchToken')) {
this.username = GetCookie('SpUserName')
GetCurrentMoney(GetCookie('AUTHTOKEN'), GetCookie('SearchToken'))
.then((response) => {
this.balance = response.currentMoney
})
this.imageUrl = `https://avatar.spworlds.ru/front/256/${this.username}`
}
},
mounted() {
eventBus.on("Updatebalance", () => {
this.updateBalanceMethod();
});
},
methods: {
paymetsCall(view) {
this.payments.paymentsWindow = true
@@ -70,15 +47,7 @@ export default {
},
paymentsClose() {
this.payments.paymentsWindow = false
},
updateBalanceMethod() {
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken")).then(
(response) => {
this.balance = response.currentMoney;
}
);
eventBus.emit("Updatebalance-saper");
},
}
}
}
</script>

View File

@@ -6,7 +6,7 @@ import SapergamePage from "@/pages/games-pages/SapergamePage.vue";
import SettingsPage from "@/pages/SettingsPage.vue";
import CrashGamePage from "@/pages/games-pages/CrashgamePage.vue";
import JackpotPage from "@/pages/games-pages/JackpotPage.vue";
import JackopthistoryPage from "@/pages/JackopthistoryPage.vue";
import DoublePage from "@/pages/games-pages/DoublePage.vue";
import AboutPage from "@/pages/AboutPage.vue";
import HelpPage from "@/pages/HelpPage.vue" ;
@@ -18,7 +18,7 @@ export default createRouter({
{ path: '/game/saper', component: SapergamePage, name: 'saper' },
{ path: '/game/crash', component: CrashGamePage, name: 'crash' },
{ path: '/game/jackpot', component: JackpotPage, name: 'jackpot' },
{ path: '/game/jackpot/history', component: JackopthistoryPage, name: 'jackpot-history' },
{ path: '/game/double', component: DoublePage, name: 'double' },
{ path: '/settings', component: SettingsPage, name: 'settings' },
{ path: '/about', component: AboutPage, name: 'about' },
{ path: '/help', component: HelpPage, name: 'help' },