From fa4f7689300d4eeb45a085837e653453d1f86ddd Mon Sep 17 00:00:00 2001 From: ragsav Date: Sat, 22 Apr 2023 15:54:18 +0530 Subject: [PATCH] removed unused screens --- App.js | 4 +- assets/bootsplash_logo.svg | 11 + assets/logo_fore.png | Bin 0 -> 16974 bytes constants.js | 18 +- js/components/CalenderItemBottomSheet.js | 22 +- js/components/DrawerBasedNavigator.js | 274 +++++++++++++++++--- js/components/NoteItem.js | 4 +- js/components/NoteSortBottomSheet.js | 142 +++++++++++ js/components/PinnedNoteItem.js | 136 ---------- js/components/Router.js | 56 ++--- js/components/URLPreview.js | 6 +- js/db/models/Note.js | 18 +- js/db/models/Task.js | 31 ++- js/redux/actions/index.js | 1 + js/redux/actions/label.js | 43 ++-- js/redux/actions/note.js | 45 +--- js/redux/actions/noteSort.js | 34 +++ js/redux/actions/settings.js | 1 + js/redux/actions/task.js | 8 +- js/redux/actions/taskSort.js | 3 + js/redux/reducers/index.js | 2 + js/redux/reducers/noteSort.js | 34 +++ js/redux/reducers/settings.js | 4 +- js/redux/store.js | 39 ++- js/screens/AllTaskScreen.js | 23 +- js/screens/ArchivedNotesScreen.js | 31 ++- js/screens/ArchivedTasksScreen.js | 142 ----------- js/screens/BookmarkScreen.js | 11 +- js/screens/CalendarScreen.js | 2 +- js/screens/CompletedScreen.js | 11 +- js/screens/CreateNewLabelScreen.js | 3 +- js/screens/CreateNewNoteScreen.js | 2 +- js/screens/DayScreen.js | 11 +- js/screens/DeletedTasksScreen.js | 9 +- js/screens/EditNoteScreen.js | 2 +- js/screens/Home.js | 308 ----------------------- js/screens/LabelScreen.js | 204 +++++---------- js/screens/NoteScreen.js | 30 +-- js/screens/PinScreen.js | 136 ++-------- js/screens/Settings.js | 41 +-- test.json | 0 themes.js | 40 +++ 42 files changed, 826 insertions(+), 1116 deletions(-) create mode 100644 assets/bootsplash_logo.svg create mode 100644 assets/logo_fore.png create mode 100644 js/components/NoteSortBottomSheet.js delete mode 100644 js/components/PinnedNoteItem.js create mode 100644 js/redux/actions/noteSort.js create mode 100644 js/redux/reducers/noteSort.js delete mode 100644 js/screens/ArchivedTasksScreen.js delete mode 100644 js/screens/Home.js create mode 100644 test.json diff --git a/App.js b/App.js index b57895d..7ca07d5 100644 --- a/App.js +++ b/App.js @@ -13,7 +13,7 @@ import {SafeAreaProvider} from 'react-native-safe-area-context'; import {Provider as StoreProvider} from 'react-redux'; import Router from './js/components/Router'; import {configureStore} from './js/redux/store'; - +import {MD3DarkTheme, MD3LightTheme} from 'react-native-paper'; const store = configureStore(); const App = () => { @@ -24,7 +24,7 @@ const App = () => { - + diff --git a/assets/bootsplash_logo.svg b/assets/bootsplash_logo.svg new file mode 100644 index 0000000..cd9a0a9 --- /dev/null +++ b/assets/bootsplash_logo.svg @@ -0,0 +1,11 @@ + + + + + + + diff --git a/assets/logo_fore.png b/assets/logo_fore.png new file mode 100644 index 0000000000000000000000000000000000000000..d0e7f4e3d9723357f1191f01a6cdc2e7d0c25588 GIT binary patch literal 16974 zcmeIZ`CF4`6E++WL1YuzWz#mw;|3}PqHJx|Vgx}YB&-1>z$0s-1!7nQ0RatdT#$m$ zY86S?#Ineiu%;A+x3v)vfrM0fj4VlQ1X;hiu>ZmL)B7GC;(f$i+srxVoHN(0=A3kQ z(b%|UBL;)fz#ltu8iP?vL%%mDV=$QP2e!T#%-4GOBVQ5d3RCT=|5(Kb49!i>$(NJ3 z<4c%rbcn5&tvt)^Jn7W;WzPrKD`~sag6)!*q14P{*?CD*ln}dKHU+sxjglEv%PfI=_ z_K7f`^5v6Ud{WC##R5v=r& zoC1<77U=R+6-;0^n&b9@;89iL7ZA97Pg2Crh~WMZ!G5!w>BVPTkpkH(jf|RwQug?R zl)H?^L;9E{F6tmhe(^IUc(7y2W2#EX)1;z^h8J(T`~w`T8D4S=fpc}ry#=|%T2M;h zD+(*>pxGSC%8;Z>79@Q3Ec?B^&HW!Dst+|VzLKX)ZVRftxP;|+d7;Erf%<$Hn$=?W zM8PXT0>d4r$@faFY`V8F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~G2aZxg1io3cmtHVyuduowU_?Fm^xS*o-q+11M{ugCOjOP)4xkNt>xBXIoiW!FAE|P)xn26;7YE)P;E7Gq zbi0yF`&Y5eY6Bh3=!ItQE*n_3b0~AS?8wVYM>!*(#dQ5Xzk3QSugyiVJYLoFPHK0{ z=XTiqA@ZfUV0cs1y9?f|uyzh-&WS?jH-`}+Qt2dN0Loe{Q09Qm2o1z>a{r@4Po$y6 zSGhc7zz29$2v;aSsXGWwNZ5<8`Ca|(rNKxBm+ZjkLiW@7-NiXpA-{jIcfuHFnwo|D z`70Zt@SCl;nz|V@_1SqHCcji{hW67&i<r0J_uV_eD9*E*=%wpwK1`b8c{Qq&g08{dQxB1pMI_j-=$7_)(VfiR z@D>kQb|gweQ8KYwQP-r}EcJSMIbVpMKjH9lDOqLJ942==qSLWRA(nVy{@K-{e0aZe z6<#o{?h(GF+plc46I!Bc5~UYe_#rs2Q7w>1k}{S&9gOlj#`()M=a&N|K3(c+Lz(tc z%cY%F-C=~iQT8M1uYfRrnmr2WS%Z80QBnBvV-x1Q?Ke0eoi zsMDxC7+i!_kI0Xo^9{YkyQ)Z`m z4Kh?OeCmM};0nv_1sa7PJW?_EIdB$WM<3ANxSLLWe$3P}he( zeA?s_CZBln|37zDxsJH4@Xw{c#ON-YkLI6*k7 { display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', - alignItems: 'flex-end', + alignItems: 'center', flexGrow: 0, paddingHorizontal: 18, paddingVertical: 4, }}> + { lineHeight: 50, color: theme?.colors.primary, }}> - Gaurdian + Tasker - Safety - + */} - + + + {props?.quickListSettings?.myDay && ( + { + props.navigation.navigate(CONSTANTS.ROUTES.MY_DAY); + }} + icon={() => ( + + )} + /> + )} + + {props?.quickListSettings?.myDay && ( + { + props.navigation.navigate(CONSTANTS.ROUTES.PINNED_NOTES); + }} + icon={() => ( + + )} + /> + )} + { + props.navigation.navigate(CONSTANTS.ROUTES.ARCHIVED_NOTES); + }} + icon={() => ( + + )} + /> + + {props?.quickListSettings?.all && ( + { + props.navigation.navigate(CONSTANTS.ROUTES.ALL_TASKS); + }} + icon={() => ( + + )} + /> + )} + {props?.quickListSettings?.completed && ( + { + props.navigation.navigate(CONSTANTS.ROUTES.COMPLETED); + }} + icon={() => ( + + )} + /> + )} + {props?.quickListSettings?.bookmarks && ( + { + props.navigation.navigate(CONSTANTS.ROUTES.BOOKMARKS); + }} + icon={() => ( + + )} + /> + )} + {props?.quickListSettings?.myCalendar && ( + { + props.navigation.navigate(CONSTANTS.ROUTES.CALENDAR); + }} + icon={() => ( + + )} + /> + )} + + { + props.navigation.navigate(CONSTANTS.ROUTES.ADD_LABEL); + }} + icon={() => ( + + )} + /> + + + { + props.navigation.navigate(CONSTANTS.ROUTES.SETTINGS); + }} + icon={() => ( + + )} + /> ); }; -const DrawerBasedNavigation = ({labels}) => { +const DrawerBasedNavigation = ({labels, quickListSettings}) => { const theme = useTheme(); + return ( { }, drawerItemStyle: { borderRadius: 25, - paddingHorizontal: 10, }, drawerStyle: { padding: 0, + backgroundColor: theme?.colors.background, }, drawerContentStyle: { padding: 0, }, }} - drawerContent={props => } - drawerStyle={{backgroundColor: 'white'}}> + drawerContent={props => ( + + )}> {labels && Array.isArray(labels) && labels.map((label, index) => { @@ -104,26 +320,12 @@ const DrawerBasedNavigation = ({labels}) => { /> ), }} - initialParams={{labelID: label.id}} + initialParams={{p_id: label.id}} name={`${label.id}`} - component={EnhancedLabelByIdScreenScreen} + component={EnhancedLabelScreen} /> ); })} - ( - - ), - }} - name={`setting`} - component={SettingScreen} - /> ); }; @@ -135,4 +337,12 @@ const EnhancedDrawerBasedNavigation = enhanceDrawerBasedNavigation( DrawerBasedNavigation, ); -export default EnhancedDrawerBasedNavigation; +const mapStateToProps = state => { + return { + quickListSettings: state.settings.quickListSettings, + }; +}; + +export default connect(mapStateToProps)(EnhancedDrawerBasedNavigation); + +// export default EnhancedDrawerBasedNavigation; diff --git a/js/components/NoteItem.js b/js/components/NoteItem.js index 65c90bd..0f3ea1d 100644 --- a/js/components/NoteItem.js +++ b/js/components/NoteItem.js @@ -84,7 +84,7 @@ const NoteItem = ({note, tasks, tasksCount, handleDeleteNote, dispatch}) => { marginBottom: 10, flex: 1, }} - onPress={note.isArchived ? null : _navigateToNoteScreen}> + onPress={_navigateToNoteScreen}> ({ Q.where('is_marked_deleted', Q.eq(null)), Q.where('is_marked_deleted', Q.eq(false)), ), - Q.where('is_archived', Q.notEq(!note.isArchived)), Q.where('note_id', note.id), ) .observe(), @@ -153,7 +152,6 @@ const enhanceNoteItem = withObservables(['note'], ({note}) => ({ Q.where('is_marked_deleted', Q.eq(null)), Q.where('is_marked_deleted', Q.eq(false)), ), - Q.where('is_archived', Q.notEq(!note.isArchived)), Q.where('note_id', note.id), ) .observeCount(), diff --git a/js/components/NoteSortBottomSheet.js b/js/components/NoteSortBottomSheet.js new file mode 100644 index 0000000..a5921a0 --- /dev/null +++ b/js/components/NoteSortBottomSheet.js @@ -0,0 +1,142 @@ +import BottomSheet, { + BottomSheetBackdrop, + BottomSheetScrollView, +} from '@gorhom/bottom-sheet'; +import React, {useCallback, useEffect, useMemo, useRef} from 'react'; +import {Appbar, Divider, List, useTheme} from 'react-native-paper'; +import {connect} from 'react-redux'; +import {CONSTANTS} from '../../constants'; +import {setNoteSortOrder, setNoteSortProperty} from '../redux/actions'; + +const NoteSortBottomSheet = ({ + visible, + setVisible, + noteSortProperty, + noteSortOrder, + dispatch, +}) => { + // hooks + const sheetRef = useRef(null); + const theme = useTheme(); + + const snapPoints = useMemo(() => ['100%'], []); + + useEffect(() => { + if (!visible) { + _handleCloseSortSheet(); + } else { + _handleOpenSortSheet(0); + } + }, [visible, sheetRef]); + + // callbacks + const _handleSheetChange = useCallback(index => {}, []); + const _handleOpenSortSheet = useCallback(index => { + sheetRef.current?.snapToIndex(index); + }, []); + const _handleCloseSortSheet = useCallback(() => { + sheetRef.current?.close(); + }, []); + const _handleSetSortProperty = noteSortProperty => { + dispatch(setNoteSortProperty({noteSortProperty})); + }; + const _handleSetSortOrder = noteSortOrder => { + dispatch(setNoteSortOrder({noteSortOrder})); + }; + + const _renderBackdrop = useCallback( + props => ( + + ), + [], + ); + const _renderNoteSortField = ({item, index}) => { + return ( + _handleSetSortProperty(CONSTANTS.NOTE_SORT[item].code)} + key={index} + title={String(CONSTANTS.NOTE_SORT[item].text)} + left={props => ( + + )} + /> + ); + }; + const _renderNoteSortOrder = ({item, index}) => { + return ( + + _handleSetSortOrder(CONSTANTS.NOTE_SORT_ORDER[item].code) + } + key={index} + title={String(CONSTANTS.NOTE_SORT_ORDER[item].text)} + left={props => ( + + )} + /> + ); + }; + + return ( + setVisible(false)} + onChange={_handleSheetChange}> + + { + setVisible(false); + }} + /> + + + + + {Object.keys(CONSTANTS.NOTE_SORT).map((item, index) => + _renderNoteSortField({item, index}), + )} + + {Object.keys(CONSTANTS.NOTE_SORT_ORDER).map((item, index) => + _renderNoteSortOrder({item, index}), + )} + + + ); +}; + +const mapStateToProps = state => { + return { + noteSortProperty: state.noteSort.noteSortProperty, + noteSortOrder: state.noteSort.noteSortOrder, + }; +}; + +export default connect(mapStateToProps)(NoteSortBottomSheet); diff --git a/js/components/PinnedNoteItem.js b/js/components/PinnedNoteItem.js deleted file mode 100644 index 83c4f92..0000000 --- a/js/components/PinnedNoteItem.js +++ /dev/null @@ -1,136 +0,0 @@ -/** - * Sample React Native App - * https://github.com/facebook/react-native - * - * @format - * @flow strict-local - */ -import {Q} from '@nozbe/watermelondb'; -import withObservables from '@nozbe/with-observables'; -import {useNavigation} from '@react-navigation/native'; -import React from 'react'; -import {View} from 'react-native'; -import {Text, TouchableRipple, useTheme} from 'react-native-paper'; -import {SharedElement} from 'react-navigation-shared-element'; -import {connect} from 'react-redux'; -import {CONSTANTS} from '../../constants'; -import {database} from '../db/db'; -import Note from '../db/models/Note'; -import Task from '../db/models/Task'; -import {editNoteIsArchived} from '../redux/actions'; - -/** - * - * @param {object} param0 - * @param {Note} param0.note - * @param {Array} param0.tasks - * @returns - */ -const PinnedNoteItem = ({note, tasks, handleDeleteNote, dispatch}) => { - // ref - - // variables - const theme = useTheme(); - const navigation = useNavigation(); - - // states - - // effects - - // callbacks - - // render functions - - // handle functions - - const _navigateToNoteScreen = () => { - navigation?.navigate(CONSTANTS.ROUTES.NOTE, { - p_id: note.id, - p_title: note.title, - p_colorString: note.colorString, - p_labelID: note.labelID, - }); - }; - - // navigation functions - const _handleUnarchiveNote = () => { - dispatch( - editNoteIsArchived({id: note.id, isArchived: false, unarchiveAll: false}), - ); - }; - - // return - - return ( - - - - {/* */} - - {note?.title} - - {/* */} - - {tasks && - Array.isArray(tasks) && - tasks.map(task => { - return ( - - {task?.title} - - ); - })} - - - - ); -}; - -const enhancePinnedNoteItem = withObservables(['note'], ({note}) => ({ - note, // shortcut syntax for `comment: comment.observe()` - tasks: database.collections - .get('tasks') - .query( - Q.or( - Q.where('is_marked_deleted', Q.eq(null)), - Q.where('is_marked_deleted', Q.eq(false)), - ), - Q.where('is_archived', Q.notEq(!note.isArchived)), - Q.where('note_id', note.id), - ) - .observe(), -})); -const EnhancedPinnedNoteItem = enhancePinnedNoteItem(PinnedNoteItem); -const mapStateToProps = state => { - return {}; -}; - -export default connect(mapStateToProps)(EnhancedPinnedNoteItem); diff --git a/js/components/Router.js b/js/components/Router.js index 449a094..d1a1375 100644 --- a/js/components/Router.js +++ b/js/components/Router.js @@ -3,39 +3,35 @@ * @flow strict-local */ -import React from 'react'; import {NavigationContainer} from '@react-navigation/native'; -import {createStackNavigator, TransitionPresets} from '@react-navigation/stack'; +import {TransitionPresets} from '@react-navigation/stack'; +import React, {useEffect} from 'react'; +import {StatusBar} from 'react-native'; import RNBootSplash from 'react-native-bootsplash'; +import {Provider as PaperProvider} from 'react-native-paper'; +import {createSharedElementStackNavigator} from 'react-navigation-shared-element'; import {connect} from 'react-redux'; -import Home from '../screens/Home'; import {CONSTANTS} from '../../constants'; +import AllTaskScreen from '../screens/AllTaskScreen'; +import ArchivedNotesScreen from '../screens/ArchivedNotesScreen'; +import BackupConfigScreen from '../screens/BackupConfigScreen'; +import BookmarkScreen from '../screens/BookmarkScreen'; +import CalendarScreen from '../screens/CalendarScreen'; +import CompletedScreen from '../screens/CompletedScreen'; import CreateNewLabelScreen from '../screens/CreateNewLabelScreen'; import CreateNewNoteScreen from '../screens/CreateNewNoteScreen'; +import DayScreen from '../screens/DayScreen'; +import DeletedTasksScreen from '../screens/DeletedTasksScreen'; import EditLabelScreen from '../screens/EditLabelScreen'; import EditNoteScreen from '../screens/EditNoteScreen'; +import LabelScreen from '../screens/LabelScreen'; import NoteScreen from '../screens/NoteScreen'; -import DayScreen from '../screens/DayScreen'; -import BookmarkScreen from '../screens/BookmarkScreen'; -import TaskScreen from '../screens/TaskScreen'; -import CalendarScreen from '../screens/CalendarScreen'; -import {useEffect} from 'react'; -import PermissionsProvider from './PermissionsProvider'; +import PinScreen from '../screens/PinScreen'; import {SearchScreen} from '../screens/SearchScreen'; -import {Provider as PaperProvider} from 'react-native-paper'; -import {StatusBar} from 'react-native'; import Settings from '../screens/Settings'; -import AllTaskScreen from '../screens/AllTaskScreen'; -import CompletedScreen from '../screens/CompletedScreen'; -import ArchivedTasksScreen from '../screens/ArchivedTasksScreen'; -import ArchivedNotesScreen from '../screens/ArchivedNotesScreen'; -import DeletedTasksScreen from '../screens/DeletedTasksScreen'; -import BackupConfigScreen from '../screens/BackupConfigScreen'; -import PinScreen from '../screens/PinScreen'; -import {createSharedElementStackNavigator} from 'react-navigation-shared-element'; -import {Storage} from '../utils/asyncStorage'; -import {setDefaultHomeScreen} from '../redux/actions'; -import LabelScreen from '../screens/LabelScreen'; +import TaskScreen from '../screens/TaskScreen'; +import EnhancedDrawerBasedNavigation from './DrawerBasedNavigator'; +import PermissionsProvider from './PermissionsProvider'; // const Stack = createStackNavigator(); const Stack = createSharedElementStackNavigator(); const opacityTransition = { @@ -94,15 +90,16 @@ const Router = ({theme, defaultHomeScreen, dispatch}) => { RNBootSplash.hide(); }}> + { options={{headerShown: false}} /> @@ -186,11 +183,6 @@ const Router = ({theme, defaultHomeScreen, dispatch}) => { component={Settings} options={{headerShown: false}} /> - { const mapStateToProps = state => { return { - theme: state.settings.theme, + // theme: state.settings.theme, defaultHomeScreen: state.settings.defaultHomeScreen, }; }; diff --git a/js/components/URLPreview.js b/js/components/URLPreview.js index 4ba8b63..8cfeb46 100644 --- a/js/components/URLPreview.js +++ b/js/components/URLPreview.js @@ -18,9 +18,9 @@ export const LinkPreview = ({text, requestTimeout = 2000}) => { }; }, [text]); - useEffect(() => { - Logger.pageLogger('URLPreview.js:useEffect', {data}); - }, [data]); + // useEffect(() => { + // Logger.pageLogger('URLPreview.js:useEffect', {data}); + // }, [data]); const handlePress = () => data?.link && Linking.openURL(data.link); diff --git a/js/db/models/Note.js b/js/db/models/Note.js index 80df44d..b1c96e6 100644 --- a/js/db/models/Note.js +++ b/js/db/models/Note.js @@ -1,4 +1,4 @@ -import {Model} from '@nozbe/watermelondb'; +import {Model, Q} from '@nozbe/watermelondb'; import { field, text, @@ -45,4 +45,20 @@ export default class Note extends Model { static _jsonDataForBackup = raw => { return {...raw, _changed: null, _status: null}; }; + + static noteSortQuery = (noteSortProperty, noteSortOrder) => { + return Q.sortBy( + !noteSortProperty || + String(noteSortProperty).trim() === '' || + noteSortProperty === undefined + ? CONSTANTS.NOTE_SORT.CREATED_AT.code + : String(noteSortProperty).trim(), + !noteSortOrder || + noteSortOrder === undefined || + String(noteSortOrder) === Q.asc || + String(noteSortOrder) === Q.desc + ? noteSortOrder + : Q.asc, + ); + }; } diff --git a/js/db/models/Task.js b/js/db/models/Task.js index 675d015..6a9c1ef 100644 --- a/js/db/models/Task.js +++ b/js/db/models/Task.js @@ -1,4 +1,4 @@ -import {Model} from '@nozbe/watermelondb'; +import {Model, Q} from '@nozbe/watermelondb'; import { field, text, @@ -55,4 +55,33 @@ export default class Task extends Model { static _jsonDataForBackup = raw => { return {...raw, _changed: null, _status: null}; }; + static archived = () => { + return Q.on('notes', Q.where('is_archived', Q.eq(true))); + }; + static unarchived = () => { + return Q.on( + 'notes', + Q.or( + Q.where('is_archived', Q.eq(undefined)), + Q.where('is_archived', Q.eq(null)), + Q.where('is_archived', Q.eq(false)), + ), + ); + }; + + static sortQuery = (taskSortProperty, taskSortOrder) => { + return Q.sortBy( + !taskSortProperty || + String(taskSortProperty).trim() === '' || + taskSortProperty === undefined + ? CONSTANTS.TASK_SORT.CREATED_AT.code + : String(taskSortProperty).trim(), + !taskSortOrder || + taskSortOrder === undefined || + String(taskSortOrder) === Q.asc || + String(taskSortOrder) === Q.desc + ? taskSortOrder + : Q.asc, + ); + }; } diff --git a/js/redux/actions/index.js b/js/redux/actions/index.js index 804f7aa..fddd8bd 100644 --- a/js/redux/actions/index.js +++ b/js/redux/actions/index.js @@ -6,3 +6,4 @@ export * from './task'; export * from './settings'; export * from './taskSort'; export * from './backup'; +export * from './noteSort'; diff --git a/js/redux/actions/label.js b/js/redux/actions/label.js index 8f0d48f..e9cdeb7 100644 --- a/js/redux/actions/label.js +++ b/js/redux/actions/label.js @@ -26,12 +26,14 @@ export const editLabelState = ({loading, success, error}) => { state: {loading, success, error}, }; }; + export const resetEditLabelState = () => { return { type: EDIT_LABEL_STATE, state: {loading: false, success: false, error: null}, }; }; + export const deleteLabelState = ({loading, success, error}) => { return { type: DELETE_LABEL_STATE, @@ -51,7 +53,7 @@ export const resetDeleteLabelState = () => { * @param {string} id * @returns {Promise - {/* {notes?.map(note => { - return {note.id}; - })} */} - - {/* */} - {/* */} - {/* */} + /> ); }; const enhanceLabelScreen = withObservables( ['route', 'noteSortProperty', 'noteSortOrder'], - ({route, noteSortProperty, noteSortOrder}) => ({ - label: database.collections.get('labels').findAndObserve(route.params.p_id), - notes: database.collections.get('notes').query( - Q.or( - Q.where('is_marked_deleted', Q.eq(null)), - Q.where('is_marked_deleted', Q.eq(false)), - ), - Q.where('is_archived', Q.notEq(true)), - Q.where('label_id', route.params.p_id), - // Q.sortBy( - // String(noteSortProperty).trim() === '' - // ? CONSTANTS.TASK_SORT.DUE_DATE.code - // : String(noteSortProperty).trim(), - // String(noteSortOrder) === Q.asc || String(noteSortOrder) === Q.desc - // ? noteSortOrder - // : Q.asc, - // ), - ), - }), + ({route, noteSortProperty, noteSortOrder}) => { + console.log({noteSortProperty}); + return { + label: database.collections + .get('labels') + .findAndObserve(route.params.p_id), + notes: database.collections + .get('notes') + .query( + Q.or( + Q.where('is_marked_deleted', Q.eq(null)), + Q.where('is_marked_deleted', Q.eq(false)), + ), + Q.where('is_archived', Q.notEq(true)), + Q.where('label_id', route.params.p_id), + + Note.noteSortQuery(noteSortProperty, noteSortOrder), + ) + .observe(), + }; + }, ); // LabelScreen.sharedElements = route => { // const {p_id} = route.params; @@ -393,8 +319,8 @@ const mapStateToProps = state => { isDeletingNote: state.note.isDeletingNote, deleteNoteSuccess: state.note.deleteNoteSuccess, deleteNoteFailure: state.note.deleteNoteFailure, - taskSortProperty: state.taskSort.taskSortProperty, - taskSortOrder: state.taskSort.taskSortOrder, + noteSortProperty: state.noteSort.noteSortProperty, + noteSortOrder: state.noteSort.noteSortOrder, }; }; diff --git a/js/screens/NoteScreen.js b/js/screens/NoteScreen.js index 096626d..60f7d45 100644 --- a/js/screens/NoteScreen.js +++ b/js/screens/NoteScreen.js @@ -2,7 +2,7 @@ import {Q} from '@nozbe/watermelondb'; import withObservables from '@nozbe/with-observables'; import {useFocusEffect} from '@react-navigation/native'; import React, {useCallback, useEffect, useState} from 'react'; -import {SafeAreaView, StyleSheet, Text, View} from 'react-native'; +import {SafeAreaView, StyleSheet, Text} from 'react-native'; import DraggableFlatList, { ScaleDecorator, } from 'react-native-draggable-flatlist'; @@ -18,7 +18,6 @@ import TaskSortBottomSheet from '../components/TaskSortBottomSheet'; import {database} from '../db/db'; import Note from '../db/models/Note'; import Task from '../db/models/Task'; -import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons'; import { deleteNote, duplicateNote, @@ -27,8 +26,6 @@ import { resetDeleteNoteState, } from '../redux/actions'; import {Logger} from '../utils/logger'; -import {SharedElement} from 'react-navigation-shared-element'; -import Animated, {SlideInRight} from 'react-native-reanimated'; /** * @@ -191,6 +188,10 @@ const NoteScreen = ({ // } /> + { -// const {p_id} = route.params; -// return [ -// { -// id: `note.${p_id}.hero`, -// animation: 'move', -// resize: 'clip', -// }, -// ]; -// }; + const EnhancedNoteScreen = enhanceNoteScreen(NoteScreen); const mapStateToProps = state => { diff --git a/js/screens/PinScreen.js b/js/screens/PinScreen.js index a0f9950..17f475c 100644 --- a/js/screens/PinScreen.js +++ b/js/screens/PinScreen.js @@ -7,37 +7,20 @@ */ import {Q} from '@nozbe/watermelondb'; import withObservables from '@nozbe/with-observables'; +import MasonryList from '@react-native-seoul/masonry-list'; import {useFocusEffect} from '@react-navigation/native'; -import React, {useCallback} from 'react'; -import {SafeAreaView, ScrollView, StyleSheet, View} from 'react-native'; -import { - Appbar, - Button, - Divider, - List, - Text, - useTheme, -} from 'react-native-paper'; +import React, {useCallback, useState} from 'react'; +import {SafeAreaView, StyleSheet} from 'react-native'; +import {Appbar, useTheme} from 'react-native-paper'; import {useSafeAreaInsets} from 'react-native-safe-area-context'; -import {FlatGrid} from 'react-native-super-grid'; import {connect} from 'react-redux'; import {CONSTANTS} from '../../constants'; import {EmptyTasks} from '../components/EmptyTasks'; -import {EnhancedLabelItem} from '../components/LabelItem'; import EnhancedNoteItem from '../components/NoteItem'; -import PinnedNoteItem from '../components/PinnedNoteItem'; import {database} from '../db/db'; import Label from '../db/models/Label'; import Note from '../db/models/Note'; -import MasonryList from '@react-native-seoul/masonry-list'; -import { - deleteLabel, - resetDeleteLabelState, - resetEditLabelState, - setDefaultHomeScreen, - unGroupLabel, -} from '../redux/actions'; -import {Storage} from '../utils/asyncStorage'; +import {resetDeleteLabelState, resetEditLabelState} from '../redux/actions'; const BOTTOM_APPBAR_HEIGHT = 64; // const EnhancedLabelItem = enhanceLabelItem(LabelItem); /** @@ -57,6 +40,7 @@ const PinScreen = ({ // ref // variables + const [listViewMode, setListViewMode] = useState('grid'); const {bottom} = useSafeAreaInsets(); const theme = useTheme(); @@ -75,16 +59,13 @@ const PinScreen = ({ // callbacks // render functions - const _renderPinnedNoteItem = ({item}) => { - return ; - }; - // handle functions - const _handleDeleteLabel = id => { - dispatch(deleteLabel({id})); - }; - const _handleUnGroupLabel = id => { - dispatch(unGroupLabel({id})); + const _handleListViewMode = () => { + if (listViewMode === 'grid') { + setListViewMode('list'); + } else { + setListViewMode('grid'); + } }; // navigation functions @@ -92,42 +73,9 @@ const PinScreen = ({ const _navigateBack = () => { navigation?.pop(); }; - - const _navigateHome = () => { - navigation?.reset({ - index: 0, - routes: [{name: CONSTANTS.ROUTES.HOME}], - }); - dispatch(setDefaultHomeScreen({defaultHomeScreen: CONSTANTS.ROUTES.HOME})); - }; - - const _navigateToCreateLabelScreen = () => { - navigation?.navigate(CONSTANTS.ROUTES.ADD_LABEL); - }; - const _navigateToDayScreen = () => { - navigation?.navigate(CONSTANTS.ROUTES.MY_DAY); - }; - const _navigateToBookmarkScreen = () => { - navigation?.navigate(CONSTANTS.ROUTES.BOOKMARKS); - }; - const _navigateToCompletedScreen = () => { - navigation?.navigate(CONSTANTS.ROUTES.COMPLETED); - }; - const _navigateToAllTaskScreen = () => { - navigation?.navigate(CONSTANTS.ROUTES.ALL); - }; - const _navigateToCalendarScreen = () => { - navigation?.navigate(CONSTANTS.ROUTES.CALENDAR); - }; - const _navigateToCreateNoteScreen = () => { - navigation?.navigate(CONSTANTS.ROUTES.ADD_NOTE); - }; const _navigateToSearchScreen = () => { navigation?.navigate(CONSTANTS.ROUTES.SEARCH); }; - const _navigateToSettings = () => { - navigation?.navigate(CONSTANTS.ROUTES.SETTINGS); - }; // misc functions const _init = () => {}; @@ -144,62 +92,32 @@ const PinScreen = ({ backgroundColor: theme?.colors.surface, }}> + + - item.id} - renderItem={_renderPinnedNoteItem} + renderItem={({item}) => ( + + )} + ListEmptyComponent={() => ( + + )} /> - {/* item.id} - /> */} - - - - - - - - ); }; @@ -217,7 +135,7 @@ const enhancePinScreen = withObservables([], ({}) => ({ labels: database.collections.get('labels').query().observe(), notes: database.collections .get('notes') - .query(Q.where('label_id', ''), Q.where('is_archived', Q.notEq(true))) + .query(Q.where('is_archived', Q.notEq(true)), Q.where('is_pinned', true)) .observe(), })); const EnhancedPinScreen = enhancePinScreen(PinScreen); diff --git a/js/screens/Settings.js b/js/screens/Settings.js index bd928d2..80f7ae2 100644 --- a/js/screens/Settings.js +++ b/js/screens/Settings.js @@ -1,4 +1,4 @@ -import {useFocusEffect} from '@react-navigation/native'; +import {StackActions, useFocusEffect} from '@react-navigation/native'; import moment from 'moment'; import React, {useCallback} from 'react'; import {useState} from 'react'; @@ -72,7 +72,9 @@ const Settings = ({ defaultHomeScreen === CONSTANTS.ROUTES.PINNED_NOTES ) { dispatch( - setDefaultHomeScreen({defaultHomeScreen: CONSTANTS.ROUTES.HOME}), + setDefaultHomeScreen({ + defaultHomeScreen: CONSTANTS.ROUTES.LABEL_DRAWER, + }), ); } else { dispatch( @@ -223,25 +225,7 @@ const Settings = ({ /> )} /> - - ( - - )} - right={props => ( - - )} - /> + )} /> - - ( - - )} - right={props => ( - - )} - /> + Quick lists diff --git a/test.json b/test.json new file mode 100644 index 0000000..e69de29 diff --git a/themes.js b/themes.js index e49c3f4..b3bfdd7 100644 --- a/themes.js +++ b/themes.js @@ -777,3 +777,43 @@ export const _customDarkTheme = { }, version: 3, }; + +const originnalThemeColors = { + backdrop: 'rgba(50, 47, 55, 0.4)', + background: 'rgba(28, 27, 31, 1)', + elevation: { + level0: 'transparent', + level1: 'rgb(37, 35, 42)', + level2: 'rgb(44, 40, 49)', + level3: 'rgb(49, 44, 56)', + level4: 'rgb(51, 46, 58)', + level5: 'rgb(52, 49, 63)', + }, + error: 'rgba(242, 184, 181, 1)', + errorContainer: 'rgba(140, 29, 24, 1)', + inverseOnSurface: 'rgba(49, 48, 51, 1)', + inversePrimary: 'rgba(103, 80, 164, 1)', + inverseSurface: 'rgba(230, 225, 229, 1)', + onBackground: 'rgba(230, 225, 229, 1)', + onError: 'rgba(96, 20, 16, 1)', + onErrorContainer: 'rgba(242, 184, 181, 1)', + onPrimary: 'rgba(56, 30, 114, 1)', + onPrimaryContainer: 'rgba(234, 221, 255, 1)', + onSecondary: 'rgba(51, 45, 65, 1)', + onSecondaryContainer: 'rgba(232, 222, 248, 1)', + onSurface: 'rgba(230, 225, 229, 1)', + onSurfaceDisabled: 'rgba(230, 225, 229, 0.38)', + onSurfaceVariant: 'rgba(202, 196, 208, 1)', + onTertiary: 'rgba(73, 37, 50, 1)', + onTertiaryContainer: 'rgba(255, 216, 228, 1)', + outline: 'rgba(147, 143, 153, 1)', + primary: 'rgba(208, 188, 255, 1)', + primaryContainer: 'rgba(79, 55, 139, 1)', + secondary: 'rgba(204, 194, 220, 1)', + secondaryContainer: 'rgba(74, 68, 88, 1)', + surface: 'rgba(28, 27, 31, 1)', + surfaceDisabled: 'rgba(230, 225, 229, 0.12)', + surfaceVariant: 'rgba(73, 69, 79, 1)', + tertiary: 'rgba(239, 184, 200, 1)', + tertiaryContainer: 'rgba(99, 59, 72, 1)', +};