Browse Source

live map v2.2

sort & fix
master
gsd 1 year ago
parent
commit
b717a80762
  1. 41
      src/components/ActionDialogs/PlayerMap.vue
  2. 2
      src/components/TabsMenuElements/ServersView/Components/ServerFullInfo.vue

41
src/components/ActionDialogs/PlayerMap.vue

@ -2,16 +2,37 @@
<div>
<md-dialog :md-active.sync="show" @close="show=false">
<div class="rounded-only">
<l-map :crs="crs" v-if="map_exists && cfg_exists" style="height: 800px; width: 800px" :min-zoom="-1" :zoom="0" :center="[cords[map_name].y, cords[map_name].x]">
<l-map :crs="crs" v-if="map_exists && cfg_exists" style="height: 60em; width: 60em" :min-zoom="-2" :zoom="0" :center="[cords[map_name].y, cords[map_name].x]">
<l-image-overlay :url="`https://tf2.pblr-nyk.pro/site_content/images/maps/${this.map_name}.jpg`" :bounds="bounds"/>
<l-marker v-for="player in players" :key="player.id" :lat-lng="getRektPos(player.pos)">
<l-marker v-for="player in Object.create(players).filter(p => clz_select.length===0||clz_select.indexOf(`${p.clz}`) !== -1).filter(p => team_select.length===0||team_select.indexOf(`${p.team}`) !== -1)" :key="player.id" :lat-lng="getRektPos(player.pos)">
<l-icon class-name="pm_icon" :icon-url="getClzEmblem(player.team, player.clz)"/>
<l-popup><p class="p-map">{{player.name}}</p></l-popup>
</l-marker>
</l-map>
<h4 v-else style="padding: 0% 1%; text-align: center">{{loading?'Загрузка карты...':`Вид карты ${map_name} отсутвует!`}}</h4>
<md-button style="float: left" class="btn-gosty">{{players.length}} игроков</md-button>
<md-button style="float: right" class="btn-default" v-on:click="showMe(false)">Закрыть</md-button>
<md-button style="float: left; margin: 2.5% 1%" class="btn-gosty">{{players.length}} игроков</md-button>
<md-field style="float: left; width: 30%; margin-right: auto; margin-left: auto" v-if="map_exists && cfg_exists">
<label for="movies">Сортировка по классам</label>
<md-select multiple v-model="clz_select">
<md-option value="1">Разведчик</md-option>
<md-option value="2">Снайпер</md-option>
<md-option value="3">Солдат</md-option>
<md-option value="4">Подрывник</md-option>
<md-option value="5">Медик</md-option>
<md-option value="6">Пулеметчик</md-option>
<md-option value="7">Пидорас</md-option>
<md-option value="8">Шпион</md-option>
<md-option value="9">Инженер</md-option>
</md-select>
</md-field>
<md-field style="float: left; width: 30%; margin-right: auto; margin-left: auto" v-if="map_exists && cfg_exists">
<label for="movies">Сортировка по команде</label>
<md-select multiple v-model="team_select">
<md-option value="2">Красные</md-option>
<md-option value="3">Синие</md-option>
</md-select>
</md-field>
<md-button style="float: right; margin: 2.5% 1%" class="btn-default" v-on:click="showMe(false)">Закрыть</md-button>
</div>
</md-dialog>
</div>
@ -45,7 +66,9 @@ export default {
[2160, 3840]
],
crs: CRS.Simple,
cords: {}
cords: {},
clz_select: [],
team_select: [],
}),
methods: {
showMe(b) {
@ -133,4 +156,12 @@ export default {
.leaflet-container {
background: black !important;
}
.md-select-menu {
width: unset;
}
.md-checkbox-container {
background: rgba(178, 178, 178, 0.05);
}
</style>

2
src/components/TabsMenuElements/ServersView/Components/ServerFullInfo.vue

@ -23,6 +23,8 @@
<p class="p-server clickable" style="display: inline" v-on:click="$refs.sfi_kdt.showMe(true, 2, serverData['key'])">Топ смертей</p>
<p class="p-server" style="display: inline"> | </p>
<p class="p-server clickable" style="display: inline" v-on:click="$refs.sfi_ssd.showMe(true, serverData)">Статистика</p>
<p class="p-server" style="display: inline"> | </p>
<p class="p-server clickable" style="display: inline" v-on:click="$refs.sfi_pm.showMe(true)">Позиция игроков</p>
</div>
<div v-else style="text-align: center; font-size: 0.5em !important;">
<p class="p-server clickable" style="display: inline" v-on:click="$refs.sfi_ssd.showMe(true, serverData)">Статистика сервера</p>

Loading…
Cancel
Save