fix colors for chart and list

This commit is contained in:
2023-03-28 19:10:55 +02:00
parent 0316761c10
commit 8ade9d79a1
4 changed files with 71 additions and 21 deletions
+6 -2
View File
@@ -9,7 +9,7 @@
</select>
<select v-on:change="changeFilter({ weapon: ($event.target as HTMLInputElement).value })">
<option></option>
<option v-for="(weaponData, weaponId) in weapons" v-bind:key="weaponId" :value="weaponId">{{ weaponId }}</option>
<option v-for="weaponId in sortedWeaponList" v-bind:key="weaponId" :value="weaponId">{{ weaponId }}</option>
</select>
</div>
@@ -43,7 +43,11 @@ export default defineComponent({
},
computed: {
servers (): Server[] { return this.store.state.servers },
weapons (): { [key: string]: Weapon } { return this.store.getters.getWeaponList(this.filters) }
weapons (): { [key: string]: Weapon } { return this.store.getters.getWeaponList(this.filters) },
sortedWeaponList (): string[] {
const weapons = Object.keys(this.weapons)
return weapons.sort()
}
},
methods: {
async changeFilter ({ weapon, server }: { weapon?: string, server?: string }) {