Skip to content

Commit

Permalink
#52 Cleanup: skip importing teamColorClass as component method
Browse files Browse the repository at this point in the history
  • Loading branch information
drweissbrot committed Jun 18, 2023
1 parent 79ad527 commit a39d29e
Show file tree
Hide file tree
Showing 32 changed files with 31 additions and 139 deletions.
6 changes: 1 addition & 5 deletions src/themes/fennec/focused-player/ammo/ammo.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,7 @@ export default {
},

colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ export default {
},

colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
},

colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},

activeWeapon() {
Expand All @@ -32,8 +32,4 @@ export default {
}))
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default {
},

colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},

value() {
Expand All @@ -32,8 +32,4 @@ export default {
}
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@ export default {
},

colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ export default {
},

colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},
},

methods: {
teamColorClass,
},
}
6 changes: 2 additions & 4 deletions src/themes/fennec/players-alive/players-alive.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,15 @@ export default {
},

leftTeamColorClass() {
return this.teamColorClass(this.$teams[0])
return teamColorClass(this.$teams[0])
},

rightTeamColorClass() {
return this.teamColorClass(this.$teams[1])
return teamColorClass(this.$teams[1])
},
},

methods: {
teamColorClass,

countAlivePlayers(team) {
let alive = 0

Expand Down
2 changes: 0 additions & 2 deletions src/themes/fennec/radar/bomb/dropped-bomb/dropped-bomb.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { getLevel, levels } from '/hud/helpers/radar-levels.js'
import { offsetX, offsetY } from '/hud/helpers/radar-offset.js'
import { radarConfig } from '/hud/helpers/radar-config.js'
import { teamColorClass } from '/hud/helpers/team-color-class.js'

export default {
data() {
Expand Down Expand Up @@ -42,7 +41,6 @@ export default {
getLevel,
offsetX,
offsetY,
teamColorClass,

averagePreviousPositions() {
let sumX = 0
Expand Down
2 changes: 0 additions & 2 deletions src/themes/fennec/radar/bomb/planted-bomb/planted-bomb.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { getLevel, levels } from '/hud/helpers/radar-levels.js'
import { offsetX, offsetY } from '/hud/helpers/radar-offset.js'
import { radarConfig } from '/hud/helpers/radar-config.js'
import { teamColorClass } from '/hud/helpers/team-color-class.js'

export default {
props: [
Expand Down Expand Up @@ -32,6 +31,5 @@ export default {
getLevel,
offsetX,
offsetY,
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default {
radarConfig,

colorClass() {
return this.teamColorClass(this.grenade.owner.team)
return teamColorClass(this.grenade.owner.team)
},

coordinates() {
Expand Down Expand Up @@ -56,7 +56,6 @@ export default {
getLevel,
offsetX,
offsetY,
teamColorClass,

averagePreviousPositions() {
let sumX = 0
Expand Down
3 changes: 1 addition & 2 deletions src/themes/fennec/radar/grenade/smoke/smoke.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
radarConfig,

colorClass() {
return this.teamColorClass(this.grenade.owner.team)
return teamColorClass(this.grenade.owner.team)
},

coordinates() {
Expand All @@ -32,6 +32,5 @@ export default {
getLevel,
offsetX,
offsetY,
teamColorClass,
},
}
3 changes: 1 addition & 2 deletions src/themes/fennec/radar/player/alive-player/alive-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
radarConfig,

colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},

coordinates() {
Expand Down Expand Up @@ -52,7 +52,6 @@ export default {
getLevel,
offsetX,
offsetY,
teamColorClass,

getAngle() {
const [x, y] = this.player.forward
Expand Down
3 changes: 1 addition & 2 deletions src/themes/fennec/radar/player/dead-player/dead-player.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export default {
radarConfig,

colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},

coordinates() {
Expand All @@ -32,6 +32,5 @@ export default {
getLevel,
offsetX,
offsetY,
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
computed: {
colorClass() {
if (this.round.winningTeam) {
return this.teamColorClass(this.round.winningTeam)
return teamColorClass(this.round.winningTeam)
}
},

Expand All @@ -25,8 +25,4 @@ export default {
return this.round.roundNumber === this.$round.roundNumber
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},
},

methods: {
teamColorClass,
},
}
6 changes: 1 addition & 5 deletions src/themes/fennec/sidebars/sidebar/player/adr/adr.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},

positionClass() {
return `--${this.position}`
},
},

methods: {
teamColorClass,
},
}
6 changes: 1 addition & 5 deletions src/themes/fennec/sidebars/sidebar/player/deaths/deaths.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},

positionClass() {
return `--${this.position}`
},
},

methods: {
teamColorClass,
},
}
6 changes: 1 addition & 5 deletions src/themes/fennec/sidebars/sidebar/player/kills/kills.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},
},

methods: {
teamColorClass,
},
}
6 changes: 1 addition & 5 deletions src/themes/fennec/sidebars/sidebar/player/taser/taser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.player.team)
return teamColorClass(this.player.team)
},

positionClass() {
return `--${this.position}`
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.team)
return teamColorClass(this.team)
},

positionClass() {
Expand All @@ -32,8 +32,4 @@ export default {
return this.team.players.reduce((sum, player) => sum + player.equipmentValue, 0)
},
},

methods: {
teamColorClass,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {

computed: {
colorClass() {
return this.teamColorClass(this.team)
return teamColorClass(this.team)
},

positionClass() {
Expand Down Expand Up @@ -57,8 +57,6 @@ export default {
},

methods: {
teamColorClass,

getGrenadeName(grenade) {
switch (grenade.name) {
case 'weapon_decoy': return 'decoy'
Expand Down
Loading

0 comments on commit a39d29e

Please sign in to comment.