1
0
mirror of https://github.com/chinchang/web-maker.git synced 2025-06-10 03:35:16 +02:00

open up accounts to chrome extension too 🚀

This commit is contained in:
Kushagra Gour 2018-03-11 23:51:10 +05:30
parent 5ff7360f6f
commit 8ac1e82160
4 changed files with 8 additions and 6 deletions

View File

@ -23,10 +23,12 @@ function login(providerName) {
window.db.local.set({ lastAuthProvider: providerName });
})
.catch(function(error) {
utils.log(error);
if (error.code === 'auth/account-exists-with-different-credential') {
alert(
'You have already signed up with the same email using different social login'
);
utils.log(error);
}
});
}
window.login = login;

View File

@ -98,7 +98,7 @@
</svg>
Open
</a>
<a d-open-modal="loginModal" data-event-category="ui" data-event-action="loginButtonClick" class="show-when-app hide-on-login flex flex-v-center hint--rounded hint--bottom-left" aria-label="Login/Signup">
<a d-open-modal="loginModal" data-event-category="ui" data-event-action="loginButtonClick" class="hide-on-login flex flex-v-center hint--rounded hint--bottom-left" aria-label="Login/Signup">
Login/Signup
</a>
<a d-open-modal="profileModal" data-event-category="ui" data-event-action="headerAvatarClick" aria-label="See profile or Logout" class="hide-on-logout hint--rounded hint--bottom-left">

View File

@ -7,7 +7,7 @@
"permissions": ["storage", "tabs", "<all_urls>"],
"optional_permissions": ["downloads"],
"content_security_policy":
"script-src 'self' filesystem: http://localhost:* https://localhost:* https://ajax.googleapis.com https://code.jquery.com https://cdnjs.cloudflare.com https://unpkg.com https://maxcdn.com https://cdn77.com https://maxcdn.bootstrapcdn.com https://cdn.jsdelivr.net/ https://*.stripe.com/ https://builds.framerjs.com/ https://rawgit.com https://wzrd.in https://www.gstatic.com https://semantic-ui.com https://www.google-analytics.com 'unsafe-eval'; object-src 'self'",
"script-src 'self' filesystem: http://localhost:* https://localhost:* https://apis.google.com https://ajax.googleapis.com https://code.jquery.com https://cdnjs.cloudflare.com https://unpkg.com https://maxcdn.com https://cdn77.com https://maxcdn.bootstrapcdn.com https://cdn.jsdelivr.net/ https://*.stripe.com/ https://builds.framerjs.com/ https://rawgit.com https://wzrd.in https://www.gstatic.com https://semantic-ui.com https://www.google-analytics.com 'unsafe-eval'; object-src 'self'",
"options_ui": {
"page": "options.html",
"chrome_style": true

View File

@ -518,7 +518,7 @@ loginModal, profileModal, profileAvatarImg, profileUserName, openItemsBtn
*/
async function fetchItems(shouldSaveGlobally) {
var d = deferred();
savedItems = savedItems || {};
savedItems = {};
var items = [];
if (window.user) {
items = await itemService.getAllItems();