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

Show tournament supporter banner in profile page #3091

Merged
merged 19 commits into from May 9, 2018

Conversation

nanaya
Copy link
Collaborator

@nanaya nanaya commented Apr 26, 2018

Fixes #2535. Not sure if linking to tournament page is useful.

Copypasta of required .env variables:

TOURNAMENT_BANNER_CURRENT_ID=
# Image path/url for tournament supporter banner.
# Will be appended with country abbreviation and `.jpg`. `@2x` version is also required (prepended before `.jpg`).
# Example:
#   prefix: https://assets.ppy.sh/tournament-banners/official/twc2018_banner_
#   image path: https://assets.ppy.sh/tournament-banners/official/twc2018_banner_JP.jpg
#   image path @2x: https://assets.ppy.sh/tournament-banners/official/twc2018_banner_JP@2x.jpg
TOURNAMENT_BANNER_CURRENT_PREFIX=

TOURNAMENT_BANNER_PREVIOUS_ID=
# Same as `_CURRENT_PREFIX`.
TOURNAMENT_BANNER_PREVIOUS_PREFIX=
# Winning country code
TOURNAMENT_BANNER_PREVIOUS_WINNER_ID=

@@ -42,4 +43,44 @@ public function country()
{
return $this->belongsTo(Country::class, 'country_acronym');
}

public function macroVisible()

This comment was marked as off-topic.

This comment was marked as off-topic.

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' => [

This comment was marked as off-topic.

@@ -43,6 +43,7 @@ class UserTransformer extends Fractal\TransformerAbstract
'statistics',
'unranked_beatmapset_count',
'user_achievements',
'visible_banner',

This comment was marked as off-topic.

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)

This comment was marked as off-topic.

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'

This comment was marked as off-topic.

@nekodex nekodex merged commit 16abe2a into ppy:master May 9, 2018
@nanaya nanaya deleted the user_tournament_support branch May 21, 2018 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

World Cup supporter banners is invisible on new site
3 participants