Browse Source

ipv 2

master
gsd 1 year ago
parent
commit
275691c2ab
  1. 14
      src/components/Others/Loader/ProfileViewer.vue
  2. 4
      src/components/TabsMenuElements/ProfileView/Components/ProfileContainer.vue

14
src/components/Others/Loader/ProfileViewer.vue

@ -34,11 +34,19 @@ export default {
showProfileDialog: false
}),
methods: {
getPlayer(s64) {
if (this.steam64.length === 0 && s64 === undefined) return;
getPlayer() {
if (this.steam64.length === 0) return;
return this.loadProfile(this.steam64);
},
getPlayerWithSteam(steam64){
console.log("Get other");
console.log(steam64);
return this.loadProfile(steam64);
},
loadProfile(steam64){
this.showProfileDialog = true;
this.loading = true;
axios.get(`/api/profile/web?steam64=${s64===undefined?this.steam64:s64}&requests=${PLAYER_REQUESTS}`).then(response => {
axios.get(`/api/profile/web?steam64=${steam64}&requests=${PLAYER_REQUESTS}`).then(response => {
if (response.status === 200) this.player = response.data;
else console.log("not permition");
}).catch((err) => {

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

@ -63,11 +63,12 @@
</md-menu>
<div style="padding: 1% 0%"/>
<!--ALT ACCOUNTS-->
<ProfileViewer :steam64="player['steamids']['steam64']" ref="alt_ipv"/>
<md-button v-on:click="loadingAltList()" v-if="this.$API.admin.permition.alt === true && altaccount.loaded === false" class="md-raised btn-strange" style="margin: 0% 0%" md-menu-trigger>{{altaccount.loading?'Загрузка':'Альт.аккаунты'}}</md-button>
<md-menu v-if="this.$API.admin.permition.alt === true && altaccount.loaded === true" md-direction="bottom-start" md-size="auto">
<md-button class="md-raised btn-strange" md-menu-trigger>Альт.аккаунты</md-button>
<md-menu-content>
<md-menu-item class="clickable" v-for="b in altaccount.store" :key="b" v-on:click="$refs.alt_ipv.getPlayer(b)">{{b}}</md-menu-item>
<md-menu-item class="clickable" v-for="b in altaccount.store" :key="b" v-on:click="$refs.alt_ipv.getPlayerWithSteam(b)">{{b}}</md-menu-item>
</md-menu-content>
</md-menu>
</div>
@ -87,7 +88,6 @@
<br>
</div>
<SnackLoader ref="profile_snack" s_text="Steam64 скопирован в буфер обмена" :dura="2000"/>
<ProfileViewer :steam64="``" ref="alt_ipv"/>
</div>
</template>

Loading…
Cancel
Save