Skip to content

Commit

Permalink
fix: the following is done:
Browse files Browse the repository at this point in the history
- show cursor as pointer when hovering "Advanced Options"
- show error reporting identifier as bold text
- when closing account menu with opened "Sign in" form and then reopening account menu, don't show "Sign in" form
  • Loading branch information
vardan-arm committed Jun 24, 2021
1 parent 6ba3fbe commit e9406b6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ const Authentication = observer(({
<div className="sk-panel-row" />
<button
type="button"
className="sk-a info font-bold text-left p-0 hover:underline mr-1 ml-1"
className="sk-a info font-bold text-left p-0 cursor-pointer hover:underline mr-1 ml-1"
onClick={() => {
setShowAdvanced(!showAdvanced);
}}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ const ErrorReporting = observer(({ appState }: Props) => {
{errorReportingIdValue && (
<>
<p className="sk-p selectable">
Your random identifier is
strong {errorReportingIdValue}
Your random identifier is <span className="font-bold">{errorReportingIdValue}</span>
</p>
<p className="sk-p">
Disabling error reporting will remove that identifier from your
Expand Down
13 changes: 13 additions & 0 deletions app/assets/javascripts/components/AccountMenu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Protections from '@/components/AccountMenu/Protections';
import PasscodeLock from '@/components/AccountMenu/PasscodeLock';
import DataBackup from '@/components/AccountMenu/DataBackup';
import ErrorReporting from '@/components/AccountMenu/ErrorReporting';
import { useEffect } from 'preact/hooks';

type Props = {
appState: AppState;
Expand All @@ -19,13 +20,25 @@ type Props = {

const AccountMenu = observer(({ application, appState }: Props) => {
const {
show: showAccountMenu,
showLogin,
showRegister,
setShowLogin,
setShowRegister,
closeAccountMenu
} = appState.accountMenu;

const user = application.getUser();

useEffect(() => {
// Reset "Login" and "Registration" sections state when hiding account menu,
// so the next time account menu is opened these sections are closed
if (!showAccountMenu) {
setShowLogin(false);
setShowRegister(false);
}
}, [setShowLogin, setShowRegister, showAccountMenu]);

return (
<div className="sn-component">
<div id="account-panel" className="sk-panel">
Expand Down

0 comments on commit e9406b6

Please sign in to comment.