diff --git a/api-request.ts b/api-request.ts index c1baaf78..9c00754e 100644 --- a/api-request.ts +++ b/api-request.ts @@ -1,4 +1,4 @@ -import axios, { AxiosInstance } from 'axios' +import axios, { AxiosInstance, CancelTokenSource } from 'axios' import { CommonApiParamsInterface } from '~/interfaces/CommonApiParmsInterface' export default class ApiRequest { @@ -13,11 +13,13 @@ export default class ApiRequest { public async get( endpoint: string, - params?: CommonApiParamsInterface + params?: CommonApiParamsInterface, + cancelToken?: CancelTokenSource ): Promise { return await this.client .get(endpoint, { params, + cancelToken: cancelToken?.token, }) .then((response) => { // console.log('Api Client Request', { endpoint, params, response }) diff --git a/assets/css/tailwind.scss b/assets/css/tailwind.scss index 5fe7eddf..ae0d432b 100644 --- a/assets/css/tailwind.scss +++ b/assets/css/tailwind.scss @@ -60,6 +60,18 @@ body { .border-tint { border: 1px solid #5d6265; } +.text-vs { + color: rgba(107, 70, 193, 1) +} +.text-nc { + color: rgba(43, 108, 176, 1) +} +.text-tr { + color: rgba(197, 48, 48, 1) +} +.text-nso { + color: rgba(134, 148, 167, 1) +} .outofplay { @apply bg-gray-800; background: repeating-linear-gradient( @@ -145,6 +157,9 @@ body { background-color: rgba(100, 130, 140, 1); } } +.bg-tint-solid { + background-color: #303a40; +} .bg-vs { background-color: rgba(85, 60, 154, 0.5); transition: background-color 0.25s ease-out; @@ -391,6 +406,10 @@ select { @apply bg-red-600 text-white text-xs font-semibold px-1 py-0.5 rounded; line-height: 1.5rem; + &:hover { + @apply bg-red-500; + } + &.green { @apply bg-green-600; @@ -407,11 +426,25 @@ select { } } + &.blue { + @apply bg-blue-500; + + &:hover { + @apply bg-blue-400; + } + &.border { + @apply border-blue-400 + } + } + &.gray { - @apply bg-gray-500; + @apply bg-gray-600; &:hover { - @apply bg-gray-600; + @apply bg-gray-500; + } + &.border { + @apply border-gray-400 } } @@ -586,8 +619,9 @@ a.hyperlink { } .tag { - @apply py-1 px-2 rounded-tl-sm rounded-tr-sm text-xs text-center font-bold; + @apply rounded-tl-sm rounded-tr-sm text-sm text-center font-bold; margin: -1rem -1rem 1rem; + line-height: 2rem; &.section { background-color: rgba(48, 58, 64, 1); @@ -693,6 +727,7 @@ td.text-middle { .theme--dark { &.v-tabs > .v-tabs-bar { background-color: #9b2c2c !important; + text-transform: uppercase !important; .v-tab--disabled { background-color: #000 !important; diff --git a/components/BarChart.js b/components/BarChart.js deleted file mode 100644 index f1e82493..00000000 --- a/components/BarChart.js +++ /dev/null @@ -1,30 +0,0 @@ -/* eslint-disable import/named */ -import { Bar, mixins } from 'vue-chartjs' -import 'chartjs-plugin-annotation' -const { reactiveProp } = mixins - -export default { - extends: Bar, - mixins: [reactiveProp], - props: { - chartData: { - type: Object, - default: null, - }, - options: { - type: Object, - default: null, - }, - }, - mounted() { - // this.chartData is created in the mixin. - // If you want to pass options please create a local options object - this.renderChart(this.chartData, this.options) - }, - watch: { - options() { - console.log('chart updated') - this.update() - }, - }, -} diff --git a/components/InfoTooltip.vue b/components/InfoTooltip.vue new file mode 100644 index 00000000..03daa6ae --- /dev/null +++ b/components/InfoTooltip.vue @@ -0,0 +1,33 @@ + + diff --git a/components/LineChart.js b/components/LineChart.js deleted file mode 100644 index 56b1b80c..00000000 --- a/components/LineChart.js +++ /dev/null @@ -1,30 +0,0 @@ -/* eslint-disable import/named */ -import { Line, mixins } from 'vue-chartjs' -import 'chartjs-plugin-annotation' -const { reactiveProp } = mixins - -export default { - extends: Line, - mixins: [reactiveProp], - props: { - chartData: { - type: Object, - default: null, - }, - options: { - type: Object, - default: null, - }, - }, - mounted() { - // this.chartData is created in the mixin. - // If you want to pass options please create a local options object - this.renderChart(this.chartData, this.options) - }, - watch: { - options() { - console.log('chart updated') - this.update() - }, - }, -} diff --git a/components/Search.vue b/components/Search.vue deleted file mode 100644 index 242f12ea..00000000 --- a/components/Search.vue +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/components/alert/AlertBattleranks.vue b/components/alert/AlertBattleranks.vue index ec20ad96..03dcb410 100644 --- a/components/alert/AlertBattleranks.vue +++ b/components/alert/AlertBattleranks.vue @@ -1,6 +1,14 @@ diff --git a/components/alert/AlertCharacterMetrics.vue b/components/alert/AlertCharacterMetrics.vue index 3b100d65..5bb6250e 100644 --- a/components/alert/AlertCharacterMetrics.vue +++ b/components/alert/AlertCharacterMetrics.vue @@ -29,33 +29,78 @@ player. "Time Played" represents the time used for XPM calculations.

-

+

BR, ASP and Outfit Membership info is updated once every 24 hours (upon your next play session). Any players above BR 120 have ASPed - (320 max). + (420 max).

Key: - BR = Battle Rank - KD = Kill / Death Ratio - HS = Head Shots - HSR% = Head Shot Ratio - TKs = Team Kills + + + + + + + + + + + + + + + + + + TKed = Team killed by same faction - Sui = Suicides - KPM = Kills Per Minute - DPM = Deaths Per Minute - HSPM = Head Shots Per Minute - TKPM = Team Kills Per Minute - SuiPM = Suicides Per Minute + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

- + Shows running totals of {{ mode.toLowerCase() }} per faction. +

+
+ :chart-options="chartOptions" + :styles="{ height: '400px' }" + > diff --git a/components/profiles/ProfileCombatMetrics.vue b/components/profiles/ProfileCombatMetrics.vue new file mode 100644 index 00000000..fb2611e2 --- /dev/null +++ b/components/profiles/ProfileCombatMetrics.vue @@ -0,0 +1,279 @@ + + + diff --git a/components/profiles/ProfileCombatMetricsGraph.vue b/components/profiles/ProfileCombatMetricsGraph.vue new file mode 100644 index 00000000..79a098d0 --- /dev/null +++ b/components/profiles/ProfileCombatMetricsGraph.vue @@ -0,0 +1,298 @@ + + + diff --git a/components/profiles/ProfileDaysFilter.vue b/components/profiles/ProfileDaysFilter.vue new file mode 100644 index 00000000..2a458055 --- /dev/null +++ b/components/profiles/ProfileDaysFilter.vue @@ -0,0 +1,60 @@ + + + diff --git a/components/profiles/ProfileLogos.vue b/components/profiles/ProfileLogos.vue new file mode 100644 index 00000000..135e3fa9 --- /dev/null +++ b/components/profiles/ProfileLogos.vue @@ -0,0 +1,107 @@ + + + diff --git a/components/search/SearchBar.vue b/components/search/SearchBar.vue new file mode 100644 index 00000000..e0450562 --- /dev/null +++ b/components/search/SearchBar.vue @@ -0,0 +1,334 @@ + + + + + diff --git a/components/search/SearchResult.vue b/components/search/SearchResult.vue new file mode 100644 index 00000000..c86aebe3 --- /dev/null +++ b/components/search/SearchResult.vue @@ -0,0 +1,114 @@ + + + diff --git a/components/statistics/characters/Characters.vue b/components/statistics/characters/Characters.vue index 4a50aac7..64b841b5 100644 --- a/components/statistics/characters/Characters.vue +++ b/components/statistics/characters/Characters.vue @@ -2,8 +2,7 @@

Player Statistics

- Shows the top 1000 Players for the selected criteria. You'll be able to - search for yourself in a future update. + Shows the top 1000 Players for the selected criteria.

diff --git a/components/statistics/characters/CharactersLeaderboard.vue b/components/statistics/characters/CharactersLeaderboard.vue index e772ec86..902e89ba 100644 --- a/components/statistics/characters/CharactersLeaderboard.vue +++ b/components/statistics/characters/CharactersLeaderboard.vue @@ -15,7 +15,7 @@

BR, ASP and Outfit Membership info is updated once every 24 hours (upon your next play session). Any players above BR 120 have ASPed - (320 max). + (420 max).

Outfit Statistics

- Shows the top 1000 Outfits for the selected criteria. You'll be able to - search for your outfit in a future update. + Shows the top 1000 Outfits for the selected criteria.

diff --git a/components/statistics/victories/VictoriesTimeline.vue b/components/statistics/victories/VictoriesTimeline.vue index a42f2e73..2cae8f62 100644 --- a/components/statistics/victories/VictoriesTimeline.vue +++ b/components/statistics/victories/VictoriesTimeline.vue @@ -1,7 +1,9 @@