Show tournament supporter banner in profile page #3091
Merged
Conversation
app/Models/ProfileBanner.php
Outdated
@@ -42,4 +43,44 @@ public function country() | |||
{ | |||
return $this->belongsTo(Country::class, 'country_acronym'); | |||
} | |||
|
|||
public function macroVisible() |
nekodex
Apr 27, 2018
Collaborator
Maybe call this current
or something instead of visible
? Kinda ambiguous.
Maybe call this current
or something instead of visible
? Kinda ambiguous.
nanaya
Apr 27, 2018
Author
Collaborator
Went with active
because it might be for either current or previous tournament.
Went with active
because it might be for either current or previous tournament.
config/osu.php
Outdated
@@ -93,6 +93,17 @@ | |||
'notice' => presence(str_replace('\n', "\n", env('STORE_NOTICE'))), | |||
], | |||
'twitch_client_id' => env('TWITCH_CLIENT_ID'), | |||
'tournament_support' => [ |
nekodex
Apr 27, 2018
Collaborator
Hrm, maybe tournament_banner(s)
for these variables makes more sense than tournament_support
?
Hrm, maybe tournament_banner(s)
for these variables makes more sense than tournament_support
?
app/Transformers/UserTransformer.php
Outdated
@@ -43,6 +43,7 @@ class UserTransformer extends Fractal\TransformerAbstract | |||
'statistics', | |||
'unranked_beatmapset_count', | |||
'user_achievements', | |||
'visible_banner', |
nekodex
Apr 27, 2018
Collaborator
tournament_banner
, tournament_support_banner
or something instead? visible_banner
feels way too ambiguous at the UserTransformer
level
tournament_banner
, tournament_support_banner
or something instead? visible_banner
feels way too ambiguous at the UserTransformer
level
className: 'profile-header__info profile-header__info--top' | ||
if @props.user.visible_banner.id? | ||
a | ||
href: laroute.route('tournaments.show', tournament: @props.user.visible_banner.tournament_id) |
nekodex
Apr 27, 2018
•
Collaborator
Yeah, I do wonder if linking to that page is even useful in its current state...
Yeah, I do wonder if linking to that page is even useful in its current state...
href: laroute.route('tournaments.show', tournament: @props.user.visible_banner.tournament_id) | ||
el Img2x, | ||
src: @props.user.visible_banner.image | ||
className: 'profile-header__tournament-support' |
nekodex
Apr 27, 2018
Collaborator
See other comment about tournament_support
naming.
See other comment about tournament_support
naming.
This reverts commit bcdbdc4.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Fixes #2535. Not sure if linking to tournament page is useful.
Copypasta of required
.env
variables: