minor ui updates

This commit is contained in:
ammarahm-ed
2020-12-19 15:51:07 +05:00
parent 93a03e0aba
commit 8e43680b98
6 changed files with 52 additions and 30 deletions

View File

@@ -355,7 +355,19 @@ const LoginDialog = () => {
height: 50,
}}>
{DDS.isLargeTablet() ? (
<View />
<ActionIcon
name="close"
size={SIZE.xxxl}
onPress={() => {
close();
}}
customStyle={{
width: 40,
height: 40,
marginLeft: -5,
}}
color={colors.heading}
/>
) : (
<ActionIcon
name="arrow-left"
@@ -387,7 +399,7 @@ const LoginDialog = () => {
<View
style={{
paddingHorizontal: 12,
paddingHorizontal:12,
paddingTop: 12,
}}>
{mode === MODES.changePassword ? null : (

View File

@@ -95,7 +95,6 @@ const ColorItem = ({item, index}) => {
<View
style={{
width: 30,
height: 30,
justifyContent: 'center',
alignItems: 'flex-start',
}}>

View File

@@ -4,7 +4,7 @@ import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {useTracked} from '../../provider';
import {eSubscribeEvent, eUnSubscribeEvent} from '../../services/EventManager';
import Navigation from '../../services/Navigation';
import {getElevation} from '../../utils';
import { getElevation } from '../../utils';
import {SIZE} from '../../utils/SizeUtils';
import {PressableButton} from '../PressableButton';
import Heading from '../Typography/Heading';
@@ -64,7 +64,7 @@ export const MenuListItem = ({item, index, noTextMode, testID}) => {
paddingHorizontal: 8,
justifyContent: 'space-between',
alignItems: 'center',
height: 40,
height: 45,
}}>
<View
style={{
@@ -73,7 +73,7 @@ export const MenuListItem = ({item, index, noTextMode, testID}) => {
}}>
<Icon
style={{
minWidth: 30,
width: 30,
textAlignVertical: 'center',
textAlign: 'left',
}}
@@ -106,7 +106,7 @@ export const MenuListItem = ({item, index, noTextMode, testID}) => {
width: 7,
height: 7,
borderRadius: 100,
...getElevation(5),
...getElevation(5)
}}
/>
)}

View File

@@ -173,17 +173,17 @@ const PinItem = ({item, index, onPress}) => {
width: '100%',
borderRadius: 0,
paddingHorizontal: 10,
minHeight: 40,
minHeight: 50,
}}>
<View
style={{
flexDirection: 'row',
alignItems: 'center',
flexGrow: 1,
}}>
<View
style={{
width: 30,
height: 30,
justifyContent: 'center',
alignItems: 'flex-start',
}}>
@@ -203,13 +203,25 @@ const PinItem = ({item, index, onPress}) => {
<View
style={{
alignItems: 'flex-start',
width: '75%',
}}>
{headerTextState?.id === item.id ? (
<Heading color={colors.heading} size={SIZE.md}>
<Heading
style={{
flexWrap: 'wrap',
}}
color={colors.heading}
size={SIZE.md}>
{item.title}
</Heading>
) : (
<Paragraph color={colors.heading} size={SIZE.md}>
<Paragraph
style={{
flexWrap: 'wrap',
}}
color={colors.heading}
size={SIZE.md}>
{item.title}
</Paragraph>
)}

View File

@@ -1,23 +1,22 @@
import React from 'react';
import {ActivityIndicator, TouchableOpacity, View} from 'react-native';
import { ActivityIndicator, TouchableOpacity, View } from 'react-native';
import Icon from 'react-native-vector-icons/MaterialCommunityIcons';
import {useTracked} from '../../provider';
import {Actions} from '../../provider/Actions';
import {DDS} from '../../services/DeviceDetection';
import {eSendEvent, ToastEvent} from '../../services/EventManager';
import {getElevation, SUBSCRIPTION_STATUS_STRINGS} from '../../utils';
import {db} from '../../utils/DB';
import {eOpenLoginDialog} from '../../utils/Events';
import {pv, SIZE} from '../../utils/SizeUtils';
import {PressableButton} from '../PressableButton';
import { useTracked } from '../../provider';
import { Actions } from '../../provider/Actions';
import { DDS } from '../../services/DeviceDetection';
import { eSendEvent, ToastEvent } from '../../services/EventManager';
import { db } from '../../utils/DB';
import { eOpenLoginDialog } from '../../utils/Events';
import { pv, SIZE } from '../../utils/SizeUtils';
import { PressableButton } from '../PressableButton';
import Paragraph from '../Typography/Paragraph';
import {TimeSince} from './TimeSince';
import { TimeSince } from './TimeSince';
export const UserSection = ({noTextMode}) => {
const [state, dispatch] = useTracked();
const {colors, syncing, user} = state;
return !user && !user?.email ? (
return user && user?.email ? (
<View
style={{
width: '100%',

View File

@@ -37,11 +37,11 @@ const correction = (size, multiplier) => {
return size * multiplier;
} else if (dSize > 7.2 && dSize <= 8.5 && DDS.isTab) {
return size * 0.9;
} else if (dSize > 8.5 && dSize <= 9.8 && DDS.isTab) {
} else if (dSize > 8.5 && dSize <= 9.2 && DDS.isTab) {
return size * 0.78;
} else if (dSize > 9.2) {
return size * 0.8;
} else if (dSize > 9.8) {
return size * 0.85;
} else {
return size;
}
@@ -61,8 +61,8 @@ export const normalize = (size) => {
}
};
export const SIZE = {
xxs: 9 * scale.fontScale,
xs: 11 * scale.fontScale,
xxs: normalize(9) * scale.fontScale,
xs: normalize(10.5) * scale.fontScale,
sm: normalize(12.5) * scale.fontScale,
md: normalize(15) * scale.fontScale,
lg: normalize(21) * scale.fontScale,
@@ -72,8 +72,8 @@ export const SIZE = {
};
export function updateSize() {
SIZE.xxs = 9 * scale.fontScale;
SIZE.xs = 10 * scale.fontScale;
SIZE.xxs = normalize(9) * scale.fontScale;
SIZE.xs = normalize(10.5) * scale.fontScale;
SIZE.sm = normalize(12.5) * scale.fontScale;
SIZE.md = normalize(15) * scale.fontScale;
SIZE.lg = normalize(21) * scale.fontScale;