add Changed the template to SettingPage

This commit is contained in:
Madara0330E
2024-01-30 19:39:33 +03:00
parent f4d65a09b4
commit ed8a64570f
2 changed files with 19 additions and 92 deletions

View File

@@ -0,0 +1,9 @@
.settings {
display: flex;
grid-area: profile;
height: 95%;
border-radius: 50px;
background: #17181C;
box-shadow: 4px 4px 4px 0px rgba(0, 0, 0, 0.25);
margin: 10px 39px 18px 13px;
}

View File

@@ -1,15 +1,13 @@
<template>
<profilemobile-page v-if="mobile"></profilemobile-page>
<div class="content__grid-profile" v-else>
<div class="content__grid-profile" >
<aside-bar-component></aside-bar-component>
<chat-component></chat-component>
<header-component></header-component>
<section class="profile"></section>
<payments-modal v-if="openModal" @notifacetionmoney="NotificationEventListener" @closemodal="openModal = false" :payments="payments"></payments-modal>
<notiicationwindow-component @notificationremove="NotificationMethod" :notification="notification"></notiicationwindow-component>
<section class="settings"></section>
</div>
</template>
@@ -17,94 +15,14 @@
import AsideBarComponent from "@/components/AsidebarComponent.vue";
import ChatComponent from "@/components/ChatComponent.vue";
import HeaderComponent from "@/components/HeaderComponent.vue";
import PaymentsModal from "@/components/PaymentsModal.vue";
import ProfilemobilePage from "@/pages/adaptive-pages/ProfilemobilePage.vue";
import NotiicationwindowComponent from "@/components/NotiicationwindowComponent.vue";
import { GetCookie } from "@/assets/js/storage/CookieStorage";
import '@/assets/css/PagesStyles/SettingsPage.css'
import {GetCurrentMoney} from "@/assets/js/rest/RestMethods";
export default {
components: {ProfilemobilePage, HeaderComponent, AsideBarComponent, ChatComponent, PaymentsModal, NotiicationwindowComponent },
data() {
return {
username: 'Artemka',
imageUrl: '',
notification: false,
balance: 0,
mobile: false,
openModal: false,
payments: true,
arrayHistory: [],
}
},
emits: ['notificationremove'],
mounted() {
this.checkWindowSize()
this.AddWindowListener()
},
beforeUnmount() {
this.RemoveWindowListener()
},
created() {
this.username = GetCookie('SpUserName')
GetCurrentMoney(GetCookie('AUTHTOKEN'), GetCookie('SearchToken'))
.then((response) => {
this.balance = response.currentMoney
console.log('balance in profile', this.balance)
})
.catch((error) => {
console.error('error in profile, get money', error)
})
this.imageUrl = `https://avatar.spworlds.ru/front/256/${this.username}`
},
methods: {
depositClick() {
this.openModal = true
this.payments = true
},
withdrawClick() {
this.openModal = true
this.payments = false
},
NotificationEventListener() {
this.notification = true
this.openModal = false
},
NotificationMethod() {
this.notification = false
}
// formatNumber(number) {
// return number < 10 ? `0${number}` : number;
// },
// getCurrentFormattedDate() {
// const currentDate = new Date();
// return `${this.formatNumber(currentDate.getDate())}.${this.formatNumber(currentDate.getMonth() + 1)}.${currentDate.getFullYear()}, ${this.formatNumber(currentDate.getHours())}:${this.formatNumber(currentDate.getMinutes())}`;
// },
// claimDataDeposit(amount) {
// const historyPayments = {
// name: 'TEST USER',
// comment: 'test',
// data: this.getCurrentFormattedDate(),
// amount: amount
// }
//
// this.arrayHistory.unshift(historyPayments)
// },
// claimDataWithdraw(amount) {
// const historyPayments = {
// name: 'TEST USER',
// comment: 'test',
// data: this.getCurrentFormattedDate(),
// amount: -amount
// }
//
// this.arrayHistory.unshift(historyPayments)
// }
}
components: {
ChatComponent,
HeaderComponent,
AsideBarComponent
}
}
</script>