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

Add supporter status to the supporter page #2896

Merged
merged 10 commits into from Apr 11, 2018
Merged

Conversation

nekodex
Copy link
Collaborator

@nekodex nekodex commented Apr 3, 2018

The supporter page might end up being merged with the store/purchase page later, but for the time being the status can go here.

fixes #2782, fixes #2027

@MegaApplePi
Copy link
Contributor

MegaApplePi commented Apr 3, 2018

also resolves #2027 ...? #2782 was a duplicate

@@ -54,8 +54,54 @@
</div>

<div class="osu-page osu-page--small osu-page--stg-block">
@if (!empty($supporterStatus))
<!-- supporter status -->
<div class="stg-status{{ $supporterStatus['current'] ? ' stg-status--active' : '' }} stg-block__top">

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

<!-- why support -->
<div class="stg-block">
<div class="stg-block{{ empty($supporterStatus) ? ' stg-block__top' : ''}}">

This comment was marked as off-topic.

</div>
<div class="stg-status__text">
{!! trans('community.support.supporter_status.contribution', [
'dollars' => "<strong>\${$supporterStatus['dollars']}</strong>",

This comment was marked as off-topic.

@if ($supporterStatus['giftedTags'] > 0)
<div class="stg-status__text">
{!! trans('community.support.supporter_status.gifted', [
'giftedDollars' => "<strong>\${$supporterStatus['giftedDollars']}</strong>",

This comment was marked as off-topic.

background: @link-gray-light;
opacity: 0.5;
overflow: hidden;
-webkit-mask-image: -webkit-radial-gradient(white, black); // this fixes child content overflowing beyond a parent's rounded corners in safari

This comment was marked as off-topic.

// gifted
$gifted = $tagPurchases->where('target_user_id', '<>', $user->user_id);
$giftedDollars = $gifted->sum('amount');
$canceledGifts = $gifted->sum('cancel') * 2; // 1 for purchase transaction and 1 for cancel transaction

This comment was marked as off-topic.

$current = $expiration !== null ? $expiration->isFuture() : false;

// purchased
$tagPurchases = $user->supporterTagPurchases()->get();

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

This comment was marked as off-topic.

@nanaya nanaya merged commit ab09672 into ppy:master Apr 11, 2018
@nekodex nekodex deleted the supporter-status branch June 21, 2019 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants