diff --git a/app/assets/javascripts/app.ts b/app/assets/javascripts/app.ts index 38fd702e3..dd90872ca 100644 --- a/app/assets/javascripts/app.ts +++ b/app/assets/javascripts/app.ts @@ -34,7 +34,6 @@ import { } from './directives/functional'; import { - AccountMenu, ActionsMenu, ComponentModal, ComponentView, @@ -59,7 +58,7 @@ import { SessionsModalDirective } from './components/SessionsModal'; import { NoAccountWarningDirective } from './components/NoAccountWarning'; import { NoProtectionsdNoteWarningDirective } from './components/NoProtectionsNoteWarning'; import { SearchOptionsDirective } from './components/SearchOptions'; -import { AccountMenuReact } from './components/AccountMenuReact'; +import { AccountMenuDirective } from './components/AccountMenu'; import { ConfirmSignoutDirective } from './components/ConfirmSignoutModal'; import { MultipleSelectedNotesDirective } from './components/MultipleSelectedNotes'; import { NotesContextMenuDirective } from './components/NotesContextMenu'; @@ -137,7 +136,6 @@ const startApplication: StartApplication = async function startApplication( // Directives - Views angular .module('app') - .directive('accountMenu', () => new AccountMenu()) .directive('accountSwitcher', () => new AccountSwitcher()) .directive('actionsMenu', () => new ActionsMenu()) .directive('challengeModal', () => new ChallengeModal()) @@ -153,7 +151,7 @@ const startApplication: StartApplication = async function startApplication( .directive('historyMenu', () => new HistoryMenu()) .directive('syncResolutionMenu', () => new SyncResolutionMenu()) .directive('sessionsModal', SessionsModalDirective) - .directive('accountMenuReact', AccountMenuReact) + .directive('accountMenu', AccountMenuDirective) .directive('noAccountWarning', NoAccountWarningDirective) .directive('protectedNotePanel', NoProtectionsdNoteWarningDirective) .directive('searchOptions', SearchOptionsDirective) diff --git a/app/assets/javascripts/components/AccountMenuReact.tsx b/app/assets/javascripts/components/AccountMenu.tsx similarity index 53% rename from app/assets/javascripts/components/AccountMenuReact.tsx rename to app/assets/javascripts/components/AccountMenu.tsx index fa4537d6d..a7ff97322 100644 --- a/app/assets/javascripts/components/AccountMenuReact.tsx +++ b/app/assets/javascripts/components/AccountMenu.tsx @@ -32,6 +32,7 @@ import TargetedKeyboardEvent = JSXInternal.TargetedKeyboardEvent; import TargetedMouseEvent = JSXInternal.TargetedMouseEvent; import { alertDialog, confirmDialog } from '@Services/alertService'; import { RefObject } from 'react'; +import { ConfirmSignoutContainer } from '@/components/ConfirmSignoutModal'; type Props = { appState: AppState; @@ -367,7 +368,7 @@ const AccountMenu = observer(({ application, appState, closeAccountMenu }: Props }; const signOut = () => { - appState.accountMenuReact.setSigningOut(true); + appState.accountMenu.setSigningOut(true); }; const changePasscodePressed = () => { @@ -526,118 +527,109 @@ const AccountMenu = observer(({ application, appState, closeAccountMenu }: Props }, [refreshEncryptionStatus]); return ( -
-
-
-
-
Account
- Close -
-
- {!user && !showLogin && !showRegister && ( -
-
-
Sign in or register to enable sync and end-to-end encryption.
-
-
- - -
-
- Standard Notes is free on every platform, and comes - standard with sync and encryption. -
+
+
+
+
Account
+ Close +
+
+ {!user && !showLogin && !showRegister && ( +
+
+
Sign in or register to enable sync and end-to-end encryption.
- )} - {(showLogin || showRegister) && ( -
-
- {showLogin ? 'Sign In' : 'Register'} +
+ + +
+
+ Standard Notes is free on every platform, and comes + standard with sync and encryption. +
+
+ )} + {(showLogin || showRegister) && ( +
+
+ {showLogin ? 'Sign In' : 'Register'} +
+
+
+ + + {showRegister && + } + - -
- - - {showRegister && - } - - {showAdvanced && ( -
-
-
- Advanced Options -
-
- - -
- {showLogin && ( -