mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 23:52:12 +00:00
Firing pin sorting for guntracker moved to client-side. (#10268)
This commit is contained in:
@@ -56,7 +56,7 @@
|
|||||||
)
|
)
|
||||||
wireless_firing_pins_data[++wireless_firing_pins_data.len] = guntracker_info
|
wireless_firing_pins_data[++wireless_firing_pins_data.len] = guntracker_info
|
||||||
|
|
||||||
data["wireless_firing_pins"] = sortByKey(wireless_firing_pins_data, "registered_info")
|
data["wireless_firing_pins"] = wireless_firing_pins_data
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
|||||||
6
html/changelogs/johnwildkins-firearmfix3.yml
Normal file
6
html/changelogs/johnwildkins-firearmfix3.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
author: JohnWildkins
|
||||||
|
|
||||||
|
delete-after: True
|
||||||
|
|
||||||
|
changes:
|
||||||
|
- backend: "Moves firearm control sorting to clientside, hopefully alleviating issues."
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
<th>Firearm</th>
|
<th>Firearm</th>
|
||||||
<th>Settings</th>
|
<th>Settings</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr v-for="gun in wireless_firing_pins" class="item border" :key="gun.ref">
|
<tr v-for="gun in sorted_pins" class="item border" :key="gun.ref">
|
||||||
<td>{{ gun.registered_info }}</td>
|
<td>{{ gun.registered_info }}</td>
|
||||||
<td>{{ gun.gun_name }}</td>
|
<td>{{ gun.gun_name }}</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -25,6 +25,11 @@
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return this.$root.$data.state;
|
return this.$root.$data.state;
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
sorted_pins: function() {
|
||||||
|
return this.wireless_firing_pins.slice(0).sort((a, b) => (a.registered_info > b.registered_info) ? 1 : -1)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user