Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

add new header for tablet mode

ammarahm-ed29def63c2b67
diff --git a/apps/mobile/src/components/SimpleList/ListHeaderComponent.js b/apps/mobile/src/components/SimpleList/ListHeaderComponent.js
index fc0fb5a25..41e0e649a 100644
--- a/apps/mobile/src/components/SimpleList/ListHeaderComponent.js
+++ b/apps/mobile/src/components/SimpleList/ListHeaderComponent.js
@@ -2,6 +2,7 @@ import React, {useEffect} from 'react';
import {Text, View} from 'react-native';
import Animated from 'react-native-reanimated';
import {useTracked} from '../../provider';
+import {DDS} from '../../services/DeviceDetection';
import {eSubscribeEvent, eUnSubscribeEvent} from '../../services/EventManager';
import {COLORS_NOTE} from '../../utils/Colors';
import {hexToRGBA} from '../../utils/ColorUtils';
@@ -20,6 +21,7 @@ export const ListHeaderComponent = ({
paragraph,
color,
onPress,
+ shouldShow = false,
}) => {
const [state] = useTracked();
const {colors, headerTextState, currentScreen} = state;
@@ -42,7 +44,19 @@ export const ListHeaderComponent = ({
};
}, []);
*/
- return type === 'search' ? null : (
+ return type === 'search' ? null : DDS.isLargeTablet() && !shouldShow ? (
+ <View
+ style={{
+ minHeight: 50,
+ marginBottom: 5,
+ padding: 12,
+ width: '100%',
+ justifyContent: 'center',
+ alignItems: 'center',
+ }}>
+ {messageCard && <MessageCard />}
+ </View>
+ ) : (
<View
style={{
minHeight: 195,
@@ -55,11 +69,6 @@ export const ListHeaderComponent = ({
}}>
{messageCard && <MessageCard />}
- {/* <Icon style={{
- position:'absolute',
- right:0,
- }} name="home" color={colors.bg} size={SIZE.xxxl * 4} /> */}
-
<View
style={{
right: 0,
@@ -87,12 +96,9 @@ export const ListHeaderComponent = ({
style={{marginBottom: paragraph ? -10 : 0}}
size={SIZE.xxxl * 1.5}
color={headerTextState.color}>
- <Text
- style={{
- color: colors.accent,
- }}>
+ <Heading size={SIZE.xxxl * 1.5} color={colors.accent}>
{headerTextState.heading.slice(0, 1) === '#' ? '#' : null}
- </Text>
+ </Heading>
{title
? title
@@ -104,7 +110,7 @@ export const ListHeaderComponent = ({
<Paragraph color={colors.icon}>
{'\n'}or
<Paragraph onPress={onPress} color={colors.accent}>
- {" " + paragraph}
+ {' ' + paragraph}
</Paragraph>
</Paragraph>
)}