Can now link google account
This commit is contained in:
@@ -77,6 +77,10 @@ const userSchema = new SimpleSchema({
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
},
|
||||
profile: {
|
||||
type: Object,
|
||||
blackbox: true,
|
||||
},
|
||||
});
|
||||
|
||||
Meteor.users.attachSchema(userSchema);
|
||||
|
||||
@@ -9,9 +9,15 @@ Meteor.publish('user', function(){
|
||||
apiKey: 1,
|
||||
darkMode: 1,
|
||||
subscribedLibraries: 1,
|
||||
profile: 1,
|
||||
'services.patreon.id': 1,
|
||||
'services.patreon.entitledCents': 1,
|
||||
'services.patreon.entitledCentsOverride': 1,
|
||||
'services.google.id': 1,
|
||||
'services.google.picture': 1,
|
||||
'services.google.name': 1,
|
||||
'services.google.email': 1,
|
||||
'services.google.locale': 1,
|
||||
}}),
|
||||
Invites.find({
|
||||
$or: [
|
||||
|
||||
@@ -54,9 +54,20 @@
|
||||
Tier: {{ tier.name }}
|
||||
</v-list-tile-title>
|
||||
</v-list-tile>
|
||||
<v-list-tile v-if="!user.services.google">
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="linkWithGoogle"
|
||||
>
|
||||
Link Google Account
|
||||
</v-btn>
|
||||
</v-list-tile>
|
||||
<v-list-tile v-if="!user.services.patreon">
|
||||
<v-btn @click="linkWithPatreon">
|
||||
Link Patreon
|
||||
<v-btn
|
||||
color="primary"
|
||||
@click="linkWithPatreon"
|
||||
>
|
||||
Link Patreon Account
|
||||
</v-btn>
|
||||
</v-list-tile>
|
||||
</v-list>
|
||||
@@ -196,6 +207,11 @@
|
||||
data: {inviteId: invite._id},
|
||||
});
|
||||
},
|
||||
linkWithGoogle(){
|
||||
Meteor.linkWithGoogle(error => {
|
||||
if (error) console.error(error);
|
||||
});
|
||||
},
|
||||
linkWithPatreon,
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user