Skip to content

Commit

Permalink
Merge pull request #791 from eddieferrer/change_login_facebook_button
Browse files Browse the repository at this point in the history
feat: link fb login button to migrate page, remove facebook code and …
  • Loading branch information
eddieferrer authored Apr 26, 2024
2 parents 5bd04c2 + fbee8a0 commit cad8962
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 82 deletions.
2 changes: 1 addition & 1 deletion frontend/components/HomeCards.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
<h4>Register for an account. Its completely free.</h4>
<p>
We wont spam you. We wont sell your information. All you need is
an email address, or log in with your Facebook account.
an email address.
</p>
</div>
</div>
Expand Down
11 changes: 2 additions & 9 deletions frontend/components/LoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,12 @@
<p class="has-text-grey">
<em>Using your Facebook account</em>
</p>
<a
:disabled="isFormSubmitting"
class="button is-normal is-info"
@click="
openFbLoginDialog('login', redirect);
isFormSubmitting = true;
"
>
<NuxtLink to="/migrate_facebook" class="button is-info is-normal">
<span id="fbicon" class="icon is-medium">
<img src="/images/icons/facebook32.png" alt />
</span>
<span>Log in using Facebook</span>
</a>
</NuxtLink>
<hr />
<p class="has-text-grey">
<em>Using your SizeSquirrel username and password</em>
Expand Down
18 changes: 0 additions & 18 deletions frontend/components/RegistrationForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,6 @@
<p class="is-size-6">
Register an account for all SizeSquirrel features.
</p>

<!-- <p class="has-text-grey">
<em>Create an account using Facebook.</em>
</p>
<a
class="button is-normal is-info"
:disabled="isFormSubmitting"
@click="
openFbLoginDialog('register');
isFormSubmitting = true;
"
>
<span id="fbicon" class="icon is-medium">
<img src="/images/icons/facebook32.png" alt />
</span>
<span>Register using your Facebook account</span>
</a>
<hr /> -->
<p class="has-text-grey">
<em>Create an account with SizeSquirrel.</em>
</p>
Expand Down
1 change: 0 additions & 1 deletion frontend/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ const config = {
href: `https://sizesquirrel.com`,
},
],
script: [{ src: '/js/fb-sdk.js', body: true }],
},

// Global CSS (https://go.nuxtjs.dev/config-css)
Expand Down
24 changes: 0 additions & 24 deletions frontend/plugins/mixins.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,30 +46,6 @@ if (!Vue.__my_mixin__) {
return undefined;
}
},
openFbLoginDialog(formType, redirect) {
if (process.browser) {
// prod appId
let appId = '943851385727348';
let protocol = 'https';
let port = '';
if (window.location.hostname === 'localhost') {
// dev appId
protocol = 'http';
port = ':3000';
appId = '944781472301006';
}
const redirecturi = `${protocol}://${window.location.hostname}${port}/facebookcallback_${formType}/`;
const stateParams = {
redirect,
time: new Date().getTime(), // Not currently used
};

const facebookURL = `https://www.facebook.com/v5.0/dialog/oauth?client_id=${appId}&redirect_uri=${redirecturi}&response_type=token&scope=email&state=${JSON.stringify(
stateParams
)}`;
window.location.href = facebookURL;
}
},
},
});
}
2 changes: 1 addition & 1 deletion frontend/static/emails/email_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@
<td class="mcnImageContent" valign="top" style="padding-right: 9px;padding-left: 9px;padding-top: 0;padding-bottom: 0;text-align: center;mso-line-height-rule: exactly;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">


<img align="center" alt="" src="https://gallery.mailchimp.com/30d23e31cf450b25ae487465f/images/fb64d583-6149-47a8-8797-a2b5ab80d9c8.png" width="338" style="max-width: 338px;padding-bottom: 0;display: inline !important;vertical-align: bottom;border: 0;height: auto;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;" class="mcnImage">
<img align="center" alt="" src="https://sizesquirrel.com/images/SizeSquirrelLogoSmall.png" width="338" style="max-width: 338px;padding-bottom: 0;display: inline !important;vertical-align: bottom;border: 0;height: auto;outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;" class="mcnImage">


</td>
Expand Down
28 changes: 0 additions & 28 deletions frontend/static/js/fb-sdk.js

This file was deleted.

0 comments on commit cad8962

Please sign in to comment.