Removed all patreon based restrictions
This commit is contained in:
@@ -62,28 +62,6 @@
|
||||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
Patreon
|
||||
</td>
|
||||
{{#if patreon.accessToken}}
|
||||
<td>
|
||||
{{tier}} tier
|
||||
</td>
|
||||
<td>
|
||||
<paper-icon-button icon="refresh" class="refreshPatreon">
|
||||
</paper-icon-button>
|
||||
</td>
|
||||
{{else}}
|
||||
<td>
|
||||
<a href="{{patreonLoginUrl}}">
|
||||
<paper-button raised class="connectPatreon">
|
||||
Connect Patreon account
|
||||
</paper-button>
|
||||
</a>
|
||||
</td>
|
||||
{{/if}}
|
||||
</tr>
|
||||
</table>
|
||||
<div style="max-width: 250px">
|
||||
{{> atForm state="signIn"}}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
Template.profile.onCreated(function(){
|
||||
this.showApiKey = new ReactiveVar(false);
|
||||
this.loadingPatreon = new ReactiveVar(false);
|
||||
});
|
||||
|
||||
Template.profile.helpers({
|
||||
@@ -13,26 +12,6 @@ Template.profile.helpers({
|
||||
showApiKey: function(){
|
||||
return Template.instance().showApiKey.get();
|
||||
},
|
||||
patreon: function(){
|
||||
let user = Meteor.user();
|
||||
return user && user.patreon || {};
|
||||
},
|
||||
tier: function(){
|
||||
let user = Meteor.user();
|
||||
if (!user) return;
|
||||
patreon = user.patreon;
|
||||
if (!patreon) return;
|
||||
let entitledCents = patreon.entitledCents || 0;
|
||||
if (Template.instance().loadingPatreon.get()){
|
||||
return "loading..."
|
||||
} else if (patreon.entitledCentsOverride > entitledCents){
|
||||
return `$ ${(patreon.entitledCentsOverride / 100).toFixed(0)} (overridden)`;
|
||||
} else if (patreon.entitledCents === undefined){
|
||||
return "?";
|
||||
} else {
|
||||
return "$" + (patreon.entitledCents / 100).toFixed(0);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
Template.profile.events({
|
||||
@@ -60,10 +39,4 @@ Template.profile.events({
|
||||
Meteor.call("generateMyApiKey");
|
||||
instance.showApiKey.set(true);
|
||||
},
|
||||
"click .refreshPatreon": function(event, instance){
|
||||
instance.loadingPatreon.set(true);
|
||||
Meteor.call("updateMyPatreonDetails", (error) => {
|
||||
instance.loadingPatreon.set(false);
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user