mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-20 21:49:32 +01:00
fix button position on tablet
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
import React, { useEffect, useRef, useState } from 'react';
|
import React, {useEffect, useRef, useState} from 'react';
|
||||||
import { Appearance, Platform, SafeAreaView, View } from 'react-native';
|
import {Appearance, Platform, SafeAreaView, View} from 'react-native';
|
||||||
import Animated, { Easing } from 'react-native-reanimated';
|
import Animated, {Easing} from 'react-native-reanimated';
|
||||||
import AnimatedProgress from 'react-native-reanimated-progress-bar';
|
import AnimatedProgress from 'react-native-reanimated-progress-bar';
|
||||||
import { useTracked } from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import {
|
import {
|
||||||
useFavoriteStore,
|
useFavoriteStore,
|
||||||
useNoteStore,
|
useNoteStore,
|
||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
} from '../../provider/stores';
|
} from '../../provider/stores';
|
||||||
import Backup from '../../services/Backup';
|
import Backup from '../../services/Backup';
|
||||||
import BiometricService from '../../services/BiometricService';
|
import BiometricService from '../../services/BiometricService';
|
||||||
import { DDS } from '../../services/DeviceDetection';
|
import {DDS} from '../../services/DeviceDetection';
|
||||||
import {
|
import {
|
||||||
eSendEvent,
|
eSendEvent,
|
||||||
eSubscribeEvent,
|
eSubscribeEvent,
|
||||||
@@ -20,18 +20,16 @@ import {
|
|||||||
ToastEvent
|
ToastEvent
|
||||||
} from '../../services/EventManager';
|
} from '../../services/EventManager';
|
||||||
import PremiumService from '../../services/PremiumService';
|
import PremiumService from '../../services/PremiumService';
|
||||||
import { editing } from '../../utils';
|
import {editing} from '../../utils';
|
||||||
import { COLOR_SCHEME_DARK } from '../../utils/Colors';
|
import {COLOR_SCHEME_DARK} from '../../utils/Colors';
|
||||||
import { db } from '../../utils/database';
|
import {db} from '../../utils/database';
|
||||||
import {
|
import {eOpenLoginDialog, eOpenRateDialog} from '../../utils/Events';
|
||||||
eOpenLoginDialog, eOpenRateDialog
|
import {MMKV} from '../../utils/mmkv';
|
||||||
} from '../../utils/Events';
|
import {tabBarRef} from '../../utils/Refs';
|
||||||
import { MMKV } from '../../utils/mmkv';
|
import {SIZE} from '../../utils/SizeUtils';
|
||||||
import { tabBarRef } from '../../utils/Refs';
|
import {sleep} from '../../utils/TimeUtils';
|
||||||
import { SIZE } from '../../utils/SizeUtils';
|
import {SettingsBackupAndRestore} from '../../views/Settings';
|
||||||
import { sleep } from '../../utils/TimeUtils';
|
import {Button} from '../Button';
|
||||||
import { SettingsBackupAndRestore } from '../../views/Settings';
|
|
||||||
import { Button } from '../Button';
|
|
||||||
import Input from '../Input';
|
import Input from '../Input';
|
||||||
import Seperator from '../Seperator';
|
import Seperator from '../Seperator';
|
||||||
import SplashScreen from '../SplashScreen';
|
import SplashScreen from '../SplashScreen';
|
||||||
@@ -52,6 +50,7 @@ const AppLoader = ({onLoad}) => {
|
|||||||
const user = useUserStore(state => state.user);
|
const user = useUserStore(state => state.user);
|
||||||
const verifyUser = useUserStore(state => state.verifyUser);
|
const verifyUser = useUserStore(state => state.verifyUser);
|
||||||
const setVerifyUser = useUserStore(state => state.setVerifyUser);
|
const setVerifyUser = useUserStore(state => state.setVerifyUser);
|
||||||
|
const deviceMode = useSettingStore(state => state.deviceMode);
|
||||||
const pwdInput = useRef();
|
const pwdInput = useRef();
|
||||||
|
|
||||||
const load = async value => {
|
const load = async value => {
|
||||||
@@ -234,17 +233,31 @@ const AppLoader = ({onLoad}) => {
|
|||||||
style={{
|
style={{
|
||||||
flex: 1,
|
flex: 1,
|
||||||
justifyContent: 'center',
|
justifyContent: 'center',
|
||||||
width: Platform.OS == 'ios' ? '95%' : '100%',
|
width:
|
||||||
|
deviceMode !== 'mobile'
|
||||||
|
? '50%'
|
||||||
|
: Platform.OS == 'ios'
|
||||||
|
? '95%'
|
||||||
|
: '100%',
|
||||||
paddingHorizontal: 12
|
paddingHorizontal: 12
|
||||||
}}>
|
}}>
|
||||||
<Heading>Verify your identity</Heading>
|
<Heading
|
||||||
|
style={{
|
||||||
|
alignSelf: 'center'
|
||||||
|
}}>
|
||||||
|
Verify your identity
|
||||||
|
</Heading>
|
||||||
|
|
||||||
{user ? (
|
{user ? (
|
||||||
<>
|
<>
|
||||||
<Paragraph>
|
<Paragraph
|
||||||
|
style={{
|
||||||
|
alignSelf: 'center'
|
||||||
|
}}>
|
||||||
To keep your notes secure, please enter password of the
|
To keep your notes secure, please enter password of the
|
||||||
account you are logged in to.
|
account you are logged in to.
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
<Seperator half />
|
<Seperator />
|
||||||
<Input
|
<Input
|
||||||
fwdRef={pwdInput}
|
fwdRef={pwdInput}
|
||||||
secureTextEntry
|
secureTextEntry
|
||||||
@@ -252,6 +265,7 @@ const AppLoader = ({onLoad}) => {
|
|||||||
onChangeText={v => (passwordValue = v)}
|
onChangeText={v => (passwordValue = v)}
|
||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
/>
|
/>
|
||||||
|
<Seperator half />
|
||||||
<Button
|
<Button
|
||||||
title="Unlock"
|
title="Unlock"
|
||||||
type="accent"
|
type="accent"
|
||||||
@@ -264,7 +278,10 @@ const AppLoader = ({onLoad}) => {
|
|||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<Paragraph>
|
<Paragraph
|
||||||
|
style={{
|
||||||
|
alignSelf: 'center'
|
||||||
|
}}>
|
||||||
To keep your notes secure, please unlock app the with
|
To keep your notes secure, please unlock app the with
|
||||||
biometrics.
|
biometrics.
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
|
|||||||
Reference in New Issue
Block a user