mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 11:47:54 +01:00
improve auth flow
This commit is contained in:
@@ -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>
|
||||
);
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user