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
fix ui of color notes page
ammarahm-ed380315468c7a
diff --git a/apps/mobile/src/components/SimpleList/ListHeaderComponent.js b/apps/mobile/src/components/SimpleList/ListHeaderComponent.jsindex b1726d10a..a5627b2b0 100644--- a/apps/mobile/src/components/SimpleList/ListHeaderComponent.js+++ b/apps/mobile/src/components/SimpleList/ListHeaderComponent.js@@ -26,6 +26,7 @@ export const ListHeaderComponent = ({const [state] = useTracked();const {colors, headerTextState, currentScreen} = state;+ console.log(headerTextState)return type === 'search' ? null : DDS.isLargeTablet() && !shouldShow ? (<Viewstyle={{@@ -45,8 +46,8 @@ export const ListHeaderComponent = ({marginBottom: 5,padding: 12,width: '100%',- backgroundColor: COLORS_NOTE[currentScreen]- ? hexToRGBA(COLORS_NOTE[currentScreen], 0.15)+ backgroundColor: COLORS_NOTE[headerTextState.heading.toLowerCase()]+ ? hexToRGBA(COLORS_NOTE[headerTextState.heading.toLowerCase()], 0.15): color || colors.shade,}}>{messageCard && <MessageCard />}@@ -61,7 +62,7 @@ export const ListHeaderComponent = ({position: 'absolute',}}><Placeholder- color={COLORS_NOTE[currentScreen]}+ color={COLORS_NOTE[headerTextState.heading.toLowerCase()]}w={normalize(150)}h={normalize(150)}type={type}diff --git a/apps/mobile/src/components/SimpleList/MessageCard.js b/apps/mobile/src/components/SimpleList/MessageCard.jsindex 92bfb32a8..a01ef9881 100644--- a/apps/mobile/src/components/SimpleList/MessageCard.js+++ b/apps/mobile/src/components/SimpleList/MessageCard.js@@ -10,7 +10,7 @@ import Paragraph from '../Typography/Paragraph';export const MessageCard = ({data}) => {const [state] = useTracked();- const {colors, selectionMode, currentScreen, messageBoardState} = state;+ const {colors, selectionMode, currentScreen, messageBoardState,headerTextState} = state;return (<View>@@ -34,8 +34,8 @@ export const MessageCard = ({data}) => {}}><Paragraphcolor={- COLORS_NOTE[currentScreen]- ? COLORS_NOTE[currentScreen]+ COLORS_NOTE[headerTextState.heading.toLowerCase()]+ ? COLORS_NOTE[headerTextState.heading.toLowerCase()]: colors.accent}style={{@@ -48,8 +48,8 @@ export const MessageCard = ({data}) => {name="arrow-right"size={SIZE.sm}color={- COLORS_NOTE[currentScreen]- ? COLORS_NOTE[currentScreen]+ COLORS_NOTE[headerTextState.heading.toLowerCase()]+ ? COLORS_NOTE[headerTextState.heading.toLowerCase()]: colors.accent}/>diff --git a/apps/mobile/src/components/SimpleList/index.js b/apps/mobile/src/components/SimpleList/index.jsindex adbd6b5aa..35664844d 100644--- a/apps/mobile/src/components/SimpleList/index.js+++ b/apps/mobile/src/components/SimpleList/index.js@@ -49,7 +49,7 @@ const SimpleList = ({loading,}) => {const [state, dispatch] = useTracked();- const {colors, searchResults} = state;+ const {colors, searchResults,headerTextState} = state;const [refreshing, setRefreshing] = useState(false);const [dataProvider, setDataProvider] = useState(new DataProvider((r1, r2) => {@@ -73,9 +73,10 @@ const SimpleList = ({}, [listData, searchResults.results]);const loadData = () => {- if (listData || listData.length === 0) {- setDataProvider(dataProvider.cloneWithRows([header, ...listData]));- }+ let mainData = [header, {type: 'empty'}];+ mainData =+ !listData || listData.length === 0 ? mainData : [header, ...listData];+ setDataProvider(dataProvider.cloneWithRows(mainData));};const RenderSectionHeader = ({item, index}) => (@@ -179,8 +180,10 @@ const SimpleList = ({onPress={placeholderData.action}title={placeholderData.button}icon="plus"- type="transparent"+ type="accent"fontSize={SIZE.md}+ accentColor="bg"+ accentText={headerTextState.heading.toLowerCase() || "accent"}/>) : loading ? (<ActivityIndicator color={colors.accent} />