diff --git a/web/app/components/button/_kind/button_kind.scss b/web/app/components/button/_kind/button_kind.scss index ecd0a88e..32822926 100644 --- a/web/app/components/button/_kind/button_kind.scss +++ b/web/app/components/button/_kind/button_kind.scss @@ -14,6 +14,6 @@ color: #0aa; &:hover { - color: #06c5c5; + color: #06c5c5; } } diff --git a/web/app/components/dropdown/__item/dropdown__item.scss b/web/app/components/dropdown/__item/dropdown__item.scss index 87787660..2a82dd63 100644 --- a/web/app/components/dropdown/__item/dropdown__item.scss +++ b/web/app/components/dropdown/__item/dropdown__item.scss @@ -1,5 +1,6 @@ .dropdown__item { - a, button { + a, + button { display: block; width: 100%; text-align: left; diff --git a/web/app/components/dropdown/__items/dropdown__items.scss b/web/app/components/dropdown/__items/dropdown__items.scss index 8e2ca0cd..5007ffed 100644 --- a/web/app/components/dropdown/__items/dropdown__items.scss +++ b/web/app/components/dropdown/__items/dropdown__items.scss @@ -1,3 +1,3 @@ .dropdown__items { - padding: 5px 0; + padding: 5px 0; } diff --git a/web/app/components/root/root.jsx b/web/app/components/root/root.jsx index be5a4e16..93cee057 100644 --- a/web/app/components/root/root.jsx +++ b/web/app/components/root/root.jsx @@ -117,33 +117,57 @@ export default class Root extends Component { } onSignIn(provider) { - const newWindow = window.open( - `${BASE_URL}/auth/${provider}/login?from=${encodeURIComponent( - location.origin + location.pathname + '?selfClose' - )}&site=${siteId}` - ); + if (document.hasStorageAccess) { + // user's browser is safari and we need to request access + document + .hasStorageAccess() + .then(() => { + signIn(); + }) + .catch(() => { + // if there is an error it means that we don't have access + document + .requestStorageAccess() + .then(() => { + signIn(); + }) + .catch(() => { + alert(`We can't login you without access to your browser's storage.`); + }); + }); + } else { + signIn(); + } - let secondsPass = 0; - const checkMsDelay = 300; - const checkInterval = setInterval(() => { - let shouldProceed; - secondsPass += checkMsDelay; - try { - shouldProceed = newWindow.closed || secondsPass > 30000; - } catch (e) {} + function signIn() { + const newWindow = window.open( + `${BASE_URL}/auth/${provider}/login?from=${encodeURIComponent( + location.origin + location.pathname + '?selfClose' + )}&site=${siteId}` + ); - if (shouldProceed) { - clearInterval(checkInterval); + let secondsPass = 0; + const checkMsDelay = 300; + const checkInterval = setInterval(() => { + let shouldProceed; + secondsPass += checkMsDelay; + try { + shouldProceed = newWindow.closed || secondsPass > 30000; + } catch (e) {} - api - .getUser() - .then(user => { - store.set('user', user); - this.setState({ user }); - }) - .catch(() => {}); // TODO: we need to handle it and write error to user - } - }, checkMsDelay); + if (shouldProceed) { + clearInterval(checkInterval); + + api + .getUser() + .then(user => { + store.set('user', user); + this.setState({ user }); + }) + .catch(() => {}); // TODO: we need to handle it and write error to user + } + }, checkMsDelay); + } } onBlockedUsersShow() {