Skip to content

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

fix header ui

ammarahm-ed2145f2067380
diff --git a/apps/mobile/src/components/SimpleList/ListHeaderComponent.js b/apps/mobile/src/components/SimpleList/ListHeaderComponent.js
index e4077ede6..7a2ffa5c4 100644
--- a/apps/mobile/src/components/SimpleList/ListHeaderComponent.js
+++ b/apps/mobile/src/components/SimpleList/ListHeaderComponent.js
@@ -40,59 +40,62 @@ export const ListHeaderComponent = ({
) : (
<View
style={{
- minHeight: 195,
- padding: 12,
width: '100%',
- backgroundColor: COLORS_NOTE[title.toLowerCase()]
- ? hexToRGBA(COLORS_NOTE[title.toLowerCase()], 0.15)
- : color || colors.shade,
}}>
{messageCard && (
<MessageCard
color={COLORS_NOTE[title.toLowerCase()] || colors.accent}
/>
)}
-
- <View
- style={{
- right: 0,
- paddingRight: 12,
- opacity: 0.5,
- bottom: 0,
- paddingHorizontal: 12,
- position: 'absolute',
- }}>
- <Placeholder
- color={COLORS_NOTE[title.toLowerCase()] || colors.accent}
- w={normalize(150)}
- h={normalize(150)}
- type={type}
- />
- </View>
<View
style={{
- position: 'absolute',
- bottom: 0,
- paddingHorizontal: 12,
- paddingBottom: 12,
+ minHeight: 195,
+ padding: 12,
+ width: '100%',
+ zIndex: 10,
+ justifyContent: 'flex-end',
+ backgroundColor: COLORS_NOTE[title.toLowerCase()]
+ ? hexToRGBA(COLORS_NOTE[title.toLowerCase()], 0.15)
+ : color || colors.shade,
}}>
- <Heading
- style={{marginBottom: paragraph ? -10 : 0}}
- size={SIZE.xxxl * 1.5}>
- <Heading size={SIZE.xxxl * 1.5} color={colors.accent}>
- {title.slice(0, 1) === '#' ? '#' : null}
- </Heading>
+ <View
+ style={{
+ right: 0,
+ paddingRight: 12,
+ opacity: 0.5,
+ bottom: 0,
+ paddingHorizontal: 12,
+ position: 'absolute',
+ }}>
+ <Placeholder
+ color={COLORS_NOTE[title.toLowerCase()] || colors.accent}
+ w={normalize(150)}
+ h={normalize(150)}
+ type={type}
+ />
+ </View>
+ <View
+ style={{
+ marginTop: 15,
+ }}>
+ <Heading
+ style={{marginBottom: paragraph ? -10 : 0}}
+ size={SIZE.xxxl * 1.5}>
+ <Heading size={SIZE.xxxl * 1.5} color={colors.accent}>
+ {title.slice(0, 1) === '#' ? '#' : null}
+ </Heading>
- {title.slice(0, 1) === '#' ? title.slice(1) : title}
- </Heading>
- {paragraph && (
- <Paragraph color={colors.icon}>
- {'\n'}or
- <Paragraph onPress={onPress} color={colors.accent}>
- {' ' + paragraph}
+ {title.slice(0, 1) === '#' ? title.slice(1) : title}
+ </Heading>
+ {paragraph && (
+ <Paragraph color={colors.icon}>
+ {'\n'}or
+ <Paragraph onPress={onPress} color={colors.accent}>
+ {' ' + paragraph}
+ </Paragraph>
</Paragraph>
- </Paragraph>
- )}
+ )}
+ </View>
</View>
</View>
);
diff --git a/apps/mobile/src/components/SimpleList/MessageCard.js b/apps/mobile/src/components/SimpleList/MessageCard.js
index d3d63d638..a8ce961d9 100644
--- a/apps/mobile/src/components/SimpleList/MessageCard.js
+++ b/apps/mobile/src/components/SimpleList/MessageCard.js
@@ -1,53 +1,45 @@
import React from 'react';
-import {Text, TouchableOpacity, View} from 'react-native';
+import { TouchableOpacity, View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import { notesnook } from '../../../e2e/test.ids';
-import {useTracked} from '../../provider';
-import {DDS} from '../../services/DeviceDetection';
-import {COLORS_NOTE} from '../../utils/Colors';
-import {SIZE} from '../../utils/SizeUtils';
+import { useTracked } from '../../provider';
+import { DDS } from '../../services/DeviceDetection';
+import { SIZE } from '../../utils/SizeUtils';
import Paragraph from '../Typography/Paragraph';
-export const MessageCard = ({data,color}) => {
+export const MessageCard = ({data, color}) => {
const [state] = useTracked();
- const {colors, selectionMode, messageBoardState,headerTextState} = state;
+ const {selectionMode, messageBoardState} = state;
- return (
- <View>
- {!messageBoardState.visible || selectionMode ? null : (
- <TouchableOpacity
- activeOpacity={0.7}
- onPress={messageBoardState.onPress}
- testID={notesnook.ids.default.loginToSync}
+ return !messageBoardState.visible || selectionMode ? null : (
+ <TouchableOpacity
+ activeOpacity={0.7}
+ onPress={messageBoardState.onPress}
+ testID={notesnook.ids.default.loginToSync}
+ style={{
+ flexDirection: 'row',
+ alignItems: 'center',
+ justifyContent: 'flex-start',
+ position: DDS.isLargeTablet() ? 'relative' : 'absolute',
+ right: 10,
+ top: 10,
+ zIndex:999
+ }}>
+ <View
+ style={{
+ flexDirection: 'row',
+ alignItems: 'center',
+ }}>
+ <Paragraph
+ color={color}
style={{
- flexDirection: 'row',
- alignItems: 'center',
- justifyContent: 'flex-start',
- position: DDS.isLargeTablet() ? 'relative' : 'absolute',
- right: 0,
- top: 0,
+ marginRight: 10,
}}>
- <View
- style={{
- flexDirection: 'row',
- alignItems: 'center',
- }}>
- <Paragraph
- color={color}
- style={{
- marginRight: 10,
- }}>
- {messageBoardState.actionText}
- </Paragraph>
+ {messageBoardState.actionText}
+ </Paragraph>
- <Icon
- name="arrow-right"
- size={SIZE.sm}
- color={color}
- />
- </View>
- </TouchableOpacity>
- )}
- </View>
+ <Icon name="arrow-right" size={SIZE.sm} color={color} />
+ </View>
+ </TouchableOpacity>
);
};