mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
align to center
This commit is contained in:
@@ -1,51 +1,53 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, {useEffect, useState} from 'react';
|
||||||
import {
|
import {
|
||||||
ActivityIndicator,
|
ActivityIndicator,
|
||||||
Clipboard,
|
Clipboard,
|
||||||
Dimensions, Keyboard, ScrollView, TouchableOpacity,
|
Dimensions,
|
||||||
View
|
InteractionManager,
|
||||||
|
Keyboard,
|
||||||
|
ScrollView,
|
||||||
|
TouchableOpacity,
|
||||||
|
View,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import Share from 'react-native-share';
|
import Share from 'react-native-share';
|
||||||
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
|
||||||
import { notesnook } from '../../../e2e/test.ids';
|
import {notesnook} from '../../../e2e/test.ids';
|
||||||
import { useTracked } from '../../provider';
|
import {useTracked} from '../../provider';
|
||||||
import { Actions } from '../../provider/Actions';
|
import {Actions} from '../../provider/Actions';
|
||||||
import { DDS } from '../../services/DeviceDetection';
|
import {DDS} from '../../services/DeviceDetection';
|
||||||
import {
|
import {
|
||||||
eSendEvent,
|
eSendEvent,
|
||||||
openVault,
|
openVault,
|
||||||
sendNoteEditedEvent,
|
sendNoteEditedEvent,
|
||||||
ToastEvent
|
ToastEvent,
|
||||||
} from '../../services/EventManager';
|
} from '../../services/EventManager';
|
||||||
import PremiumService from '../../services/PremiumService';
|
import PremiumService from '../../services/PremiumService';
|
||||||
import Sync from '../../services/Sync';
|
import Sync from '../../services/Sync';
|
||||||
import { editing, toTXT } from '../../utils';
|
import {editing, toTXT} from '../../utils';
|
||||||
import {
|
import {
|
||||||
ACCENT,
|
ACCENT,
|
||||||
COLOR_SCHEME,
|
COLOR_SCHEME,
|
||||||
COLOR_SCHEME_DARK,
|
COLOR_SCHEME_DARK,
|
||||||
COLOR_SCHEME_LIGHT,
|
COLOR_SCHEME_LIGHT,
|
||||||
setColorScheme
|
setColorScheme,
|
||||||
} from '../../utils/Colors';
|
} from '../../utils/Colors';
|
||||||
import { db } from '../../utils/DB';
|
import {db} from '../../utils/DB';
|
||||||
import {
|
import {
|
||||||
eOnNewTopicAdded,
|
eOnNewTopicAdded,
|
||||||
|
|
||||||
eOpenMoveNoteDialog,
|
eOpenMoveNoteDialog,
|
||||||
|
refreshNotesPage,
|
||||||
refreshNotesPage
|
|
||||||
} from '../../utils/Events';
|
} from '../../utils/Events';
|
||||||
import { deleteItems } from '../../utils/functions';
|
import {deleteItems} from '../../utils/functions';
|
||||||
import { MMKV } from '../../utils/mmkv';
|
import {MMKV} from '../../utils/mmkv';
|
||||||
import { opacity, pv, SIZE } from '../../utils/SizeUtils';
|
import {opacity, pv, SIZE} from '../../utils/SizeUtils';
|
||||||
import { timeConverter } from '../../utils/TimeUtils';
|
import {timeConverter} from '../../utils/TimeUtils';
|
||||||
import { PremiumTag } from '../Premium/PremiumTag';
|
import {PremiumTag} from '../Premium/PremiumTag';
|
||||||
import { PressableButton } from '../PressableButton';
|
import {PressableButton} from '../PressableButton';
|
||||||
import { Toast } from '../Toast';
|
import {Toast} from '../Toast';
|
||||||
import Heading from '../Typography/Heading';
|
import Heading from '../Typography/Heading';
|
||||||
import Paragraph from '../Typography/Paragraph';
|
import Paragraph from '../Typography/Paragraph';
|
||||||
import { ActionSheetColorsSection } from './ActionSheetColorsSection';
|
import {ActionSheetColorsSection} from './ActionSheetColorsSection';
|
||||||
import { ActionSheetTagsSection } from './ActionSheetTagsSection';
|
import {ActionSheetTagsSection} from './ActionSheetTagsSection';
|
||||||
const w = Dimensions.get('window').width;
|
const w = Dimensions.get('window').width;
|
||||||
|
|
||||||
export const ActionSheetComponent = ({
|
export const ActionSheetComponent = ({
|
||||||
@@ -61,7 +63,6 @@ export const ActionSheetComponent = ({
|
|||||||
const {colors, premiumUser, user} = state;
|
const {colors, premiumUser, user} = state;
|
||||||
const [refreshing, setRefreshing] = useState(false);
|
const [refreshing, setRefreshing] = useState(false);
|
||||||
const [isPinnedToMenu, setIsPinnedToMenu] = useState(false);
|
const [isPinnedToMenu, setIsPinnedToMenu] = useState(false);
|
||||||
|
|
||||||
const [note, setNote] = useState(
|
const [note, setNote] = useState(
|
||||||
item
|
item
|
||||||
? item
|
? item
|
||||||
@@ -191,12 +192,13 @@ export const ActionSheetComponent = ({
|
|||||||
name: 'Delete',
|
name: 'Delete',
|
||||||
icon: 'delete',
|
icon: 'delete',
|
||||||
func: async () => {
|
func: async () => {
|
||||||
close();
|
|
||||||
try {
|
try {
|
||||||
await deleteItems(note);
|
await deleteItems(note);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.log(e);
|
console.log(e);
|
||||||
}
|
}
|
||||||
|
//close();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -486,7 +488,6 @@ export const ActionSheetComponent = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const onScrollEnd = () => {
|
const onScrollEnd = () => {
|
||||||
|
|
||||||
getRef().current?.handleChildScrollEnd();
|
getRef().current?.handleChildScrollEnd();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -519,7 +520,7 @@ export const ActionSheetComponent = ({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
{!note.id && !note.dateCreated ? (
|
{!note.id && !note.dateCreated ? (
|
||||||
<Paragraph style={{marginVertical: 10}}>
|
<Paragraph style={{marginVertical: 10,alignSelf:"center"}}>
|
||||||
Start writing to save your note.
|
Start writing to save your note.
|
||||||
</Paragraph>
|
</Paragraph>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
Reference in New Issue
Block a user