mirror of
https://github.com/urosran/cally.git
synced 2025-07-20 12:05:11 +00:00
Phone header fix
This commit is contained in:
@ -101,7 +101,7 @@ export default function TabLayout() {
|
|||||||
lazy: true,
|
lazy: true,
|
||||||
headerShown: true,
|
headerShown: true,
|
||||||
headerTitleAlign:
|
headerTitleAlign:
|
||||||
Device.deviceType === DeviceType.TABLET ? "left" : "center",
|
Device.deviceType === DeviceType.TABLET ? "left" : "unaligned",
|
||||||
headerTitle: ({ children }) => {
|
headerTitle: ({ children }) => {
|
||||||
const isCalendarRoute = ["calendar", "index"].includes(route.name);
|
const isCalendarRoute = ["calendar", "index"].includes(route.name);
|
||||||
|
|
||||||
|
@ -8,7 +8,6 @@ import {modeAtom, selectedDateAtom} from "@/components/pages/calendar/atoms";
|
|||||||
import {format, isSameDay} from "date-fns";
|
import {format, isSameDay} from "date-fns";
|
||||||
import * as Device from "expo-device";
|
import * as Device from "expo-device";
|
||||||
import {Mode} from "react-native-big-calendar";
|
import {Mode} from "react-native-big-calendar";
|
||||||
import { FontAwesome5 } from '@expo/vector-icons';
|
|
||||||
|
|
||||||
export const CalendarHeader = memo(() => {
|
export const CalendarHeader = memo(() => {
|
||||||
const [selectedDate, setSelectedDate] = useAtom(selectedDateAtom);
|
const [selectedDate, setSelectedDate] = useAtom(selectedDateAtom);
|
||||||
@ -48,17 +47,25 @@ export const CalendarHeader = memo(() => {
|
|||||||
const getInitialIndex = () => {
|
const getInitialIndex = () => {
|
||||||
if (isTablet) {
|
if (isTablet) {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case "day": return 0;
|
case "day":
|
||||||
case "week": return 1;
|
return 0;
|
||||||
case "month": return 2;
|
case "week":
|
||||||
default: return 1;
|
return 1;
|
||||||
|
case "month":
|
||||||
|
return 2;
|
||||||
|
default:
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case "day": return 0;
|
case "day":
|
||||||
case "3days": return 1;
|
return 0;
|
||||||
case "month": return 2;
|
case "3days":
|
||||||
default: return 1;
|
return 1;
|
||||||
|
case "month":
|
||||||
|
return 2;
|
||||||
|
default:
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -70,7 +77,7 @@ export const CalendarHeader = memo(() => {
|
|||||||
justifyContent: "space-between",
|
justifyContent: "space-between",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
paddingHorizontal: 10,
|
paddingHorizontal: 10,
|
||||||
paddingVertical: 8,
|
paddingVertical: isTablet ? 8 : 0,
|
||||||
borderRadius: 20,
|
borderRadius: 20,
|
||||||
borderBottomLeftRadius: 0,
|
borderBottomLeftRadius: 0,
|
||||||
borderBottomRightRadius: 0,
|
borderBottomRightRadius: 0,
|
||||||
@ -79,9 +86,11 @@ export const CalendarHeader = memo(() => {
|
|||||||
centerV
|
centerV
|
||||||
>
|
>
|
||||||
<View row centerV gap-3>
|
<View row centerV gap-3>
|
||||||
<Text style={{fontFamily: "Manrope_500Medium", fontSize: 17}}>
|
{isTablet && (
|
||||||
{selectedDate.getFullYear()}
|
<Text style={{fontFamily: "Manrope_500Medium", fontSize: 17}}>
|
||||||
</Text>
|
{selectedDate.getFullYear()}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
<Picker
|
<Picker
|
||||||
value={months[selectedDate.getMonth()]}
|
value={months[selectedDate.getMonth()]}
|
||||||
placeholder={"Select Month"}
|
placeholder={"Select Month"}
|
||||||
@ -108,7 +117,7 @@ export const CalendarHeader = memo(() => {
|
|||||||
style={styles.todayButton}
|
style={styles.todayButton}
|
||||||
onPress={() => setSelectedDate(new Date())}
|
onPress={() => setSelectedDate(new Date())}
|
||||||
>
|
>
|
||||||
<MaterialIcons name="calendar-today" size={30} color="#5f6368" />
|
<MaterialIcons name="calendar-today" size={30} color="#5f6368"/>
|
||||||
<Text style={styles.todayDate}>{format(new Date(), "d")}</Text>
|
<Text style={styles.todayDate}>{format(new Date(), "d")}</Text>
|
||||||
</Button>
|
</Button>
|
||||||
<View>
|
<View>
|
||||||
|
@ -307,7 +307,6 @@
|
|||||||
);
|
);
|
||||||
inputPaths = (
|
inputPaths = (
|
||||||
"${PODS_ROOT}/Target Support Files/Pods-Cally/Pods-Cally-resources.sh",
|
"${PODS_ROOT}/Target Support Files/Pods-Cally/Pods-Cally-resources.sh",
|
||||||
"${PODS_CONFIGURATION_BUILD_DIR}/AppAuth/AppAuthCore_Privacy.bundle",
|
|
||||||
"${PODS_CONFIGURATION_BUILD_DIR}/BoringSSL-GRPC/openssl_grpc.bundle",
|
"${PODS_CONFIGURATION_BUILD_DIR}/BoringSSL-GRPC/openssl_grpc.bundle",
|
||||||
"${PODS_CONFIGURATION_BUILD_DIR}/EXApplication/ExpoApplication_privacy.bundle",
|
"${PODS_CONFIGURATION_BUILD_DIR}/EXApplication/ExpoApplication_privacy.bundle",
|
||||||
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
|
"${PODS_CONFIGURATION_BUILD_DIR}/EXConstants/EXConstants.bundle",
|
||||||
@ -350,7 +349,6 @@
|
|||||||
);
|
);
|
||||||
name = "[CP] Copy Pods Resources";
|
name = "[CP] Copy Pods Resources";
|
||||||
outputPaths = (
|
outputPaths = (
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/AppAuthCore_Privacy.bundle",
|
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/openssl_grpc.bundle",
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/openssl_grpc.bundle",
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoApplication_privacy.bundle",
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/ExpoApplication_privacy.bundle",
|
||||||
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
|
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/EXConstants.bundle",
|
||||||
@ -459,7 +457,7 @@
|
|||||||
);
|
);
|
||||||
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
|
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.cally.app;
|
PRODUCT_BUNDLE_IDENTIFIER = com.cally.app;
|
||||||
PRODUCT_NAME = "Cally";
|
PRODUCT_NAME = Cally;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Cally/Cally-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Cally/Cally-Bridging-Header.h";
|
||||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
@ -490,7 +488,7 @@
|
|||||||
);
|
);
|
||||||
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
|
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
|
||||||
PRODUCT_BUNDLE_IDENTIFIER = com.cally.app;
|
PRODUCT_BUNDLE_IDENTIFIER = com.cally.app;
|
||||||
PRODUCT_NAME = "Cally";
|
PRODUCT_NAME = Cally;
|
||||||
SWIFT_OBJC_BRIDGING_HEADER = "Cally/Cally-Bridging-Header.h";
|
SWIFT_OBJC_BRIDGING_HEADER = "Cally/Cally-Bridging-Header.h";
|
||||||
SWIFT_VERSION = 5.0;
|
SWIFT_VERSION = 5.0;
|
||||||
TARGETED_DEVICE_FAMILY = "1,2";
|
TARGETED_DEVICE_FAMILY = "1,2";
|
||||||
|
589
ios/Podfile.lock
589
ios/Podfile.lock
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user