mirror of
https://github.com/chinchang/web-maker.git
synced 2025-06-12 12:40:53 +02:00
open up accounts to chrome extension too 🚀
This commit is contained in:
@ -23,10 +23,12 @@ function login(providerName) {
|
|||||||
window.db.local.set({ lastAuthProvider: providerName });
|
window.db.local.set({ lastAuthProvider: providerName });
|
||||||
})
|
})
|
||||||
.catch(function(error) {
|
.catch(function(error) {
|
||||||
alert(
|
|
||||||
'You have already signed up with the same email using different social login'
|
|
||||||
);
|
|
||||||
utils.log(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'
|
||||||
|
);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
window.login = login;
|
window.login = login;
|
||||||
|
@ -98,7 +98,7 @@
|
|||||||
</svg>
|
</svg>
|
||||||
Open
|
Open
|
||||||
</a>
|
</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
|
Login/Signup
|
||||||
</a>
|
</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">
|
<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">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"permissions": ["storage", "tabs", "<all_urls>"],
|
"permissions": ["storage", "tabs", "<all_urls>"],
|
||||||
"optional_permissions": ["downloads"],
|
"optional_permissions": ["downloads"],
|
||||||
"content_security_policy":
|
"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": {
|
"options_ui": {
|
||||||
"page": "options.html",
|
"page": "options.html",
|
||||||
"chrome_style": true
|
"chrome_style": true
|
||||||
|
@ -518,7 +518,7 @@ loginModal, profileModal, profileAvatarImg, profileUserName, openItemsBtn
|
|||||||
*/
|
*/
|
||||||
async function fetchItems(shouldSaveGlobally) {
|
async function fetchItems(shouldSaveGlobally) {
|
||||||
var d = deferred();
|
var d = deferred();
|
||||||
savedItems = savedItems || {};
|
savedItems = {};
|
||||||
var items = [];
|
var items = [];
|
||||||
if (window.user) {
|
if (window.user) {
|
||||||
items = await itemService.getAllItems();
|
items = await itemService.getAllItems();
|
||||||
|
Reference in New Issue
Block a user