A fully open source & end-to-end encrypted note taking alternative to Evernote.
TypeScript asp-net-coredotnet-coreelectronfosshacktoberfestnote-managmentnote-takingnote-taking-appnotebooknotesnotes-appopen-sourceopensourceprivacyproductivityreactreact-nativereactjsself-hosted
feat: ui redesign
ammarahm-edf851395dd2dd
diff --git a/apps/mobile/src/components/ActionIcon/index.js b/apps/mobile/src/components/ActionIcon/index.jsindex 9fc21f610..128c89996 100644--- a/apps/mobile/src/components/ActionIcon/index.js+++ b/apps/mobile/src/components/ActionIcon/index.js@@ -11,7 +11,7 @@ export const ActionIcon = ({name,color,customStyle,- size = SIZE.xxxl,+ size = SIZE.xxl,iconStyle = {},left = 10,right = 10,diff --git a/apps/mobile/src/components/Header/HeaderLeftMenu.js b/apps/mobile/src/components/Header/HeaderLeftMenu.jsindex 90f342e94..531488612 100644--- a/apps/mobile/src/components/Header/HeaderLeftMenu.js+++ b/apps/mobile/src/components/Header/HeaderLeftMenu.js@@ -45,7 +45,6 @@ export const HeaderLeftMenu = ({currentScreen,headerMenuState}) => {Navigation.popToTop();}}name={!headerMenuState ? 'arrow-left' : 'menu'}- size={SIZE.xxxl}color={colors.pri}iconStyle={{marginLeft: !headerMenuState ? -5 : 0,diff --git a/apps/mobile/src/components/Header/HeaderMenu.js b/apps/mobile/src/components/Header/HeaderMenu.jsindex 91eef097e..5a61dc291 100644--- a/apps/mobile/src/components/Header/HeaderMenu.js+++ b/apps/mobile/src/components/Header/HeaderMenu.js@@ -25,9 +25,9 @@ export const HeaderMenu = () => {flexDirection: 'row',alignItems: 'center',zIndex: 10,- height: 22,+ height: 25,backgroundColor: colors.accent,- paddingHorizontal: 8,+ paddingHorizontal: 12,borderRadius: 100,...getElevation(2)}}>diff --git a/apps/mobile/src/components/Header/HeaderRightMenu.js b/apps/mobile/src/components/Header/HeaderRightMenu.jsindex b19dbf5ce..01f34f952 100644--- a/apps/mobile/src/components/Header/HeaderRightMenu.js+++ b/apps/mobile/src/components/Header/HeaderRightMenu.js@@ -1,4 +1,4 @@-import React from 'react';+import React, {useRef} from 'react';import {ActivityIndicator, StyleSheet, View} from 'react-native';import {notesnook} from '../../../e2e/test.ids';import {useTracked} from '../../provider';@@ -8,17 +8,19 @@ import Navigation from '../../services/Navigation';import {SIZE} from '../../utils/SizeUtils';import {ActionIcon} from '../ActionIcon';import {Button} from '../Button';+import Menu, {MenuItem} from 'react-native-reanimated-material-menu';+import {TouchableOpacity} from 'react-native-gesture-handler';+import Icon from 'react-native-vector-icons/MaterialCommunityIcons';-export const HeaderRightMenu = ({currentScreen, action}) => {+export const HeaderRightMenu = ({currentScreen, action, rightButtons}) => {const [state] = useTracked();const {colors} = state;const syncing = useUserStore(state => state.syncing);const deviceMode = useSettingStore(state => state.deviceMode);-+ const menuRef = useRef();return (<View style={styles.rightBtnContainer}>{syncing && <ActivityIndicator size={SIZE.xl} color={colors.accent} />}-{currentScreen !== 'Settings' && (<ActionIcononPress={async () => {@@ -28,13 +30,12 @@ export const HeaderRightMenu = ({currentScreen, action}) => {}}testID={notesnook.ids.default.header.buttons.left}name="magnify"- size={SIZE.xxxl}color={colors.pri}customStyle={styles.rightBtn}/>)}- {deviceMode !== "mobile" ? (+ {deviceMode !== 'mobile' ? (<ButtononPress={action}testID={notesnook.ids.default.addBtn}@@ -48,25 +49,51 @@ export const HeaderRightMenu = ({currentScreen, action}) => {}}/>) : null}++ {rightButtons && (+ <Menu+ ref={menuRef}+ animationDuration={200}+ style={{+ borderRadius: 5,+ backgroundColor: colors.bg,+ }}+ button={+ <ActionIcon+ onPress={() => {+ menuRef.current?.show();+ }}+ testID={notesnook.ids.default.header.buttons.left}+ name="dots-vertical"+ color={colors.pri}+ customStyle={styles.rightBtn}+ />+ }>+ {rightButtons.map((item, index) => (+ <MenuItem+ key={item.title}+ onPress={() => {+ menuRef.current?.hide();+ item.func();+ }}+ textStyle={{+ fontSize: SIZE.md,+ color: colors.pri,+ }}>+ <Icon name={item.icon} size={SIZE.md} />+ {' ' + item.title}+ </MenuItem>+ ))}+ </Menu>+ )}</View>);};const styles = StyleSheet.create({- container: {- flexDirection: 'row',- zIndex: 11,- height: 50,- justifyContent: 'center',- alignItems: 'center',- paddingHorizontal: 12,- width: '100%',- },rightBtnContainer: {flexDirection: 'row',alignItems: 'center',- position: 'absolute',- right: 6,},rightBtn: {justifyContent: 'center',diff --git a/apps/mobile/src/components/Header/index.js b/apps/mobile/src/components/Header/index.jsindex c08d09b7c..db6742329 100644--- a/apps/mobile/src/components/Header/index.js+++ b/apps/mobile/src/components/Header/index.js@@ -4,7 +4,7 @@ import {useSafeAreaInsets} from 'react-native-safe-area-context';import {useTracked} from '../../provider';import {eSubscribeEvent, eUnSubscribeEvent} from '../../services/EventManager';import SearchService from '../../services/SearchService';-import {dWidth} from '../../utils';+import {dWidth, getElevation} from '../../utils';import {eScrollEvent} from '../../utils/Events';import {SIZE} from '../../utils/SizeUtils';import {ActionIcon} from '../ActionIcon';@@ -14,7 +14,7 @@ import {HeaderRightMenu} from './HeaderRightMenu';import {Title} from './title';export const Header = React.memo(- ({root, title, screen, isBack, color, action}) => {+ ({root, title, screen, isBack, color, action, rightButtons}) => {const [state] = useTracked();const {colors} = state;const insets = useSafeAreaInsets();@@ -46,14 +46,13 @@ export const Header = React.memo(overflow: 'hidden',borderBottomWidth: 1,borderBottomColor: hide ? 'transparent' : colors.nav,- justifyContent: 'center',+ justifyContent: 'space-between',},]}><View style={styles.leftBtnContainer}><HeaderLeftMenu headerMenuState={!isBack} currentScreen={screen} />- {(Platform.OS === 'android' || Platform.isPad) &&- screen !== 'Search' ? (+ {screen !== 'Search' ? (<TitleheaderColor={color}heading={title}@@ -62,14 +61,6 @@ export const Header = React.memo(/>) : null}</View>- {Platform.OS !== 'android' && !Platform.isPad && screen !== 'Search' ? (- <Title- headerColor={color}- heading={title}- screen={screen}- root={root}- />- ) : null}{screen === 'Search' ? (<>@@ -79,20 +70,23 @@ export const Header = React.memo(}}><SearchInput /></View>- <View style={[styles.rightBtnContainer, {right: 6}]}>+ <View style={[styles.rightBtnContainer]}><ActionIcononPress={() => {SearchService.search();}}name="magnify"- size={SIZE.xxxl}color={colors.pri}style={styles.rightBtn}/></View></>) : (- <HeaderRightMenu action={action} currentScreen={screen} />+ <HeaderRightMenu+ rightButtons={rightButtons}+ action={action}+ currentScreen={screen}+ />)}</View>);@@ -104,36 +98,17 @@ const styles = StyleSheet.create({container: {flexDirection: 'row',zIndex: 11,- height: 50,+ minHeight: 50,justifyContent: 'center',alignItems: 'center',paddingHorizontal: 12,width: '100%',},- loadingContainer: {- alignSelf: 'center',- alignItems: 'center',- justifyContent: 'center',- zIndex: 999,- left: dWidth / 2 - 20,- top: -20,- width: 40,- height: 40,- position: 'absolute',- },- loadingInnerContainer: {- width: 40,- height: 20,- position: 'absolute',- zIndex: 10,- top: 0,- },leftBtnContainer: {flexDirection: 'row',justifyContent: 'flex-start',alignItems: 'center',- position: 'absolute',- left: 12,+ flexShrink: 1,},leftBtn: {justifyContent: 'center',@@ -147,14 +122,12 @@ const styles = StyleSheet.create({rightBtnContainer: {flexDirection: 'row',alignItems: 'center',- position: 'absolute',- right: 12,},rightBtn: {justifyContent: 'center',alignItems: 'flex-end',height: 40,- width: 50,+ width: 40,paddingRight: 0,},});diff --git a/apps/mobile/src/components/Header/title.js b/apps/mobile/src/components/Header/title.jsindex 79676715d..ffaffee28 100644--- a/apps/mobile/src/components/Header/title.js+++ b/apps/mobile/src/components/Header/title.js@@ -1,21 +1,20 @@-import React, { useEffect } from 'react';-import Animated, { useValue } from 'react-native-reanimated';-import { useTracked } from '../../provider';-import { useSettingStore } from '../../provider/stores';-import { eSubscribeEvent, eUnSubscribeEvent } from '../../services/EventManager';-import { eScrollEvent } from '../../utils/Events';+import React, {useEffect} from 'react';+import {View} from 'react-native';+import {useValue} from 'react-native-reanimated';+import {useTracked} from '../../provider';+import {useSettingStore} from '../../provider/stores';import Heading from '../Typography/Heading';-export const Title = ({heading,headerColor,screen}) => {+export const Title = ({heading, headerColor, screen}) => {const [state] = useTracked();const {colors} = state;const deviceMode = useSettingStore(state => state.deviceMode);- const opacity = useValue(deviceMode !== "mobile" || screen === "Settings" ? 1 : 0)+ const opacity = useValue(1);- const onScroll = async (data) => {- if (data.screen === "Settings") return;+ const onScroll = async data => {+ if (data.screen === 'Settings') return;if (data.screen !== screen) return;- if (deviceMode !== "mobile") return;+ if (deviceMode !== 'mobile') return;if (data.y > 75) {let yVal = data.y - 75;o = yVal / 75;@@ -26,26 +25,30 @@ export const Title = ({heading,headerColor,screen}) => {};useEffect(() => {- eSubscribeEvent(eScrollEvent, onScroll);+ //eSubscribeEvent(eScrollEvent, onScroll);return () => {- eUnSubscribeEvent(eScrollEvent, onScroll);+ //eUnSubscribeEvent(eScrollEvent, onScroll);};- }, [heading]);-+ }, []);+return (- <Animated.View+ <Viewstyle={{- opacity: deviceMode !== "mobile" ? 1 : opacity,+ opacity: 1,+ flexShrink: 1,+ flexDirection: 'row',}}>- <Heading color={headerColor}>+ <Heading+ numberOfLines={1}+ style={{+ flexWrap: 'wrap',+ }}+ color={headerColor}><Heading color={colors.accent}>{heading.slice(0, 1) === '#' ? '#' : null}</Heading>-- {heading.slice(0, 1) === '#'- ? heading.slice(1)- : heading}+ {heading.slice(0, 1) === '#' ? heading.slice(1) : heading}</Heading>- </Animated.View>+ </View>);};diff --git a/apps/mobile/src/components/LoginDialog/index.js b/apps/mobile/src/components/LoginDialog/index.jsindex cbc5e4e91..acd1d7e64 100644--- a/apps/mobile/src/components/LoginDialog/index.js+++ b/apps/mobile/src/components/LoginDialog/index.js@@ -496,7 +496,7 @@ const LoginDialog = () => {type="accent"/>) : (- <ActivityIndicator size={SIZE.xxxl} color={colors.accent} />+ <ActivityIndicator size={SIZE.xxl} color={colors.accent} />)}</View></BaseDialog>@@ -527,7 +527,7 @@ const LoginDialog = () => {{DDS.isTab && MODES.sessionExpired !== mode ? (<ActionIconname="close"- size={SIZE.xxxl}+ size={SIZE.xxl}onPress={() => {if (MODES.sessionExpired === mode) return;close();@@ -543,7 +543,7 @@ const LoginDialog = () => {MODES.sessionExpired !== mode && (<ActionIconname="arrow-left"- size={SIZE.xxxl}+ size={SIZE.xxl}onPress={() => {if (MODES.sessionExpired === mode) return;close();diff --git a/apps/mobile/src/components/SearchInput/index.js b/apps/mobile/src/components/SearchInput/index.jsindex ab9046289..aaed9854d 100644--- a/apps/mobile/src/components/SearchInput/index.js+++ b/apps/mobile/src/components/SearchInput/index.js@@ -1,11 +1,11 @@-import React, { useEffect, useState } from 'react';-import { Platform, TextInput, View } from 'react-native';-import { useTracked } from '../../provider';+import React, {useEffect, useState} from 'react';+import {Platform, TextInput, View} from 'react-native';+import {useTracked} from '../../provider';import SearchService from '../../services/SearchService';-import { inputRef } from '../../utils/Refs';-import { SIZE } from '../../utils/SizeUtils';+import {inputRef} from '../../utils/Refs';+import {SIZE} from '../../utils/SizeUtils';-export const SearchInput = (props) => {+export const SearchInput = props => {const [state] = useTracked();const {colors} = state;const [searchState, setSearchState] = useState('Search all notes');@@ -22,7 +22,7 @@ export const SearchInput = (props) => {};}, []);- const onChangeText = async (value) => {+ const onChangeText = async value => {SearchService.setTerm(value);};@@ -42,8 +42,7 @@ export const SearchInput = (props) => {<TextInputref={inputRef}style={{- //fontFamily: "sans-serif",- fontWeight:'bold',+ fontWeight: 'bold',color: colors.pri,fontSize: SIZE.xl,flexGrow: 1,diff --git a/apps/mobile/src/components/SelectionHeader/index.js b/apps/mobile/src/components/SelectionHeader/index.jsindex 4fb18b8e9..9d0719c6d 100644--- a/apps/mobile/src/components/SelectionHeader/index.js+++ b/apps/mobile/src/components/SelectionHeader/index.js@@ -118,7 +118,6 @@ export const SelectionHeader = React.memo(({screen, type, extras}) => {}}color={colors.light}name="close"- size={SIZE.xxxl}/>{Platform.OS === 'android' ? (diff --git a/apps/mobile/src/components/SelectionWrapper/index.js b/apps/mobile/src/components/SelectionWrapper/index.jsindex db120a659..91e1a1d1b 100644--- a/apps/mobile/src/components/SelectionWrapper/index.js+++ b/apps/mobile/src/components/SelectionWrapper/index.js@@ -66,6 +66,8 @@ const SelectionWrapper = ({paddingHorizontal: 12,marginTop: 0,height: height * fontScale,+ borderBottomWidth:1,+ borderColor:colors.nav}}>{actionStrip && (<ActionStrip note={item} setActionStrip={setActionStrip} />diff --git a/apps/mobile/src/components/SimpleList/card.js b/apps/mobile/src/components/SimpleList/card.jsindex ff9194107..7656f116f 100644--- a/apps/mobile/src/components/SimpleList/card.js+++ b/apps/mobile/src/components/SimpleList/card.js@@ -1,75 +1,87 @@import React from 'react';-import { TouchableOpacity, View } from 'react-native';+import { View } from 'react-native';import Icon from 'react-native-vector-icons/MaterialCommunityIcons';-import { notesnook } from '../../../e2e/test.ids';-import { useMessageStore, useSelectionStore, useSettingStore } from '../../provider/stores';-import { DDS } from '../../services/DeviceDetection';-import { getElevation } from '../../utils';+import { useTracked } from '../../provider';+import {+ useMessageStore,+ useSelectionStore+} from '../../provider/stores';import { SIZE } from '../../utils/SizeUtils';+import { PressableButton } from '../PressableButton';import Paragraph from '../Typography/Paragraph';-export const Card = ({color}) => {;+export const Card = ({color}) => {+ const [state,dispatch] = useTracked();+ const colors = state.colors;+ color = color ? color : colors.accent+const selectionMode = useSelectionStore(state => state.selectionMode);const messageBoardState = useMessageStore(state => state.message);const announcement = useMessageStore(state => state.announcement);- const deviceMode = useSettingStore(state => state.settings)return !messageBoardState.visible || selectionMode || announcement ? null : (- <TouchableOpacity- activeOpacity={0.8}+ <PressableButtononPress={messageBoardState.onPress}- testID={notesnook.ids.default.loginToSync}- style={{+ type="transparent"+ customStyle={{+ paddingVertical: 12,+ width: '100%',flexDirection: 'row',alignItems: 'center',justifyContent: 'flex-start',- position: deviceMode !== "mobile" || announcement ? 'relative' : 'absolute',- right: 0,- top: 0,- zIndex: 100,- backgroundColor: messageBoardState.type === 'error' ? 'red' : color,- width: '100%',+ paddingHorizontal: 0,+ borderRadius:0}}><Viewstyle={{- flexDirection: 'row',+ width: 40,+ backgroundColor:+ messageBoardState.type === 'error' ? colors.red : color,+ height: 40,+ marginLeft: 10,+ borderRadius: 100,alignItems: 'center',- paddingHorizontal: 12,- paddingVertical: 5,- width: '100%',+ justifyContent: 'center',}}>- <View- style={{- borderRadius: 100,- backgroundColor: 'white',- marginRight: 5,- height: 20,- width: 20,- justifyContent: 'center',- alignItems: 'center',- ...getElevation(5),- }}>- <Icon- name={messageBoardState.icon}- size={SIZE.sm}- color={messageBoardState.type === 'error' ? 'red' : color}- />- </View>+ <Icon size={SIZE.lg} color="white" name={messageBoardState.icon} />+ </View>- <Paragraph size={SIZE.sm} color="white">+ <View+ style={{+ marginLeft: 10,+ maxWidth: '75%',+ }}>+ <Paragraph color={colors.icon} size={SIZE.xs}>+ {messageBoardState.message}+ </Paragraph>+ <Paragraph+ style={{+ maxWidth: '100%',+ }}+ color={+ messageBoardState.type === 'error' ? colors.red : color+ }>{messageBoardState.actionText}</Paragraph>+ </View>+ <View+ style={{+ width: 40,+ height: 40,+ justifyContent: 'center',+ alignItems: 'center',+ position: 'absolute',+ right: 6,+ }}><Icon- name="arrow-right"- size={SIZE.md}- color="white"- style={{- position: 'absolute',- right: 12,- }}+ name="chevron-right"+ color={+ messageBoardState.type === 'error' ? colors.red : color+ }+ size={SIZE.lg}/></View>- </TouchableOpacity>+ </PressableButton>);};diff --git a/apps/mobile/src/components/SimpleList/empty.js b/apps/mobile/src/components/SimpleList/empty.jsindex aa6e52b8d..21a2786a9 100644--- a/apps/mobile/src/components/SimpleList/empty.js+++ b/apps/mobile/src/components/SimpleList/empty.js@@ -3,8 +3,9 @@ import {ActivityIndicator, useWindowDimensions, View} from 'react-native';import {useSafeAreaInsets} from 'react-native-safe-area-context';import {useTracked} from '../../provider';import {COLORS_NOTE} from '../../utils/Colors';-import {SIZE} from '../../utils/SizeUtils';+import {normalize, SIZE} from '../../utils/SizeUtils';import {Button} from '../Button';+import {Placeholder} from '../ListPlaceholders';import Seperator from '../Seperator';import Heading from '../Typography/Heading';import Paragraph from '../Typography/Paragraph';@@ -14,6 +15,8 @@ export const Empty = ({placeholderData,absolute,headerProps,+ type,+ screen,}) => {const [state] = useTracked();const {colors} = state;@@ -37,6 +40,14 @@ export const Empty = ({justifyContent: 'center',alignItems: 'center',}}>+ <Placeholder+ color={+ COLORS_NOTE[headerProps.heading.toLowerCase()] || colors.accent+ }+ w={normalize(150)}+ h={normalize(150)}+ type={screen === 'Favorites' ? 'favorites' : type}+ /><Heading>{placeholderData.heading}</Heading><ParagraphtextBreakStrategy="balanced"diff --git a/apps/mobile/src/components/SimpleList/header.js b/apps/mobile/src/components/SimpleList/header.jsindex e942ef75e..819d300e8 100644--- a/apps/mobile/src/components/SimpleList/header.js+++ b/apps/mobile/src/components/SimpleList/header.js@@ -1,15 +1,13 @@import React from 'react';import {View} from 'react-native';import {useTracked} from '../../provider';-import {useMessageStore, useSettingStore} from '../../provider/stores';-import {DDS} from '../../services/DeviceDetection';+import {useMessageStore} from '../../provider/stores';import {COLORS_NOTE} from '../../utils/Colors';import {hexToRGBA} from '../../utils/ColorUtils';import {normalize, SIZE} from '../../utils/SizeUtils';import {Button} from '../Button';import {Placeholder} from '../ListPlaceholders';import Heading from '../Typography/Heading';-import Paragraph from '../Typography/Paragraph';import {Announcement} from './announcement';import {Card} from './card';@@ -24,16 +22,15 @@ export const Header = React.memo(shouldShow = false,icon,screen,- noAnnouncement+ noAnnouncement,}) => {const [state] = useTracked();const {colors} = state;- const announcements = useMessageStore(state => state.announcements)- const deviceMode = useSettingStore(state => state.deviceMode)+ const announcements = useMessageStore(state => state.announcements);return announcements.length > 0 && !noAnnouncement ? (<Announcement color={color || colors.accent} />- ) : type === 'search' ? null : deviceMode !== "mobile" && !shouldShow ? (+ ) : type === 'search' ? null : !shouldShow ? (<Viewstyle={{marginBottom: 5,diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.jsindex bcaf193fb..823cc5453 100644--- a/apps/mobile/src/components/SimpleList/index.js+++ b/apps/mobile/src/components/SimpleList/index.js@@ -1,21 +1,18 @@-import React, {useEffect, useRef, useState} from 'react';-import {FlatList, RefreshControl} from 'react-native';-import {useTracked} from '../../provider';-import {eSendEvent} from '../../services/EventManager';+import React, { useEffect, useRef, useState } from 'react';+import { FlatList, RefreshControl } from 'react-native';+import { useTracked } from '../../provider';+import { eSendEvent } from '../../services/EventManager';import SettingsService from '../../services/SettingsService';import Sync from '../../services/Sync';-import {COLORS_NOTE} from '../../utils/Colors';-import {eScrollEvent} from '../../utils/Events';-import useAnnouncement from '../../utils/useAnnouncement';+import { eScrollEvent } from '../../utils/Events';import JumpToDialog from '../JumpToDialog';-import {NotebookWrapper} from '../NotebookItem/wrapper';-import {NoteWrapper} from '../NoteItem/wrapper';+import { NotebookWrapper } from '../NotebookItem/wrapper';+import { NoteWrapper } from '../NoteItem/wrapper';import TagItem from '../TagItem';-import {Announcement} from './announcement';-import {Empty} from './empty';-import {Footer} from './footer';-import {Header} from './header';-import {SectionHeader} from './section-header';+import { Empty } from './empty';+import { Footer } from './footer';+import { Header } from './header';+import { SectionHeader } from './section-header';const heights = {note: 100,@@ -165,6 +162,8 @@ const SimpleList = ({loading={loading || _loading}placeholderData={placeholderData}headerProps={headerProps}+ type={type}+ screen={screen}/>}ListFooterComponent={<Footer />}diff --git a/apps/mobile/src/components/SimpleList/sectionheader.js b/apps/mobile/src/components/SimpleList/sectionheader.jsindex 7a02b5281..895a4eef2 100644--- a/apps/mobile/src/components/SimpleList/sectionheader.js+++ b/apps/mobile/src/components/SimpleList/sectionheader.js@@ -26,13 +26,8 @@ export const SectionHeader = ({width: '100%',justifyContent: 'space-between',paddingHorizontal: 12,- height: 30 * fontScale,- backgroundColor:- index === 0- ? headerProps.color- ? colors[headerProps.color]- : colors.shade- : colors.nav,+ height: 35 * fontScale,+ backgroundColor: colors.nav,marginTop: index === 0 ? 0 : 5 * fontScale,}}><TouchableOpacitydiff --git a/apps/mobile/src/views/Notebook/index.js b/apps/mobile/src/views/Notebook/index.jsindex 0cbcae4dd..82828cedd 100644--- a/apps/mobile/src/views/Notebook/index.js+++ b/apps/mobile/src/views/Notebook/index.js@@ -116,6 +116,13 @@ export const Notebook = ({route, navigation}) => {isBack={!params.menu}screen="Notebook"action={_onPressBottomButton}+ rightButtons={[+ {+ icon: 'pencil',+ title: 'Edit notebook',+ func: () => eSendEvent(eOpenAddNotebookDialog, params.notebook),+ },+ ]}/></ContainerTopSection><SimpleListdiff --git a/apps/mobile/src/views/Notes/index.js b/apps/mobile/src/views/Notes/index.jsindex 22dd9a720..ba38b9d99 100644--- a/apps/mobile/src/views/Notes/index.js+++ b/apps/mobile/src/views/Notes/index.js@@ -221,7 +221,7 @@ export const Notes = ({route, navigation}) => {? 'Learn about monographs': 'Add your first Note',action: _onPressBottomButton,- buttonIcon: 'information-outline',+ buttonIcon: params.get === 'monographs' ? 'information-outline' : null,loading:params.get === 'monographs'? 'Loading published notes'@@ -230,6 +230,20 @@ export const Notes = ({route, navigation}) => {const isFocused = () => navigation.isFocused();+ const headerRightButtons = [+ {+ icon: 'pencil',+ title: 'Edit topic',+ func: () => {+ if (route.params.type !== 'topic') return;+ eSendEvent(eOpenAddTopicDialog, {+ notebookId: route.params.notebookId,+ toEdit: route.params,+ });+ },+ },+ ];+return (<><SelectionHeader@@ -246,6 +260,9 @@ export const Notes = ({route, navigation}) => {isBack={!params.menu}screen="NotesPage"action={_onPressBottomButton}+ rightButtons={+ route.params.type !== 'topic' ? null : headerRightButtons+ }/></ContainerTopSection><SimpleListdiff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.jsindex dd5b3ce90..13a6a63d5 100644--- a/apps/mobile/src/views/Settings/index.js+++ b/apps/mobile/src/views/Settings/index.js@@ -4,7 +4,7 @@ import React, {useCallback,useEffect,useRef,- useState,+ useState} from 'react';import {Appearance,@@ -12,44 +12,43 @@ import {Platform,ScrollView,TouchableOpacity,- View,+ View} from 'react-native';import * as RNIap from 'react-native-iap';-import {enabled} from 'react-native-privacy-snapshot';-import Menu, {MenuItem} from 'react-native-reanimated-material-menu';+import { enabled } from 'react-native-privacy-snapshot';+import Menu, { MenuItem } from 'react-native-reanimated-material-menu';import AnimatedProgress from 'react-native-reanimated-progress-bar';import Icon from 'react-native-vector-icons/MaterialCommunityIcons';import ToggleSwitch from 'toggle-switch-react-native';-import {Button} from '../../components/Button';-import {ContainerTopSection} from '../../components/Container/ContainerTopSection';+import { Button } from '../../components/Button';+import { ContainerTopSection } from '../../components/Container/ContainerTopSection';import BaseDialog from '../../components/Dialog/base-dialog';import DialogButtons from '../../components/Dialog/dialog-buttons';import DialogContainer from '../../components/Dialog/dialog-container';import DialogHeader from '../../components/Dialog/dialog-header';-import {Header as TopHeader} from '../../components/Header/index';+import { Header as TopHeader } from '../../components/Header/index';import Input from '../../components/Input';-import {PressableButton} from '../../components/PressableButton';+import { PressableButton } from '../../components/PressableButton';import Seperator from '../../components/Seperator';-import {Header} from '../../components/SimpleList/header';-import {Toast} from '../../components/Toast';+import { Toast } from '../../components/Toast';import Heading from '../../components/Typography/Heading';import Paragraph from '../../components/Typography/Paragraph';-import {useTracked} from '../../provider';-import {Actions} from '../../provider/Actions';+import { useTracked } from '../../provider';+import { Actions } from '../../provider/Actions';import {useMessageStore,useSettingStore,- useUserStore,+ useUserStore} from '../../provider/stores';import Backup from '../../services/Backup';import BiometricService from '../../services/BiometricService';-import {DDS} from '../../services/DeviceDetection';+import { DDS } from '../../services/DeviceDetection';import {eSendEvent,eSubscribeEvent,eUnSubscribeEvent,openVault,- ToastEvent,+ ToastEvent} from '../../services/EventManager';import Navigation from '../../services/Navigation';import PremiumService from '../../services/PremiumService';@@ -63,17 +62,17 @@ import {preloadImages,SUBSCRIPTION_PROVIDER,SUBSCRIPTION_STATUS,- SUBSCRIPTION_STATUS_STRINGS,+ SUBSCRIPTION_STATUS_STRINGS} from '../../utils';import {ACCENT,COLOR_SCHEME,COLOR_SCHEME_DARK,COLOR_SCHEME_LIGHT,- setColorScheme,+ setColorScheme} from '../../utils/Colors';-import {hexToRGBA, RGB_Linear_Shade} from '../../utils/ColorUtils';-import {db} from '../../utils/DB';+import { hexToRGBA, RGB_Linear_Shade } from '../../utils/ColorUtils';+import { db } from '../../utils/DB';import {eCloseProgressDialog,eOpenLoginDialog,@@ -82,14 +81,14 @@ import {eOpenRecoveryKeyDialog,eOpenRestoreDialog,eScrollEvent,- eUpdateSearchState,+ eUpdateSearchState} from '../../utils/Events';-import {openLinkInBrowser} from '../../utils/functions';-import {MMKV} from '../../utils/mmkv';-import {tabBarRef} from '../../utils/Refs';-import {pv, SIZE} from '../../utils/SizeUtils';+import { openLinkInBrowser } from '../../utils/functions';+import { MMKV } from '../../utils/mmkv';+import { tabBarRef } from '../../utils/Refs';+import { pv, SIZE } from '../../utils/SizeUtils';import Storage from '../../utils/storage';-import {sleep} from '../../utils/TimeUtils';+import { sleep } from '../../utils/TimeUtils';let menuRef = createRef();@@ -1221,7 +1220,7 @@ const SettingsAppearanceSection = () => {'#FF5722','#FFA000','#1B5E20',- '#01c352',+ '#00c853','#757575','#0560ff','#009688',@@ -1257,11 +1256,11 @@ const SettingsAppearanceSection = () => {flexDirection: 'row',justifyContent: 'center',alignItems: 'center',- marginVertical: 5,- marginHorizontal: 5,+ marginRight: 10,+ marginVertical:5,width: DDS.isLargeTablet() ? 40 : 50,height: DDS.isLargeTablet() ? 40 : 50,- borderRadius: 100,+ borderRadius:100,}}>{colors.accent === item ? (<Icon