Browse Source

дохуя всего

master
gsd 1 year ago
parent
commit
e3613a839b
  1. 3
      docker/Dockerfile
  2. 2
      src/App.vue
  3. 3
      src/api/GlobalApi.js
  4. 3
      src/api/PlayerApi.js
  5. 1
      src/api/version.js
  6. 15
      src/components/Others/CustomSvg/DiscordSvg.vue
  7. 6
      src/components/Others/CustomSvg/SteamSvg.vue
  8. 8
      src/components/Others/ProfileViewer.vue
  9. 2
      src/components/TabsMenu.vue
  10. 17
      src/components/TabsMenuElements/BackendStatus.vue
  11. 42
      src/components/TabsMenuElements/BackendStatus/BackendStatus.vue
  12. 73
      src/components/TabsMenuElements/BackendStatus/Components/FindPlayer.vue
  13. 57
      src/components/TabsMenuElements/ProfileView/Components/ProfileContainer.vue
  14. 5
      src/components/TabsMenuElements/ProfileView/ProfileView.vue

3
docker/Dockerfile

@ -5,7 +5,8 @@ ENV BUILDDATE $BUILDDATE
RUN echo "Build Date: $BUILDATE" RUN echo "Build Date: $BUILDATE"
RUN git clone https://git.pblr-nyk.pro/gsd/Facti13.Frontend.VueMaterial && \ RUN git clone https://git.pblr-nyk.pro/gsd/Facti13.Frontend.VueMaterial && \
mv Facti13.Frontend.VueMaterial /app && chown node:node -R /app && chmod 770 -R /app mv Facti13.Frontend.VueMaterial /app && chown node:node -R /app && chmod 770 -R /app && \
echo "export const VERSION = $BUILDATE;" >> /app/src/api/version.js
USER node USER node
WORKDIR /app WORKDIR /app

2
src/App.vue

@ -21,6 +21,7 @@ import MdProgress from "vue-material/dist/components/MdProgress";
import MdSnackbar from "vue-material/dist/components/MdSnackbar"; import MdSnackbar from "vue-material/dist/components/MdSnackbar";
import MdMenu from "vue-material/dist/components/MdMenu"; import MdMenu from "vue-material/dist/components/MdMenu";
import MdList from "vue-material/dist/components/MdList"; import MdList from "vue-material/dist/components/MdList";
import MdField from "vue-material/dist/components/MdField";
Vue.use(MdTabs); Vue.use(MdTabs);
Vue.use(MdIcon); Vue.use(MdIcon);
@ -32,6 +33,7 @@ Vue.use(MdProgress);
Vue.use(MdSnackbar); Vue.use(MdSnackbar);
Vue.use(MdMenu); Vue.use(MdMenu);
Vue.use(MdList); Vue.use(MdList);
Vue.use(MdField);
import TabsMenu from "@/components/TabsMenu.vue"; import TabsMenu from "@/components/TabsMenu.vue";
import LoaderPage from "@/components/Others/LoaderPage.vue"; import LoaderPage from "@/components/Others/LoaderPage.vue";

3
src/api/GlobalApi.js

@ -3,6 +3,7 @@ import AdminApi from "@/api/AdminApi";
import PlayerApi from "@/api/PlayerApi"; import PlayerApi from "@/api/PlayerApi";
import Stages from "@/api/Stages"; import Stages from "@/api/Stages";
import VipAPI from "@/api/VipApi"; import VipAPI from "@/api/VipApi";
import {VERSION} from "@/api/version";
export default class GlobalApi { export default class GlobalApi {
stats = { stats = {
@ -26,7 +27,7 @@ export default class GlobalApi {
player = new PlayerApi() player = new PlayerApi()
vip = new VipAPI(); vip = new VipAPI();
builddate = process.env.BUILDDATE === undefined ? null : process.env.BUILDDATE; builddate = VERSION * 1000;
current_window = location.hash.length > 1?location.hash.slice(1):'mainView'; current_window = location.hash.length > 1?location.hash.slice(1):'mainView';

3
src/api/PlayerApi.js

@ -8,7 +8,8 @@ export default class PlayerApi {
steamids: null, steamids: null,
gametime: {}, gametime: {},
lastplay: {}, lastplay: {},
play_on: null play_on: null,
donates: []
} }
discord = null; discord = null;

1
src/api/version.js

@ -0,0 +1 @@
export const VERSION = 0;

15
src/components/Others/CustomSvg/DiscordSvg.vue

@ -1,5 +1,5 @@
<template> <template>
<svg fill="currentColor" :width="w" :height="h" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg"><title>Discord icon</title><path d="M20.222 0c1.406 0 2.54 1.137 2.607 2.475V24l-2.677-2.273-1.47-1.338-1.604-1.398.67 2.205H3.71c-1.402 0-2.54-1.065-2.54-2.476V2.48C1.17 1.142 2.31.003 3.715.003h16.5L20.222 0zm-6.118 5.683h-.03l-.202.2c2.073.6 3.076 1.537 3.076 1.537-1.336-.668-2.54-1.002-3.744-1.137-.87-.135-1.74-.064-2.475 0h-.2c-.47 0-1.47.2-2.81.735-.467.203-.735.336-.735.336s1.002-1.002 3.21-1.537l-.135-.135s-1.672-.064-3.477 1.27c0 0-1.805 3.144-1.805 7.02 0 0 1 1.74 3.743 1.806 0 0 .4-.533.805-1.002-1.54-.468-2.14-1.404-2.14-1.404s.134.066.335.2h.06c.03 0 .044.015.06.03v.006c.016.016.03.03.06.03.33.136.66.27.93.4.466.202 1.065.403 1.8.536.93.135 1.996.2 3.21 0 .6-.135 1.2-.267 1.8-.535.39-.2.87-.4 1.397-.737 0 0-.6.936-2.205 1.404.33.466.795 1 .795 1 2.744-.06 3.81-1.8 3.87-1.726 0-3.87-1.815-7.02-1.815-7.02-1.635-1.214-3.165-1.26-3.435-1.26l.056-.02zm.168 4.413c.703 0 1.27.6 1.27 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334.002-.74.573-1.338 1.27-1.338zm-4.543 0c.7 0 1.266.6 1.266 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334 0-.74.57-1.338 1.27-1.338z"/></svg> <svg v-on:click="openUrl()" fill="currentColor" :width="w" :height="h" viewBox="0 0 24 24" role="img" xmlns="http://www.w3.org/2000/svg" :style="`${inline?'display: inline':''}`"><title>Discord icon</title><path d="M20.222 0c1.406 0 2.54 1.137 2.607 2.475V24l-2.677-2.273-1.47-1.338-1.604-1.398.67 2.205H3.71c-1.402 0-2.54-1.065-2.54-2.476V2.48C1.17 1.142 2.31.003 3.715.003h16.5L20.222 0zm-6.118 5.683h-.03l-.202.2c2.073.6 3.076 1.537 3.076 1.537-1.336-.668-2.54-1.002-3.744-1.137-.87-.135-1.74-.064-2.475 0h-.2c-.47 0-1.47.2-2.81.735-.467.203-.735.336-.735.336s1.002-1.002 3.21-1.537l-.135-.135s-1.672-.064-3.477 1.27c0 0-1.805 3.144-1.805 7.02 0 0 1 1.74 3.743 1.806 0 0 .4-.533.805-1.002-1.54-.468-2.14-1.404-2.14-1.404s.134.066.335.2h.06c.03 0 .044.015.06.03v.006c.016.016.03.03.06.03.33.136.66.27.93.4.466.202 1.065.403 1.8.536.93.135 1.996.2 3.21 0 .6-.135 1.2-.267 1.8-.535.39-.2.87-.4 1.397-.737 0 0-.6.936-2.205 1.404.33.466.795 1 .795 1 2.744-.06 3.81-1.8 3.87-1.726 0-3.87-1.815-7.02-1.815-7.02-1.635-1.214-3.165-1.26-3.435-1.26l.056-.02zm.168 4.413c.703 0 1.27.6 1.27 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334.002-.74.573-1.338 1.27-1.338zm-4.543 0c.7 0 1.266.6 1.266 1.335 0 .74-.57 1.34-1.27 1.34-.7 0-1.27-.6-1.27-1.334 0-.74.57-1.338 1.27-1.338z"/></svg>
</template> </template>
<script> <script>
@ -13,6 +13,19 @@ export default {
h: { h: {
type: String, type: String,
default: "60%" default: "60%"
},
url: {
type: String,
default: null
},
inline: {
type: Boolean,
default: false
}
},
methods: {
openUrl(){
if (this.url !== null) window.open(this.url, '_blank');
} }
} }
} }

6
src/components/Others/CustomSvg/SteamSvg.vue

@ -1,6 +1,6 @@
<template> <template>
<svg class="clickable" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" <svg class="clickable" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
:width="w" :height="h" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve" v-on:click="openUrl()"> :width="w" :height="h" viewBox="0 0 512 512" :style="`enable-background:new 0 0 512 512; ${inline?'display: inline':''}`" xml:space="preserve" v-on:click="openUrl()">
<g> <g>
<path fill="currentColor" d="M151.961,418.005c13.572,0,26.893-6.567,34.986-18.708c12.867-19.301,7.651-45.377-11.649-58.244l-33.037-22.022 <path fill="currentColor" d="M151.961,418.005c13.572,0,26.893-6.567,34.986-18.708c12.867-19.301,7.651-45.377-11.649-58.244l-33.037-22.022
c5.654-1.54,11.597-2.38,17.739-2.38c37.196,0,67.348,30.152,67.348,67.351s-30.153,67.349-67.349,67.349 c5.654-1.54,11.597-2.38,17.739-2.38c37.196,0,67.348,30.152,67.348,67.351s-30.153,67.349-67.349,67.349
@ -61,6 +61,10 @@ export default {
url: { url: {
type:String, type:String,
default: null default: null
},
inline: {
type: Boolean,
default: false
} }
}, },
methods: { methods: {

8
src/components/Others/ProfileViewer.vue

@ -1,9 +1,9 @@
<template> <template>
<md-dialog :md-active.sync="showProfileDialog"> <md-dialog :md-active.sync="showProfileDialog" @close="showProfileDialog=false">
<div class="md-layout md-alignment-bottom-center"> <div class="md-layout md-alignment-bottom-center">
<div class="md-layout-item md-size-100 md-small-size-100 md-alignment-bottom-center rounded-only"> <div class="md-layout-item md-size-100 md-small-size-100 md-alignment-bottom-center rounded-only">
<ProfileContainer :player="player"/>
<h1 v-if="loading">Загрузка</h1> <h1 v-if="loading">Загрузка</h1>
<ProfileContainer v-else :player="player"/>
</div> </div>
</div> </div>
</md-dialog> </md-dialog>
@ -26,9 +26,11 @@ export default {
}), }),
methods: { methods: {
getPlayer() { getPlayer() {
console.log(this.steam64.length);
if (this.steam64.length === 0) return;
this.showProfileDialog = true; this.showProfileDialog = true;
this.loading = true; this.loading = true;
axios.get("/api/profile?steam64=" + this.steam64).then(response => { axios.get("/api/profile/web?steam64=" + this.steam64).then(response => {
if (response.status === 200) this.player = response.data; if (response.status === 200) this.player = response.data;
else console.log("not permition"); else console.log("not permition");
}).catch((err) => { }).catch((err) => {

2
src/components/TabsMenu.vue

@ -23,7 +23,7 @@ import VipView from "@/components/VipView/VipView.vue";
import AboutView from "@/components/TabsMenuElements/AboutView.vue"; import AboutView from "@/components/TabsMenuElements/AboutView.vue";
import EmptyTab from "@/components/TabsMenuElements/EmptyTab.vue"; import EmptyTab from "@/components/TabsMenuElements/EmptyTab.vue";
import MainView from "@/components/TabsMenuElements/MainView/MainView.vue"; import MainView from "@/components/TabsMenuElements/MainView/MainView.vue";
import BackendStatus from "@/components/TabsMenuElements/BackendStatus.vue"; import BackendStatus from "@/components/TabsMenuElements/BackendStatus/BackendStatus.vue";
import BackgroundImage from "@/components/Others/BackgroundImage.vue"; import BackgroundImage from "@/components/Others/BackgroundImage.vue";
export default { export default {

17
src/components/TabsMenuElements/BackendStatus.vue

@ -1,17 +0,0 @@
<template>
<md-tab id="backendView" :md-icon="this.s_icon">
<p>Сборка от {{this.$API.builddate !== null ? new Date(this.$API.builddate) : 'Dev Build'}}</p>
</md-tab>
</template>
<script>
export default {
name: "BackendStatus",
props: {
s_icon: {
type: String,
default: require('@/assets/server.svg')
}
}
}
</script>

42
src/components/TabsMenuElements/BackendStatus/BackendStatus.vue

@ -0,0 +1,42 @@
<template>
<md-tab id="backendView" :md-icon="this.s_icon">
<div class="md-layout md-alignment-bottom-center">
<div class="md-layout-item md-size-30 md-small-size-100 md-alignment-bottom-center rounded-and-colored" style="z-index: 1">
<h3 style="text-align: center; margin-top: 1%; margin-bottom: 0%; line-height: 1em">Разное</h3>
</div>
</div>
<div class="md-layout md-alignment-bottom-center" style="margin-top: -1.5%">
<div class="md-layout-item md-size-60 md-small-size-100 md-alignment-bottom-center rounded-only">
<h5 style="padding: 0% 3%">Сборка от {{this.$API.builddate !== null ? new Date(this.$API.builddate).toLocaleString() : 'Dev Build'}}</h5>
<h5 v-if="$API.player.store === null" style="text-align: center; cursor: pointer; text-decoration-line: underline" v-on:click="openAW()">Ты можешь искать других игроков здесь, но сначала надо авторизоваться!</h5>
<md-button v-else v-on:click="showFP()" style="color: #131213; font-family: tf2build; background: lightgreen">Найти игрока</md-button>
<FindPlayer ref="fp"/>
<AuthWindow ref="aw" />
</div>
</div>
</md-tab>
</template>
<script>
import FindPlayer from "@/components/TabsMenuElements/BackendStatus/Components/FindPlayer.vue";
import AuthWindow from "@/components/Others/AuthWindow.vue";
export default {
name: "BackendStatus",
components: {AuthWindow, FindPlayer},
props: {
s_icon: {
type: String,
default: require('@/assets/server.svg')
}
},
methods: {
showFP(){
this.$refs.fp.showFPD();
},
openAW() {
this.$refs.aw.openAW();
}
}
}
</script>

73
src/components/TabsMenuElements/BackendStatus/Components/FindPlayer.vue

@ -0,0 +1,73 @@
<template>
<md-dialog :md-active.sync="showFindPlayerDialog" @close="showFindPlayerDialog=false">
<div class="md-layout md-alignment-bottom-center">
<div class="md-layout-item md-size-100 md-small-size-100 md-alignment-bottom-center rounded-only">
<h5 style="text-align: center; padding-left: 5%; padding-right: 5%;">Введи что-то из предложенного</h5>
<md-field style="padding-left: 5%; padding-right: 5%;">
<label style="padding-left: 5%; padding-right: 5%">{{'Steam|Ник|#ид бана|<@discordid>'}}</label>
<md-input v-model="player_string"></md-input>
</md-field>
<md-button v-on:click="foundPlayer()" style="color: #131213; font-family: tf2build; background: lightgreen">Узнать</md-button>
<md-button v-on:click="closeFPD()" style="color: #131213; font-family: tf2build; background: #bd2200">Передумал</md-button>
<md-button v-on:click="closeFPD()" style="color: #131213; font-family: tf2build; background: #fd8846">Удалить себя</md-button>
<ProfileViewer ref="pv" :steam64="player_steam64"/>
</div>
</div>
</md-dialog>
</template>
<script>
import ProfileViewer from "@/components/Others/ProfileViewer.vue";
import axios from "axios";
export default {
name: "FindPlayer",
components: {ProfileViewer},
data: () => ({
player_string: "",
player_steam64: "",
showFindPlayerDialog: false
}),
methods: {
foundPlayer() {
if (this.player_string.length === 0) return;
this.player_steam64 = "";
console.log("get player");
axios.post("/api/profile/steam/web", {"any":this.player_string})
.then(response => {
if (response.status === 200 && 'steam64' in response.data) {
console.log(response.data);
this.player_steam64 = response.data['steam64'];
} else {
console.log("not auth or not found");
}
})
.catch((err) => {
console.log("code: " + err.status);
}).finally(() => {
this.$refs.pv.getPlayer();
})
},
showFPD(){
this.showFindPlayerDialog = true;
},
closeFPD(){
this.showFindPlayerDialog = false;
}
}
}
</script>
<style>
.md-field::after{
background-color: rgba(253, 136, 70, 0.1);
}
.md-field::before{
background-color: rgba(253, 136, 70);
}
.md-field.md-focused::after{
background-color: rgba(253, 136, 70);
}
</style>

57
src/components/TabsMenuElements/ProfileView/Components/ProfileContainer.vue

@ -6,13 +6,17 @@
<hr> <hr>
<div v-if="player['ban'] !== null"> <div v-if="player['ban'] !== null">
<p class="profile-text" style="display: inline">Статус Бана: </p> <p class="profile-text" style="display: inline">Статус Бана: </p>
<p class="profile-text" style="color: brown">Забанен</p> <p class="profile-text" style="color: brown; display: inline">Забанен</p>
<p class="profile-text">Выдал бан: русский путин</p> <p class="profile-text">Причина бана: {{player['ban']['ban_reason']}}</p>
<p class="profile-text">Дата окончания бана: 14.88.1488</p> <p class="profile-text" style="display: inline">Выдал бан: {{player['ban']['banned_by']}}</p>
<!--<SteamSvg :h="'5%'" :w="'5%'" :url="player['ban']['admin_info']['steam_url']" :inline="true"/>
<DiscordSvg :h="'5%'" :w="'5%'" :url="'https://tf2.pblr-nyk.pro/unban'" :inline="true"/>-->
<p class="profile-text" v-if="player['ban']['ban_length'] > 0">Дата окончания бана: {{new Date(player['ban']['ban_utime'] * 1000 + player['ban']['ban_length'] * 60 * 1000).toLocaleString()}}</p>
<p class="profile-text">Бан навсегда</p>
</div> </div>
<div v-if="player['permition'] === null"> <div v-if="player['permition'] === null">
<p class="profile-text" style="display: inline">Статус VIP : </p> <p class="profile-text" style="display: inline">Статус VIP : </p>
<p class="profile-text" style="color: crimson"> слыш купи</p> <p class="profile-text" style="color: crimson;display: inline"> слыш купи</p>
</div> </div>
<div v-else> <div v-else>
<p class="profile-text" style="display: inline">Статус {{player['permition']['status']}} : </p> <p class="profile-text" style="display: inline">Статус {{player['permition']['status']}} : </p>
@ -20,7 +24,7 @@
<p class="profile-text" v-else style="color: #fd8846; display: inline">Имеется</p> <p class="profile-text" v-else style="color: #fd8846; display: inline">Имеется</p>
<p class="profile-text">Дата окончания : </p> <p class="profile-text">Дата окончания : </p>
<p class="profile-text" v-if="player['permition']['amount'] === 0" style="display: inline">Навсегда</p> <p class="profile-text" v-if="player['permition']['amount'] === 0" style="display: inline">Навсегда</p>
<p class="profile-text" v-else style="display: inline">22.22.2032</p> <p class="profile-text" v-else style="display: inline">{{new Date((player['permition']['u_timestamp'] + player['permition']['amount']) * 1000).toLocaleDateString()}}</p>
</div> </div>
<hr> <hr>
<md-menu md-direction="bottom-start" md-size="auto"> <md-menu md-direction="bottom-start" md-size="auto">
@ -36,13 +40,28 @@
<md-menu-item v-for="l in getLastPlay()" :key="l[0]+'l'">{{l[0]}} - {{l[1]}}</md-menu-item> <md-menu-item v-for="l in getLastPlay()" :key="l[0]+'l'">{{l[0]}} - {{l[1]}}</md-menu-item>
</md-menu-content> </md-menu-content>
</md-menu> </md-menu>
<br>
<md-menu md-direction="bottom-start" md-size="auto" v-if="player['donates'].length > 0">
<md-button class="md-raised" style="color: #131213; font-family: tf2build; background: #fd8846" md-menu-trigger>Покупки VIP</md-button>
<md-menu-content>
<md-menu-item v-for="d in player['donates']" :key="d['utime']+'d'">{{new Date(d['utime'] * 1000).toLocaleDateString()}} | {{d['status']}}</md-menu-item>
</md-menu-content>
</md-menu>
<br>
<md-menu md-direction="bottom-start" md-size="auto" v-if="false">
<md-button class="md-raised" style="color: #131213; font-family: tf2build; background: #fd8846" md-menu-trigger>История Банов</md-button>
<md-menu-content>
<md-menu-item v-for="d in []" :key="d['utime']+'d'">{{new Date(d['utime'] * 1000).toLocaleDateString()}} | {{d['status']}}</md-menu-item>
</md-menu-content>
</md-menu>
</div> </div>
<div :class="`md-layout-item md-size-${f_size} md-small-size-100`"> <div :class="`md-layout-item md-size-${f_size} md-small-size-100`">
<div style="justify-content: right; display: flex; padding: 10% 0%"> <div style="justify-content: right; display: flex; padding: 10% 0%">
<img :src="getAvatar()" style="border-radius: 15px;"> <img :src="getAvatar()" style="border-radius: 15px;">
</div> </div>
<p class="profile-text" style="text-align: right" v-if="this.player['play_on'] !== null">Убийств : 20</p> <p class="profile-text" style="text-align: right; cursor: pointer;" v-if="this.player['play_on'] !== null && 'ip' in this.player['play_on']" v-on:click="showIP()">IP : {{player_ip}}</p>
<p class="profile-text" style="text-align: right" v-if="this.player['play_on'] !== null">Смертей : {{'похуй'}}</p> <p class="profile-text" style="text-align: right" v-if="this.player['play_on'] !== null && 'kills' in this.player['play_on']">Убийств : {{this.player['play_on']['kills']}}</p>
<p class="profile-text" style="text-align: right" v-if="this.player['play_on'] !== null && 'deads' in this.player['play_on']">Смертей : {{this.player['play_on']['deads']}}</p>
<p class="profile-text" style="text-align: right">Наиграно : {{getTotalPlaytime()}}</p> <p class="profile-text" style="text-align: right">Наиграно : {{getTotalPlaytime()}}</p>
<div style="justify-content: right; display: flex"> <div style="justify-content: right; display: flex">
<DiscordSvg :h="'10%'" :w="'40'" style="margin-left: 5%"/> <DiscordSvg :h="'10%'" :w="'40'" style="margin-left: 5%"/>
@ -51,10 +70,6 @@
</div> </div>
<br> <br>
<hr width="50%"> <hr width="50%">
<div>
<p>ban history</p>
<p>buy history</p>
</div>
</div> </div>
</div> </div>
</template> </template>
@ -62,6 +77,7 @@
<script> <script>
import DiscordSvg from "@/components/Others/CustomSvg/DiscordSvg.vue"; import DiscordSvg from "@/components/Others/CustomSvg/DiscordSvg.vue";
import SteamSvg from "@/components/Others/CustomSvg/SteamSvg.vue"; import SteamSvg from "@/components/Others/CustomSvg/SteamSvg.vue";
import axios from "axios";
export default { export default {
name: "ProfileContainer", name: "ProfileContainer",
@ -73,6 +89,9 @@ export default {
default: 45 default: 45
}, },
}, },
data: () => ({
player_ip: "Показать"
}),
methods: { methods: {
getAvatar() { getAvatar() {
try { try {
@ -92,6 +111,22 @@ export default {
}, },
getLastPlay() { getLastPlay() {
return this.$API.player.getLastplayList(this.player); return this.$API.player.getLastplayList(this.player);
},
showIP() {
if (this.player_ip.indexOf(":") !== -1) {
this.player_ip = "Показать";
return;
}
axios.options("api/crypto").then((response) => {
this.player_ip = "ждем...";
if (response.status === 200) {
axios.post("api/crypto/decrypt", {"ip":this.player['play_on']['ip']}).then(response => {
this.player_ip = response.data['ip'];
})
}
}).catch(() => {
this.player_ip = "хаха нет";
})
} }
} }
} }

5
src/components/TabsMenuElements/ProfileView/ProfileView.vue

@ -17,6 +17,7 @@
</div> </div>
<div v-else> <div v-else>
<ProfileContainer :player="$API.player.store"/> <ProfileContainer :player="$API.player.store"/>
<h5 class="auth-button" v-on:click="logout()">Выйти</h5>
</div> </div>
</div> </div>
</div> </div>
@ -40,6 +41,9 @@ export default {
openAW() { openAW() {
console.log('open auth window'); console.log('open auth window');
this.$refs.aw.showAuthDialog = true; this.$refs.aw.showAuthDialog = true;
},
logout() {
this.$refs.aw.moveTo("logout", "steam");
} }
} }
} }
@ -52,5 +56,6 @@ export default {
.auth-button:hover { .auth-button:hover {
text-decoration-line: underline; text-decoration-line: underline;
cursor: pointer;
} }
</style> </style>
Loading…
Cancel
Save