mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 08:24:55 +00:00
ui changes
This commit is contained in:
@ -3,12 +3,13 @@ import React, {useState} from "react";
|
|||||||
import {Button, Text, TextField, View} from "react-native-ui-lib";
|
import {Button, Text, TextField, View} from "react-native-ui-lib";
|
||||||
import DumpList from "./DumpList";
|
import DumpList from "./DumpList";
|
||||||
import HeaderTemplate from "@/components/shared/HeaderTemplate";
|
import HeaderTemplate from "@/components/shared/HeaderTemplate";
|
||||||
import {Feather, MaterialIcons} from "@expo/vector-icons";
|
import {Feather} from "@expo/vector-icons";
|
||||||
import AddBrainDump from "./AddBrainDump";
|
import AddBrainDump from "./AddBrainDump";
|
||||||
import LinearGradient from "react-native-linear-gradient";
|
import LinearGradient from "react-native-linear-gradient";
|
||||||
import PlusIcon from "@/assets/svgs/PlusIcon";
|
import PlusIcon from "@/assets/svgs/PlusIcon";
|
||||||
import * as Device from 'expo-device'
|
import * as Device from 'expo-device'
|
||||||
import {DeviceType} from 'expo-device'
|
import {DeviceType} from 'expo-device'
|
||||||
|
|
||||||
const BrainDumpPage = () => {
|
const BrainDumpPage = () => {
|
||||||
const [searchText, setSearchText] = useState<string>("");
|
const [searchText, setSearchText] = useState<string>("");
|
||||||
const [isAddVisible, setIsAddVisible] = useState<boolean>(false);
|
const [isAddVisible, setIsAddVisible] = useState<boolean>(false);
|
||||||
@ -21,7 +22,7 @@ const BrainDumpPage = () => {
|
|||||||
showsVerticalScrollIndicator={false}
|
showsVerticalScrollIndicator={false}
|
||||||
showsHorizontalScrollIndicator={false}
|
showsHorizontalScrollIndicator={false}
|
||||||
>
|
>
|
||||||
<View marginH-25 style={isTablet ? {alignItems: 'center'} : undefined}>
|
<View marginH-25 marginT-20 style={isTablet ? {alignItems: 'center'} : undefined}>
|
||||||
<HeaderTemplate
|
<HeaderTemplate
|
||||||
message={"Welcome to your notes!"}
|
message={"Welcome to your notes!"}
|
||||||
isWelcome={false}
|
isWelcome={false}
|
||||||
@ -117,6 +118,8 @@ const styles = StyleSheet.create({
|
|||||||
height: 42,
|
height: 42,
|
||||||
paddingLeft: 10,
|
paddingLeft: 10,
|
||||||
marginVertical: 20,
|
marginVertical: 20,
|
||||||
|
marginTop: 30,
|
||||||
|
boxShadow: 'inset 0px 0px 37px 0px rgba(239,238,237,1)',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ const BrainDumpItem = (props: { item: IBrainDump }) => {
|
|||||||
marginV-5
|
marginV-5
|
||||||
paddingH-13
|
paddingH-13
|
||||||
paddingV-10
|
paddingV-10
|
||||||
style={{ borderRadius: 15, elevation: 2 }}
|
style={{ borderRadius: 15, elevation: 0 }}
|
||||||
>
|
>
|
||||||
<Text
|
<Text
|
||||||
text70B
|
text70B
|
||||||
|
|||||||
@ -422,7 +422,7 @@ export const ManuallyAddEventModal = () => {
|
|||||||
is24Hour={profileData?.userType === ProfileType.PARENT ? false : true}
|
is24Hour={profileData?.userType === ProfileType.PARENT ? false : true}
|
||||||
onChange={(time) => {
|
onChange={(time) => {
|
||||||
if (endDate.getDate() === startDate.getDate() &&
|
if (endDate.getDate() === startDate.getDate() &&
|
||||||
time.getHours() >= endTime.getHours())
|
time.getHours() >= endTime.getHours() && time.getMinutes() >= endTime.getHours())
|
||||||
{
|
{
|
||||||
const newEndDate = new Date(endDate);
|
const newEndDate = new Date(endDate);
|
||||||
|
|
||||||
@ -435,7 +435,7 @@ export const ManuallyAddEventModal = () => {
|
|||||||
}}
|
}}
|
||||||
minuteInterval={5}
|
minuteInterval={5}
|
||||||
mode="time"
|
mode="time"
|
||||||
timeFormat={profileData?.userType === ProfileType.PARENT ? "hh:mm" : "HH:mm"}
|
timeFormat={profileData?.userType === ProfileType.PARENT ? "hh:mm A" : "HH:mm A"}
|
||||||
style={[styles.timePicker]}
|
style={[styles.timePicker]}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
@ -461,7 +461,8 @@ export const ManuallyAddEventModal = () => {
|
|||||||
setEndTime(time);
|
setEndTime(time);
|
||||||
if (
|
if (
|
||||||
endDate.getDate() === startDate.getDate() &&
|
endDate.getDate() === startDate.getDate() &&
|
||||||
time.getHours() < startTime.getHours()
|
time.getHours() <= startTime.getHours() &&
|
||||||
|
time.getMinutes() <= startTime.getMinutes()
|
||||||
) {
|
) {
|
||||||
const newEndDate = new Date(endDate);
|
const newEndDate = new Date(endDate);
|
||||||
newEndDate.setDate(newEndDate.getDate() + 1);
|
newEndDate.setDate(newEndDate.getDate() + 1);
|
||||||
@ -470,7 +471,7 @@ export const ManuallyAddEventModal = () => {
|
|||||||
}}
|
}}
|
||||||
minuteInterval={5}
|
minuteInterval={5}
|
||||||
mode="time"
|
mode="time"
|
||||||
timeFormat={profileData?.userType === ProfileType.PARENT ? "hh:mm" : "HH:mm"}
|
timeFormat={profileData?.userType === ProfileType.PARENT ? "hh:mm A" : "HH:mm A"}
|
||||||
style={[styles.timePicker]}
|
style={[styles.timePicker]}
|
||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@ -327,10 +327,15 @@ const ToDosList = ({ isSettings, members }: { isSettings?: boolean, members?: Ar
|
|||||||
style={{ marginRight: 8 }}
|
style={{ marginRight: 8 }}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
renderItem={(item) => {
|
renderItem={(item, selected) => {
|
||||||
return (
|
return (
|
||||||
<View height={36.02} centerV>
|
<View height={36.02} centerV>
|
||||||
<Text style={styles.itemText}>{item.label}</Text>
|
<Text style={[
|
||||||
|
styles.itemText,
|
||||||
|
selected && { color: 'white' }
|
||||||
|
]}>
|
||||||
|
{item.label}
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user