Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.5.0 #103

Merged
merged 3 commits into from
Feb 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "g5v",
"version": "1.4.0",
"version": "1.5.0",
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.25.0",
"axios": "^0.26.0",
"core-js": "^3.6.5",
"register-service-worker": "^1.7.1",
"vue": "^2.6.11",
Expand Down
8 changes: 4 additions & 4 deletions src/components/MatchInfo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,13 @@ export default {
this.matchInfo.team2_name = matchRes.team2_string;
this.matchInfo.team1_id = matchRes.team1_id;
this.matchInfo.team2_id = matchRes.team2_id;
this.matchInfo.start_time = new Date(matchRes.start_time)
.toLocaleString();
this.matchInfo.start_time = new Date(
matchRes.start_time
).toLocaleString();
this.matchInfo.end_time =
matchRes.end_time == null
? null
: new Date(matchRes.end_time)
.toLocaleString();
: new Date(matchRes.end_time).toLocaleString();
this.matchInfo.team1_score = matchRes.team1_score;
this.matchInfo.team2_score = matchRes.team2_score;
this.matchInfo.symbol = this.GetScoreSymbol(
Expand Down
20 changes: 8 additions & 12 deletions src/components/PlayerStatTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default {
allowRefresh: false,
timeoutId: -1,
isFinished: true,
apiUrl: process.env?.VUE_APP_G5V_API_URL || "/api",
apiUrl: process.env?.VUE_APP_G5V_API_URL || "/api"
};
},
created() {
Expand All @@ -256,16 +256,16 @@ export default {
let allMapIds = [];
let totalMatchTeam = [];
let allTeamIds = [];
res.filter((item) => {
let i = allMapIds.findIndex((x) => x == item.map_id);
let j = allTeamIds.findIndex((x) => x == item.team_id);
res.filter(item => {
let i = allMapIds.findIndex(x => x == item.map_id);
let j = allTeamIds.findIndex(x => x == item.team_id);
if (i <= -1) allMapIds.push(item.map_id);
if (j <= -1) allTeamIds.push(item.team_id);
return null;
});
allMapIds.forEach((map_id) => {
allMapIds.forEach(map_id => {
totalMatchTeam.push(
res.filter((stats) => {
res.filter(stats => {
return stats.map_id == map_id;
})
);
Expand Down Expand Up @@ -331,15 +331,11 @@ export default {
" " +
singleMapStat.team2_score;
this.arrMapString[index].start =
"Map Start: " +
new Date(singleMapStat.start_time)
.toLocaleString();
"Map Start: " + new Date(singleMapStat.start_time).toLocaleString();
this.arrMapString[index].end =
singleMapStat.end_time == null
? null
: "Map End: " +
new Date(singleMapStat.end_time)
.toLocaleString();
: "Map End: " + new Date(singleMapStat.end_time).toLocaleString();
this.arrMapString[index].map = "Map: " + singleMapStat.map_name;
this.arrMapString[index].demo = singleMapStat.demoFile;
});
Expand Down
13 changes: 8 additions & 5 deletions src/components/SeasonsTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ export default {
async saveNewSeason() {
if (this.$refs.newSeasonForm.validate()) {
let serverRes;
let newCvar;
const splitStr = x => {
const y = x.split(" ");
let retVal;
Expand All @@ -532,11 +533,13 @@ export default {
}
return retVal;
};
let newCvar = Object.assign(
{},
...this.newSeason.cvars.map(splitStr),
this.seasonDefaults
);
if (this.newSeason.cvars) {
newCvar = Object.assign(
{},
...this.newSeason.cvars.map(splitStr),
this.seasonDefaults
);
}
newCvar.spectators =
newCvar.spectators != "" ? newCvar.spectators.join(" ") : "";
newCvar.map_pool = newCvar.map_pool.join(" ");
Expand Down
7 changes: 3 additions & 4 deletions src/components/ServersTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@click="allServers = !allServers"
v-if="user.id != null"
>
<div v-if="displayAllServerText">
<div v-if="allServers">
{{ $t("MyServers.ShowMyServers") }}
</div>
<div v-else>
Expand Down Expand Up @@ -216,7 +216,6 @@ export default {
gotv_port: 0
},
allServers: false,
displayAllServerText: false,
formTitle: this.$t("MyServers.FormTitleNew")
};
},
Expand All @@ -243,9 +242,9 @@ export default {
this.servers = [];
this.selectedHeaders = JSON.parse(JSON.stringify(this.headers));
this.isLoading = true;
if (this.$route.path == "/myservers" && this.allServers === false) res = await this.GetMyServers();
if (this.$route.path == "/myservers" && this.allServers === false)
res = await this.GetMyServers();
else {
this.displayAllServerText = true;
res = await this.GetAllServers();
}
if (typeof res == "string") res = [];
Expand Down
33 changes: 16 additions & 17 deletions src/components/VetoTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
v-if="item.side"
:class="[
'v-data-table__expand-icon',
{ 'v-data-table__expand-icon--active': isExpanded },
{ 'v-data-table__expand-icon--active': isExpanded }
]"
@click.stop="expand(!isExpanded)"
>$expand</v-icon
Expand All @@ -56,20 +56,19 @@

<template v-slot:expanded-item="{ item, headers }">
<td :colspan="headers.length">
<v-data-table
item-key="id"
class="elevation-1"
:headers="additionalHeaders"
hide-default-footer
dense
:key="item.id"
:items="[item]"
disable-sort
:colspan="headers.length"
/>
</td>
<v-data-table
item-key="id"
class="elevation-1"
:headers="additionalHeaders"
hide-default-footer
dense
:key="item.id"
:items="[item]"
disable-sort
:colspan="headers.length"
/>
</td>
</template>

</v-data-table>
</v-container>
</template>
Expand Down Expand Up @@ -144,10 +143,10 @@ export default {
console.log(error);
}
},
expandAll: function () {
this.expanded = this.people.filter((item) => item.description);
expandAll: function() {
this.expanded = this.people.filter(item => item.description);
},
collapseAll: function () {
collapseAll: function() {
this.expanded = [];
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/router/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const routes = [
{
path: "/matches",
name: "Matches",
component: () => import(/* webpackChunkName: "Home" */ "../views/Matches.vue")
component: () =>
import(/* webpackChunkName: "Home" */ "../views/Matches.vue")
},
{
path: "/teams",
Expand All @@ -33,7 +34,8 @@ const routes = [
{
path: "/mymatches",
name: "My Matches",
component: () => import(/* webpackChunkName: "Home" */ "../views/Matches.vue")
component: () =>
import(/* webpackChunkName: "Home" */ "../views/Matches.vue")
},
{
path: "/myteams",
Expand Down
63 changes: 31 additions & 32 deletions src/utils/api.vue
Original file line number Diff line number Diff line change
Expand Up @@ -957,41 +957,40 @@ export default {
} catch (error) {
console.log("No veto sides found.");
}
vetoMessage.forEach((vetoData) => {
if(vetoSideMessage) {
let combinedFind = vetoSideMessage.find((vetoSideChoice) => {
return (
vetoData["id"] === vetoSideChoice["veto_id"] &&
vetoData["map"] === vetoSideChoice["map"]
);
});
combinedFind
? combinedVetoInfo.push({
id: vetoData.id,
match_id: vetoData.match_id,
team_name: vetoData.team_name,
map: vetoData.map,
pick_or_veto: vetoData.pick_or_veto,
team_name_side: combinedFind.team_name,
side: combinedFind.side,
})
: combinedVetoInfo.push({
id: vetoData.id,
match_id: vetoData.match_id,
team_name: vetoData.team_name,
map: vetoData.map,
pick_or_veto: vetoData.pick_or_veto,
});
vetoMessage.forEach(vetoData => {
if (vetoSideMessage) {
let combinedFind = vetoSideMessage.find(vetoSideChoice => {
return (
vetoData["id"] === vetoSideChoice["veto_id"] &&
vetoData["map"] === vetoSideChoice["map"]
);
});
combinedFind
? combinedVetoInfo.push({
id: vetoData.id,
match_id: vetoData.match_id,
team_name: vetoData.team_name,
map: vetoData.map,
pick_or_veto: vetoData.pick_or_veto,
team_name_side: combinedFind.team_name,
side: combinedFind.side
})
: combinedVetoInfo.push({
id: vetoData.id,
match_id: vetoData.match_id,
team_name: vetoData.team_name,
map: vetoData.map,
pick_or_veto: vetoData.pick_or_veto
});
} else {
combinedVetoInfo.push({
id: vetoData.id,
match_id: vetoData.match_id,
team_name: vetoData.team_name,
map: vetoData.map,
pick_or_veto: vetoData.pick_or_veto,
});
id: vetoData.id,
match_id: vetoData.match_id,
team_name: vetoData.team_name,
map: vetoData.map,
pick_or_veto: vetoData.pick_or_veto
});
}

});
return combinedVetoInfo;
} catch (error) {
Expand Down
17 changes: 11 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1895,12 +1895,12 @@ aws4@^1.8.0:
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59"
integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==

axios@^0.25.0:
version "0.25.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.25.0.tgz#349cfbb31331a9b4453190791760a8d35b093e0a"
integrity sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==
axios@^0.26.0:
version "0.26.0"
resolved "https://registry.yarnpkg.com/axios/-/axios-0.26.0.tgz#9a318f1c69ec108f8cd5f3c3d390366635e13928"
integrity sha512-lKoGLMYtHvFrPVt3r+RBMp9nh34N0M8zEfCWqdWZx6phynIEhQqAdydpyBAAG211zlhX9Rgu08cOamy6XjE5Og==
dependencies:
follow-redirects "^1.14.7"
follow-redirects "^1.14.8"

babel-eslint@^10.1.0:
version "10.1.0"
Expand Down Expand Up @@ -4072,11 +4072,16 @@ flush-write-stream@^1.0.0:
inherits "^2.0.3"
readable-stream "^2.3.6"

follow-redirects@^1.0.0, follow-redirects@^1.14.7:
follow-redirects@^1.0.0:
version "1.14.7"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685"
integrity sha512-+hbxoLbFMbRKDwohX8GkTataGqO6Jb7jGwpAlwgy2bIz25XtRm7KEzJM76R1WiNT5SwZkX4Y75SwBolkpmE7iQ==

follow-redirects@^1.14.8:
version "1.14.8"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.8.tgz#016996fb9a11a100566398b1c6839337d7bfa8fc"
integrity sha512-1x0S9UVJHsQprFcEC/qnNzBLcIxsjAV905f/UkQxbclCsoTWlacCNOpQa/anodLl2uaEKFhfWOvM2Qg77+15zA==

for-in@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80"
Expand Down