Browse Source

tags update

master
gsd 1 year ago
parent
commit
4b10e36718
  1. 10
      src/components/ActionDialogs/GametimeDialog.vue
  2. 64
      src/components/ActionDialogs/GametimeTagsDialog.vue
  3. 2
      src/components/TabsMenuElements/ProfileView/Components/ProfileContainer.vue
  4. 6
      src/components/TabsMenuElements/ProfileView/ProfileView.vue

10
src/components/ActionDialogs/GametimeDialog.vue

@ -21,10 +21,12 @@
:md-separator="'из'"
style="font-family: tf2build"/>
</md-table>
<md-button style="float: left" class="btn-boss" v-if="gt_total!=null" v-on:click="$refs.gd_gtd.showMe(true, gt_total)">Узнать свой РАНГ</md-button>
<md-button style="float: right" class="btn-colored" v-on:click="showMe(false)">Закрыть</md-button>
</div>
</div>
</md-dialog>
<GametimeTabsDialog ref="gd_gtd"/>
<md-dialog :md-active.sync="loading">
<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">
@ -38,9 +40,11 @@
<script>
import axios from "axios";
import Random from "@/api/Random";
import GametimeTabsDialog from "@/components/ActionDialogs/GametimeTagsDialog.vue";
export default {
name: "GametimeDialog",
components: {GametimeTabsDialog},
data: () => ({
show: false,
loading: false,
@ -51,11 +55,13 @@ export default {
mdData: []
},
steam64: null,
srv: null
srv: null,
gt_total: null
}),
methods: {
showMe(b, steam64, srv) {
showMe(b, steam64, srv, gametime) {
//this.clearList();
if (gametime !== undefined) this.gt_total = gametime;
this.srv = srv;
this.steam64 = steam64;
if (b===true) this.update(1, this.rowsPerPage)

64
src/components/ActionDialogs/GametimeTagsDialog.vue

@ -0,0 +1,64 @@
<template>
<div>
<md-dialog :md-active.sync="show" @close="show=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">
<md-table v-model="tags" md-card md-fixed-header>
<md-table-row slot="md-table-row" slot-scope="{ item }" :style="player_gametime>item.time?'background: rgba(207, 106, 50, 0.25)':''">
<md-table-cell md-label="Тег">{{ item.tag }}</md-table-cell>
<md-table-cell md-label="Нужно наиграть">{{ $API.UNIX2FACTI_TIME(item.time) }}</md-table-cell>
</md-table-row>
</md-table>
<md-button style="float: right" class="btn-colored" v-on:click="showMe(false)">Закрыть</md-button>
</div>
</div>
</md-dialog>
</div>
</template>
<script>
const TAGS = '#0|none\n' +
'#3600|[УКРАИНЕЦ][0]\n' +
'#18000|[ГАСТАРБАЙТЕР][1]\n' +
'#36000"|[ИНЖЕНЕР][2]\n' +
'#72000|[ПРОРАБ][3]\n' +
'#90000|[ЕЛЬЦИН][4]\n' +
'#126000|[СИНЯК][5]\n' +
'#162000|[БУХАРИК][6]\n' +
'#198000"|[ДРУГ ПУТИНА][7]\n' +
'#234000"|[ИНЖ НЕГР][8]\n' +
'#270000"|[СОБЯНИН][9]\n' +
'#306000"|[ХОЗЯИН ПИВКА][10]\n' +
'#400000"|[ПУТИН][11]\n' +
'#800000|[РУССКИЙ ПУТИН][12]\n' +
'#1600000|[PUT.IN][13]\n' +
'#3200000|[ПИВО][14]\n' +
'#6400000"|[ОЛДФАГ][15]\n' +
'#9600000"|[ЖИВУ НА РУСИ][16]\n';
export default {
name: "GametimeTabsDialog",
data: () => ({
player_gametime: 0,
show: false,
tags: []
}),
methods: {
getTags() {
this.tags = [];
const tags = TAGS.replace('"','').split("\n").map(t => t.split("|", 2)).map(t => ({time:parseInt(t[0].substring(1)), tag:t[1]}));
for (const ll in tags) {
const n = parseInt(ll);
try {
if (tags[n + 1].tag !== undefined)
this.tags.push({time: tags[n].time, tag: tags[n + 1].tag})
} catch (e) {e}
}
},
showMe(b ,gt) {
this.getTags();
this.player_gametime = gt;
this.show = b;
}
}
}
</script>

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

@ -28,7 +28,7 @@
<md-menu v-else 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 v-for="g in usertime.store" :key="g[0]+'g'" v-on:click="$refs.pc_gd.showMe(true, player['steamids']['steam64'], g[2])">{{g[0]}} - {{timeFormat(g[1])}}</md-menu-item>
<md-menu-item v-for="g in usertime.store" :key="g[0]+'g'" v-on:click="$refs.pc_gd.showMe(true, player['steamids']['steam64'], g[2], g[1])">{{g[0]}} - {{timeFormat(g[1])}}</md-menu-item>
</md-menu-content>
</md-menu>
<div style="padding: 1% 0%"/>

6
src/components/TabsMenuElements/ProfileView/ProfileView.vue

@ -19,9 +19,9 @@
</div>
<div v-else>
<ProfileContainer :player="$API.player.store"/>
<md-button v-on:click="$refs.pv_fp.showFPD()" class="btn-gosty" style="float: right; margin: 3% 5%">Найти игрока</md-button>
<md-button v-on:click="$refs.pv_dw.openDW()" class="btn-old" style="float: right; margin: 3% 0%">Привязать стим к дискорду</md-button>
<md-button class="btn-boss" v-on:click="logout()" style="float: left; margin: 3% 5%">Выйти</md-button>
<md-button v-on:click="$refs.pv_fp.showFPD()" class="btn-gosty" style="margin: 3% 5%">Найти игрока</md-button>
<md-button v-on:click="$refs.pv_dw.openDW()" class="btn-old" style="margin: 3% 0%">Привязать стим к дискорду</md-button>
<md-button class="btn-boss" v-on:click="logout()" style="float: right; margin: 3% 5%">Выйти</md-button>
</div>
</div>
</div>

Loading…
Cancel
Save