mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-12 20:20:41 -05:00
Renames $availableSptVersions to $activeSptVersions in Mod Listing
This commit is contained in:
parent
552ecf3ac2
commit
ffd5117028
@ -48,14 +48,14 @@ class Index extends Component
|
||||
/**
|
||||
* The available SPT versions.
|
||||
*/
|
||||
public Collection $availableSptVersions;
|
||||
public Collection $activeSptVersions;
|
||||
|
||||
/**
|
||||
* The component mount method, run only once when the component is mounted.
|
||||
*/
|
||||
public function mount(): void
|
||||
{
|
||||
$this->availableSptVersions = $this->availableSptVersions ?? Cache::remember('available-spt-versions', 60 * 60, function () {
|
||||
$this->activeSptVersions = $this->activeSptVersions ?? Cache::remember('active-spt-versions', 60 * 60, function () {
|
||||
return SptVersion::getVersionsForLastThreeMinors();
|
||||
});
|
||||
|
||||
@ -67,7 +67,7 @@ class Index extends Component
|
||||
*/
|
||||
public function getLatestMinorVersions(): Collection
|
||||
{
|
||||
return $this->availableSptVersions->filter(function (SptVersion $sptVersion) {
|
||||
return $this->activeSptVersions->filter(function (SptVersion $sptVersion) {
|
||||
return $sptVersion->isLatestMinor();
|
||||
});
|
||||
}
|
||||
|
@ -53,13 +53,13 @@
|
||||
<div class="mx-auto grid max-w-7xl grid-cols-2 gap-x-4 px-4 text-sm sm:px-6 md:gap-x-6 lg:px-8">
|
||||
<div class="grid auto-rows-min grid-cols-1 gap-y-10 md:grid-cols-2 md:gap-x-6">
|
||||
@php
|
||||
$totalVersions = count($availableSptVersions);
|
||||
$totalVersions = count($activeSptVersions);
|
||||
$half = ceil($totalVersions / 2);
|
||||
@endphp
|
||||
<fieldset>
|
||||
<legend class="block font-medium text-gray-900 dark:text-gray-100">{{ __('SPT Versions') }}</legend>
|
||||
<div class="space-y-6 pt-6 sm:space-y-4 sm:pt-4">
|
||||
@foreach ($availableSptVersions as $index => $version)
|
||||
@foreach ($activeSptVersions as $index => $version)
|
||||
@if ($index < $half)
|
||||
<x-filter-checkbox id="sptVersions-{{ $index }}" name="sptVersions" value="{{ $version->version }}">{{ $version->version }}</x-filter-checkbox>
|
||||
@endif
|
||||
@ -69,7 +69,7 @@
|
||||
<fieldset>
|
||||
<legend class="block font-medium text-gray-900 dark:text-gray-100"> </legend>
|
||||
<div class="space-y-6 pt-6 sm:space-y-4 sm:pt-4">
|
||||
@foreach ($availableSptVersions as $index => $version)
|
||||
@foreach ($activeSptVersions as $index => $version)
|
||||
@if ($index >= $half)
|
||||
<x-filter-checkbox id="sptVersions-{{ $index }}" name="sptVersions" value="{{ $version->version }}">{{ $version->version }}</x-filter-checkbox>
|
||||
@endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user