-
-
Notifications
You must be signed in to change notification settings - Fork 446
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(preferences): not logged in segment (#649)
* feat(preferences): not logged in segment * Update app/assets/javascripts/preferences/panes/account/Authentication.tsx Co-authored-by: Mo Bitar <[email protected]> * Update app/assets/javascripts/preferences/panes/account/Authentication.tsx Co-authored-by: Mo Bitar <[email protected]> Co-authored-by: Mo Bitar <[email protected]>
- Loading branch information
Showing
9 changed files
with
74 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
app/assets/javascripts/preferences/panes/account/Authentication.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { Button } from "@/components/Button"; | ||
import { PreferencesGroup, PreferencesSegment, Subtitle, Text, Title } from "@/preferences/components"; | ||
import { WebApplication } from "@/ui_models/application"; | ||
import { AppState } from "@/ui_models/app_state"; | ||
import { observer } from "mobx-react-lite"; | ||
import { FunctionComponent } from "preact"; | ||
|
||
export const Authentication: FunctionComponent<{ application: WebApplication, appState: AppState }> = | ||
observer(({ appState }) => { | ||
|
||
const clickSignIn = () => { | ||
appState.preferences.closePreferences(); | ||
appState.accountMenu.setShowLogin(true); | ||
appState.accountMenu.setShow(true); | ||
}; | ||
|
||
const clickRegister = () => { | ||
appState.preferences.closePreferences(); | ||
appState.accountMenu.setShowRegister(true); | ||
appState.accountMenu.setShow(true); | ||
}; | ||
|
||
return ( | ||
<PreferencesGroup> | ||
<PreferencesSegment> | ||
<div className="flex flex-col items-center px-12"> | ||
<Title>You're not signed in</Title> | ||
<Subtitle className="text-center">Sign in to sync your notes and preferences across all your devices and enable end-to-end encryption.</Subtitle> | ||
<div className="min-h-3" /> | ||
<div className="flex flex-row w-full"> | ||
<Button type="primary" onClick={clickSignIn} label="Sign in" className="flex-grow" /> | ||
<div className="min-w-3" /> | ||
<Button type="primary" onClick={clickRegister} label="Register" className="flex-grow" /> | ||
</div> | ||
<div className="min-h-3" /> | ||
<Text className="text-center">Standard Notes is free on every platform, and comes standard with sync and encryption.</Text> | ||
</div> | ||
</PreferencesSegment> | ||
</PreferencesGroup> | ||
); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters