mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-18 07:07:35 +01:00
fix(sharing): Needed return object
This commit is contained in:
@@ -33,9 +33,6 @@ function($scope, $rootScope, User, $http, Notification, ApiUrl, Social) {
|
|||||||
// Stripe
|
// Stripe
|
||||||
$.getScript('//checkout.stripe.com/v2/checkout.js');
|
$.getScript('//checkout.stripe.com/v2/checkout.js');
|
||||||
|
|
||||||
// Social sharing buttons
|
|
||||||
loadWidgets();
|
|
||||||
|
|
||||||
/* Google Content Experiments
|
/* Google Content Experiments
|
||||||
if (window.env.NODE_ENV === 'production') {
|
if (window.env.NODE_ENV === 'production') {
|
||||||
$.getScript('//www.google-analytics.com/cx/api.js?experiment=boVO4eEyRfysNE5D53nCMQ', function(){
|
$.getScript('//www.google-analytics.com/cx/api.js?experiment=boVO4eEyRfysNE5D53nCMQ', function(){
|
||||||
|
|||||||
@@ -25,5 +25,9 @@
|
|||||||
// Twitter
|
// Twitter
|
||||||
$.getScript('https://platform.twitter.com/widgets.js');
|
$.getScript('https://platform.twitter.com/widgets.js');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
loadWidgets: loadWidgets
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}());
|
}());
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ footer.footer(ng-controller='FooterCtrl')
|
|||||||
.col-sm-3
|
.col-sm-3
|
||||||
if (env.NODE_ENV === 'production' && !env.IS_MOBILE)
|
if (env.NODE_ENV === 'production' && !env.IS_MOBILE)
|
||||||
h4=env.t('footerSocial')
|
h4=env.t('footerSocial')
|
||||||
.addthis_toolbox.addthis_default_style(addthis:url='https://habitica.com', addthis:title=env.t('socialTitle'))
|
.addthis_toolbox.addthis_default_style(addthis:url='https://habitica.com', addthis:title=env.t('socialTitle'), ng-init='loadWidgets()')
|
||||||
table
|
table
|
||||||
tr
|
tr
|
||||||
td
|
td
|
||||||
|
|||||||
@@ -1,22 +1,28 @@
|
|||||||
include ../avatar/generated_avatar
|
include ../avatar/generated_avatar
|
||||||
|
|
||||||
script(type='text/ng-template', id='modals/levelUp.html')
|
script(type='text/ng-template', id='modals/levelUp.html')
|
||||||
|
div(id='fb-root')
|
||||||
.modal-content(style='min-width:28em')
|
.modal-content(style='min-width:28em')
|
||||||
.modal-body.text-center
|
.modal-body.text-center
|
||||||
h3(style='margin-bottom: 0')=env.t('gainedLevel')
|
h3(style='margin-bottom: 0')=env.t('gainedLevel')
|
||||||
.container-fluid
|
.container-fluid
|
||||||
.row
|
.row
|
||||||
.herobox(style='margin:auto 8.2em; width: 6em; height: 9em; padding-top: 0')
|
.herobox(style='margin:auto 8.3em; width: 6em; height: 9em; padding-top: 0')
|
||||||
.character-sprites(style='margin: 0; width: 0')
|
.character-sprites(style='margin: 0; width: 0')
|
||||||
+generatedAvatar
|
+generatedAvatar
|
||||||
.row
|
.row
|
||||||
.herobox(style='margin:auto 8.6em; width: 6em; height: 0; padding-top: 0')
|
.herobox(style='margin:auto 8.9em; width: 6em; height: 0; padding-top: 0')
|
||||||
.avatar-level(ng-class='userLevelStyle(user)')=env.t('level')+' {{user.stats.lvl}}'
|
.avatar-level(ng-class='userLevelStyle(user)')=env.t('level')+' {{user.stats.lvl}}'
|
||||||
h4(style='margin-top: 1em')!=env.t('leveledUp', {level:'{{user.stats.lvl}}'})
|
h4(style='margin-top: 1em')!=env.t('leveledUp', {level:'{{user.stats.lvl}}'})
|
||||||
p=env.t('fullyHealed')
|
p=env.t('fullyHealed')
|
||||||
br
|
br
|
||||||
button.btn.btn-primary(ng-click='$close()')=env.t('huzzah')
|
button.btn.btn-primary(ng-click='$close()')=env.t('huzzah')
|
||||||
.modal-footer(style='margin-top:0', ng-init='loadWidgets()')
|
.modal-footer(style='margin-top:0', ng-init='loadWidgets()')
|
||||||
a.twitter-share-button(href='https://twitter.com/intent/tweet?text=I+got+to+Level+{{::user.stats.lvl}}+in+Habitica+by+improving+my+real-life+habits!&via=habitica&url=https://habitrpg-gamma.herokuapp.com/social/level-up&count=none')=env.t('tweet')
|
.container-fluid
|
||||||
.fb-share-button(data-href='https://habitrpg-gamma.herokuapp.com/social/level-up', data-layout='button')
|
.row
|
||||||
a.tumblr-share-button(data-href='https://habitrpg-gamma.herokuapp.com/social/level-up', data-notes='none')
|
.col-xs-4
|
||||||
|
a.twitter-share-button(href='https://twitter.com/intent/tweet?text=I+got+to+Level+{{::user.stats.lvl}}+in+Habitica+by+improving+my+real-life+habits!&via=habitica&url=https://habitrpg-gamma.herokuapp.com/social/level-up&count=none')=env.t('tweet')
|
||||||
|
.col-xs-4
|
||||||
|
.fb-share-button(data-href='https://habitrpg-gamma.herokuapp.com/social/level-up', data-layout='button')
|
||||||
|
.col-xs-4
|
||||||
|
a.tumblr-share-button(data-href='https://habitrpg-gamma.herokuapp.com/social/level-up', data-notes='none')
|
||||||
|
|||||||
Reference in New Issue
Block a user