Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

improve auth flow

Ammar Ahmed79eb9cb7da5b
diff --git a/apps/mobile/src/components/auth/authmodal.js b/apps/mobile/src/components/auth/authmodal.js
index 082d38604..959df60ea 100644
--- a/apps/mobile/src/components/auth/authmodal.js
+++ b/apps/mobile/src/components/auth/authmodal.js
@@ -2,9 +2,11 @@ import React, { useEffect, useRef, useState } from 'react';
import { eSubscribeEvent, eUnSubscribeEvent } from '../../services/event-manager';
import { useThemeStore } from '../../stores/use-theme-store';
import { eCloseLoginDialog, eOpenLoginDialog } from '../../utils/events';
+import { SIZE } from '../../utils/size';
import { sleep } from '../../utils/time';
import BaseDialog from '../dialog/base-dialog';
import { Toast } from '../toast';
+import { Button } from '../ui/button';
import { IconButton } from '../ui/icon-button';
import { hideAuth, initialAuthMode } from './common';
import { Login } from './login';
@@ -88,6 +90,31 @@ const AuthModal = () => {
/>
)}
+ {initialAuthMode.current !== AuthMode.welcomeSignup ? null : (
+ <Button
+ title="Skip"
+ onPress={() => {
+ hideAuth();
+ }}
+ iconSize={20}
+ type="gray"
+ iconPosition="right"
+ icon="chevron-right"
+ height={25}
+ iconStyle={{
+ marginTop: 2
+ }}
+ style={{
+ position: 'absolute',
+ zIndex: 999,
+ right: 12,
+ top: 0,
+ marginTop: 12.5,
+ paddingHorizontal: 6
+ }}
+ />
+ )}
+
<Toast context="local" />
</BaseDialog>
);
diff --git a/apps/mobile/src/components/auth/login.js b/apps/mobile/src/components/auth/login.js
index a5789cf5f..b081e7d91 100644
--- a/apps/mobile/src/components/auth/login.js
+++ b/apps/mobile/src/components/auth/login.js
@@ -267,21 +267,6 @@ export const Login = ({ changeMode, welcome }) => {
type="accent"
title={loading ? null : 'Login to your account'}
/>
-
- {loading || !welcome ? null : (
- <Button
- style={{
- marginTop: 10,
- width: 250,
- borderRadius: 100
- }}
- onPress={() => {
- hideAuth();
- }}
- type="grayBg"
- title="Skip for now"
- />
- )}
</View>
</View>
</Animated.View>
diff --git a/apps/mobile/src/components/auth/signup.js b/apps/mobile/src/components/auth/signup.js
index eb9e4a0df..65f554862 100644
--- a/apps/mobile/src/components/auth/signup.js
+++ b/apps/mobile/src/components/auth/signup.js
@@ -220,21 +220,6 @@ export const Signup = ({ changeMode, welcome, trial }) => {
type="accent"
title={loading ? null : 'Agree and continue'}
/>
-
- {loading || !welcome ? null : (
- <Button
- style={{
- marginTop: 10,
- width: 250,
- borderRadius: 100
- }}
- onPress={() => {
- hideAuth();
- }}
- type="grayBg"
- title="Skip for now"
- />
- )}
</View>
<Paragraph