Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial fix for #326 #708

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion public/css/login.css
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ ul li {

.login .vertical-form {
margin: 0 auto;
width: 500px;
}

.login .vertical-form legend {
Expand Down
9 changes: 8 additions & 1 deletion resources/views/modpack/build/create.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,16 @@
</div>
<div class="form-group">
<label for="version">Minecraft Version</label>
@php
$lastBuild = $modpack->builds()->latest('updated_at')->first();
$lastVersion = "";
if (!empty($lastBuild)) {
$lastVersion = $lastBuild->minecraft;
}
@endphp
<select class="form-control" name="minecraft">
@foreach ($minecraft as $version)
<option value="{{ $version['version'] }}">{{ $version['version'] }}</option>
<option value="{{ $version['version'] }}" {{ $lastVersion == $version['version'] ? 'selected' : '' }}>{{ $version['version'] }}</option>
@endforeach
</select>
</div>
Expand Down
3 changes: 3 additions & 0 deletions resources/views/modpack/build/view.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@
modversion.enable();
modversion.refreshOptions(true);
$("#mod-version").attr("placeholder", "Select a Modversion...");
// Get the last mod version and select it
const versions = Object.values(modversion.currentResults.items)
modversion.setValue(versions[versions.length - 1].id, true);
}
},
error: function (xhr, textStatus, errorThrown) {
Expand Down