mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-09 19:59:27 +02:00
Adding more mobile features
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="notification" v-if="notification">
|
<div class="notification" v-if="notification">
|
||||||
<div class="notification__content">
|
<div class="notification__content">
|
||||||
<h3>Операция вывода отправлена</h3>
|
<h3>{{ text }}</h3>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -11,7 +11,8 @@ import '@/assets/css/ComponentsStyles/notification.css'
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
notification: Boolean
|
notification: Boolean,
|
||||||
|
text: String,
|
||||||
},
|
},
|
||||||
emits: ['notificationremove'],
|
emits: ['notificationremove'],
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -25,6 +25,16 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import '@/assets/css/ComponentsStyles/AdaptiveStyles/headermobile.css'
|
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 {
|
export default {
|
||||||
methods: {
|
methods: {
|
||||||
logout() {
|
logout() {
|
||||||
|
|||||||
@@ -2,12 +2,18 @@
|
|||||||
<footer class="footer-mobile">
|
<footer class="footer-mobile">
|
||||||
<div class="footer-mobile__content">
|
<div class="footer-mobile__content">
|
||||||
<div class="footer-mobile__icons icons-size">
|
<div class="footer-mobile__icons icons-size">
|
||||||
<a href="#"><img class="icon-start" src="@/assets/icons-adaptive/home-adaptive/icon-home-menu.png"></a>
|
<a href="#" @click="$router.push({ name: 'home' })"><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="#" @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="#" @click="this.chatOpened = !this.chatOpened"><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="#" @click="$router.push({ name: 'about'})"><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>
|
|
||||||
|
|
||||||
|
<a href="#" @click="this.menuOpened = !this.menuOpened"><img class="icon-end" src="@/assets/icons-adaptive/home-adaptive/icon-menu.png"></a>
|
||||||
</div>
|
</div>
|
||||||
|
<notiicationwindow-component @notificationremove="NotificationMethod" :notification="menuOpened == true" :text="Тест"></notiicationwindow-component>
|
||||||
|
<div class="chat-component" v-if="chatOpened == true">
|
||||||
|
<chat-component></chat-component>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</footer>
|
</footer>
|
||||||
</template>
|
</template>
|
||||||
@@ -15,7 +21,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import '@/assets/css/ComponentsStyles/AdaptiveStyles/menumobile.css'
|
import '@/assets/css/ComponentsStyles/AdaptiveStyles/menumobile.css'
|
||||||
export default {
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
chatOpened: false,
|
||||||
|
menuOpened: false
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
</section>
|
</section>
|
||||||
<referal-modal v-if="openRef" @notifacetionmoney="NotificationEventListener" @closemodal="openRef = false"></referal-modal>
|
<referal-modal v-if="openRef" @notifacetionmoney="NotificationEventListener" @closemodal="openRef = false"></referal-modal>
|
||||||
<payments-modal v-if="openModal" @notifacetionmoney="NotificationEventListener" @closemodal="openModal = false" :payments="payments"></payments-modal>
|
<payments-modal v-if="openModal" @notifacetionmoney="NotificationEventListener" @closemodal="openModal = false" :payments="payments"></payments-modal>
|
||||||
<notiicationwindow-component @notificationremove="NotificationMethod" :notification="notification"></notiicationwindow-component>
|
<notiicationwindow-component @notificationremove="NotificationMethod" :notification="notification" text="Операция проведена успешно"></notiicationwindow-component>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@@ -24,10 +24,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { GetCurrentMoney } from "@/assets/js/rest/RestMethods";
|
||||||
|
import { GetCookie } from "@/assets/js/storage/CookieStorage";
|
||||||
import HeaderMobileComponent from "@/components/adaptive-components/HeaderMobileComponent.vue";
|
import HeaderMobileComponent from "@/components/adaptive-components/HeaderMobileComponent.vue";
|
||||||
import MenuMobileComponent from "@/components/adaptive-components/MenuMobileComponent.vue";
|
import MenuMobileComponent from "@/components/adaptive-components/MenuMobileComponent.vue";
|
||||||
import PaymentsMobile from "@/components/adaptive-components/PaymentsMobile.vue";
|
import PaymentsMobile from "@/components/adaptive-components/PaymentsMobile.vue";
|
||||||
|
import {eventBus} from "@/main"
|
||||||
import '@/assets/css/PagesStyles/adaptive-pages/profilemobile.css'
|
import '@/assets/css/PagesStyles/adaptive-pages/profilemobile.css'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -40,20 +42,6 @@ export default {
|
|||||||
paymentsClose() {
|
paymentsClose() {
|
||||||
this.payments.paymentsWindow = false
|
this.payments.paymentsWindow = false
|
||||||
},
|
},
|
||||||
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() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -74,51 +62,6 @@ export default {
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
created() {
|
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");
|
let currentUserName = GetCookie("SpUserName");
|
||||||
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
|
GetCurrentMoney(GetCookie("AUTHTOKEN"), GetCookie("SearchToken"))
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
@@ -138,10 +81,7 @@ export default {
|
|||||||
this.auth = false;
|
this.auth = false;
|
||||||
this.balance = 0;
|
this.balance = 0;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Auth Code error:", error);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
components: { HeaderMobileComponent, MenuMobileComponent, PaymentsMobile },
|
components: { HeaderMobileComponent, MenuMobileComponent, PaymentsMobile },
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user