1
0
mirror of https://github.com/beestat/app.git synced 2025-07-09 03:04:07 -04:00

Removed Stripe "Manage Support" button unless you have at least one stripe_event

This commit is contained in:
Jon Ziebell 2022-11-14 19:41:30 -05:00
parent 19010d6925
commit a8dd057c2f

View File

@ -61,9 +61,6 @@ beestat.component.card.contribute_status.prototype.decorate_direct_ = function(p
const status_tile = new beestat.component.tile() const status_tile = new beestat.component.tile()
.set_shadow(false); .set_shadow(false);
const button_container = document.createElement('div');
container.appendChild(button_container);
if (beestat.user.stripe_is_active() === true) { if (beestat.user.stripe_is_active() === true) {
status_tile status_tile
.set_icon('check') .set_icon('check')
@ -77,6 +74,11 @@ beestat.component.card.contribute_status.prototype.decorate_direct_ = function(p
} }
status_tile.render($(status_container)); status_tile.render($(status_container));
// If you have at least one Stripe event, show the Manage Support button.
if (Object.keys(beestat.cache.stripe_event).length > 0) {
const button_container = document.createElement('div');
container.appendChild(button_container);
const manage_tile = new beestat.component.tile() const manage_tile = new beestat.component.tile()
.set_text('Manage Support') .set_text('Manage Support')
.set_icon('credit_card_settings') .set_icon('credit_card_settings')
@ -91,6 +93,7 @@ beestat.component.card.contribute_status.prototype.decorate_direct_ = function(p
); );
}); });
manage_tile.render($(button_container)); manage_tile.render($(button_container));
}
}; };
/** /**