Skip to content

Commit

Permalink
Merge branch 'master' into score-index-exclude-restricted
Browse files Browse the repository at this point in the history
  • Loading branch information
notbakaneko authored Dec 10, 2024
2 parents 723fde0 + 1ee253f commit ee4f07d
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 48 deletions.
2 changes: 1 addition & 1 deletion app/Http/Controllers/ScoresController.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public function download($rulesetOrSoloId, $id = null)
/**
* Get Scores
*
* Returns submitted scores. Up to 1000 scores will be returned in order of oldest to latest.
* Returns all passed scores. Up to 1000 scores will be returned in order of oldest to latest.
* Most recent scores will be returned if `cursor_string` parameter is not specified.
*
* Obtaining new scores that arrived after the last request can be done by passing `cursor_string`
Expand Down
1 change: 1 addition & 0 deletions app/Models/Team.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use App\Libraries\BBCodeForDB;
use App\Libraries\Uploader;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;

class Team extends Model
Expand Down
33 changes: 17 additions & 16 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions resources/css/bem/beatmap-score-top.less
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
flex-direction: column;

&__achieved {
margin: 2px 0;
margin-bottom: 2px; // more balanced margin
font-size: @font-size--small;
}

Expand All @@ -18,6 +18,12 @@
margin: 0px 10px;
}

&__flags {
display: flex;
gap: 5px;
font-size: @flag-size-medium; // icon size
}

&__link-container {
.full-size();
}
Expand Down Expand Up @@ -130,6 +136,8 @@

&__user-box {
flex: none;
display: grid;
gap: 4px;

@media @desktop {
margin-right: 10px;
Expand All @@ -139,7 +147,6 @@
&__username {
font-size: 18px;
font-weight: 700;
margin-bottom: 2px;
display: block;
.link-inverted();
}
Expand Down
2 changes: 1 addition & 1 deletion resources/css/bem/flag-country.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
}

&--medium {
--height: 20px;
--height: @flag-size-medium;
}

&--small {
Expand Down
1 change: 1 addition & 0 deletions resources/css/bem/forum-post-info.less
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
width: 100%;
display: flex;
justify-content: center;
font-size: @flag-size-medium;
}

&--group-badge {
Expand Down
1 change: 1 addition & 0 deletions resources/css/bem/profile-info.less
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
align-self: flex-end;
margin-bottom: var(--vertical-padding);
background-image: var(--avatar);
background-size: contain;
.default-box-shadow();
}

Expand Down
2 changes: 2 additions & 0 deletions resources/css/variables.less
Original file line number Diff line number Diff line change
Expand Up @@ -324,3 +324,5 @@
@user-card-height: 120px;

@user-list-icon-size: 20px;

@flag-size-medium: 20px;
28 changes: 15 additions & 13 deletions resources/js/beatmapsets-show/scoreboard/top-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,21 @@ export default class TopCard extends React.PureComponent<Props> {
/>
</div>

<a
className='u-hover'
href={route('rankings', {
country: this.props.score.user.country_code,
mode: ruleset,
type: 'performance',
})}
>
<FlagCountry
country={this.props.score.user.country}
modifiers='flat'
/>
</a>
<div className='beatmap-score-top__flags'>
<a
className='u-hover'
href={route('rankings', {
country: this.props.score.user.country_code,
mode: ruleset,
type: 'performance',
})}
>
<FlagCountry
country={this.props.score.user.country}
modifiers='flat'
/>
</a>
</div>
</div>
</div>

Expand Down
5 changes: 1 addition & 4 deletions resources/views/forum/topics/_post_info.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,7 @@ class="forum-post-info__row forum-post-info__row--title"
'type' => 'performance',
'country' => $user->country->getKey(),
])}}">
@include('objects._flag_country', [
'country' => $user->country,
'modifiers' => 'medium',
])
@include('objects._flag_country', ['country' => $user->country])
</a>
</div>
@endif
Expand Down
4 changes: 2 additions & 2 deletions resources/views/layout/metadata.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@
<script src="{{ unmix('js/runtime.js') }}" data-turbo-eval="false"></script>
<script src="{{ unmix('js/vendor.js') }}" data-turbo-eval="false"></script>

<script src="{{ unmix("js/locales/{$currentLocale}.js") }}" data-turbo-eval="false"></script>
<script src="{{ unmix("js/locales/{$currentLocale}.js") }}" data-turbo-track="reload"></script>
@if ($fallbackLocale !== $currentLocale)
<script src="{{ unmix("js/locales/{$fallbackLocale}.js") }}" data-turbo-eval="false"></script>
<script src="{{ unmix("js/locales/{$fallbackLocale}.js") }}" data-turbo-track="reload"></script>
@endif

<script src="{{ unmix('js/commons.js') }}" data-turbo-eval="false"></script>
Expand Down
12 changes: 6 additions & 6 deletions resources/views/teams/show.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@
See the LICENCE file in the repository root for full licence text.
--}}
@php
use App\Models\DeletedUser;
use App\Transformers\UserCompactTransformer;
$userTransformer = new UserCompactTransformer();
$teamMembers = array_map(
fn ($users) => json_collection($users, $userTransformer, UserCompactTransformer::CARD_INCLUDES),
$team->members->mapToGroups(fn ($member) => [
$member->user_id === $team->leader_id ? 'leader' : 'member' => $member->user,
])->all(),
);
$toJson = fn ($users) => json_collection($users, $userTransformer, UserCompactTransformer::CARD_INCLUDES);
$teamMembers = array_map($toJson, $team->members->mapToGroups(fn ($member) => [
$member->user_id === $team->leader_id ? 'leader' : 'member' => $member->user,
])->all());
$teamMembers['member'] ??= [];
$teamMembers['leader'] ??= $toJson([$team->leader ?? new DeletedUser(['user_id' => $team->leader_id])]);
$headerUrl = $team->header()->url();
@endphp

Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5371,9 +5371,9 @@ ms@^2.1.1:
integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==

nanoid@^3.3.6:
version "3.3.6"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.6.tgz#443380c856d6e9f9824267d960b4236ad583ea4c"
integrity sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==
version "3.3.8"
resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.3.8.tgz#b1be3030bee36aaff18bacb375e5cce521684baf"
integrity sha512-WNLf5Sd8oZxOm+TzppcYk8gVOgP+l58xNy58D0nbUnOxOWRWvlcCV4kUF7ltmI6PsrLl/BgKEyS4mqsGChFN0w==

nanomatch@^1.2.9:
version "1.2.13"
Expand Down

0 comments on commit ee4f07d

Please sign in to comment.