|
@ -51,15 +51,15 @@ |
|
|
<div v-else> |
|
|
<div v-else> |
|
|
<h3 style="text-align: center" class="sfi-current-player">Сейчас играет {{serverData['player_count']}}/{{serverData['max_players']}}</h3> |
|
|
<h3 style="text-align: center" class="sfi-current-player">Сейчас играет {{serverData['player_count']}}/{{serverData['max_players']}}</h3> |
|
|
<hr width="30%"> |
|
|
<hr width="30%"> |
|
|
<md-table v-model="players" md-sort="score" md-sort-order="desc" md-card md-fixed-header @md-selected="openPlayer" md-height="150px"> |
|
|
<md-table :value="serverData.players" md-sort="score" md-sort-order="desc" md-card md-fixed-header md-height="150px"> |
|
|
<md-table-row slot="md-table-row" slot-scope="{ item }" md-selectable="single"> |
|
|
<md-table-row slot="md-table-row" slot-scope="{ item }" md-selectable="single" v-on:click="openPlayer(item.id)"> |
|
|
<md-table-cell style="font-family: tf2secondary" md-label="Имя" md-sort-by="name">{{ item.name }}</md-table-cell> |
|
|
<md-table-cell style="font-family: tf2secondary" md-label="Имя" md-sort-by="name">{{ item.name }}</md-table-cell> |
|
|
<md-table-cell style="font-family: tf2secondary" md-label="Очки" md-sort-by="score">{{ item.score }}</md-table-cell> |
|
|
<md-table-cell style="font-family: tf2secondary" md-label="Очки" md-sort-by="score">{{ item.score }}</md-table-cell> |
|
|
<md-table-cell style="font-family: tf2secondary" md-label="Наиграно" md-sort-by="sec">{{ item.duration }}</md-table-cell> |
|
|
<md-table-cell style="font-family: tf2secondary" md-label="Наиграно" md-sort-by="sec">{{ item.duration }}</md-table-cell> |
|
|
<md-tooltip class="tooltip" md-direction="top">Нажми чтоб узнать поподробнее про {{item.name}}</md-tooltip> |
|
|
<md-tooltip class="tooltip" md-direction="top">Нажми чтоб узнать поподробнее про {{item.name}}</md-tooltip> |
|
|
</md-table-row> |
|
|
</md-table-row> |
|
|
</md-table> |
|
|
</md-table> |
|
|
<PlayerExtendedInfo ref="pei" :player="selected_player"/> |
|
|
<PlayerExtendedInfo ref="pei" :player="selected_player!==null&&serverData.players.filter(p => p.id === selected_player).length>0?serverData.players.filter(p => p.id === selected_player)[0]:null"/> |
|
|
</div> |
|
|
</div> |
|
|
<p class="p-server" style="text-align: center; margin: 2.5% 0;">Обновлен: {{(new Date(serverData['last_update']*1000)).toLocaleString()}}</p> |
|
|
<p class="p-server" style="text-align: center; margin: 2.5% 0;">Обновлен: {{(new Date(serverData['last_update']*1000)).toLocaleString()}}</p> |
|
|
</div> |
|
|
</div> |
|
@ -83,13 +83,16 @@ export default { |
|
|
name: "ServerFullInfo", |
|
|
name: "ServerFullInfo", |
|
|
components: {ServerStatsDialog, KillDeadTop, MessagesDialog, PlayerExtendedInfo, TerminalSvg, SteamSvg}, |
|
|
components: {ServerStatsDialog, KillDeadTop, MessagesDialog, PlayerExtendedInfo, TerminalSvg, SteamSvg}, |
|
|
props: { |
|
|
props: { |
|
|
serverData: Object, |
|
|
serverData: { |
|
|
|
|
|
type: Object, |
|
|
|
|
|
default: Object.create({"players":[]}) |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
data: () => ({ |
|
|
data: () => ({ |
|
|
showServerDialog: false, |
|
|
showServerDialog: false, |
|
|
expandPlayers: false, |
|
|
expandPlayers: false, |
|
|
players: [{score:0, name:"", duration:"", sec:0}], |
|
|
players: [{score:0, name:"", duration:"", sec:0}], |
|
|
selected_player: null, |
|
|
selected_player: -1, |
|
|
serverInfo: null |
|
|
serverInfo: null |
|
|
}), |
|
|
}), |
|
|
methods: { |
|
|
methods: { |
|
@ -110,6 +113,7 @@ export default { |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
openPlayer(item) { |
|
|
openPlayer(item) { |
|
|
|
|
|
//console.log("Open Player Extended Info", item); |
|
|
this.selected_player = item; |
|
|
this.selected_player = item; |
|
|
this.$refs.pei.showPlayerDialog = true; |
|
|
this.$refs.pei.showPlayerDialog = true; |
|
|
} |
|
|
} |
|
@ -124,7 +128,7 @@ export default { |
|
|
'address':'', |
|
|
'address':'', |
|
|
'workshop':'', |
|
|
'workshop':'', |
|
|
'player_count':'', |
|
|
'player_count':'', |
|
|
'players':0, |
|
|
'players':[], |
|
|
'max_player':0 |
|
|
'max_player':0 |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|