mirror of
https://github.com/urosran/cally.git
synced 2025-11-26 00:24:53 +00:00
ui fixes and tweaks
This commit is contained in:
@ -14,6 +14,8 @@ export default function Screen() {
|
||||
const [refreshing, setRefreshing] = useState(false);
|
||||
const [shouldRefresh, setShouldRefresh] = useAtom(refreshTriggerAtom);
|
||||
|
||||
const isTablet: boolean = Device.deviceType === DeviceType.TABLET;
|
||||
|
||||
const {
|
||||
isConnectedToGoogle,
|
||||
isConnectedToMicrosoft,
|
||||
@ -48,7 +50,7 @@ export default function Screen() {
|
||||
|
||||
return (
|
||||
<View style={{ flex: 1 }}>
|
||||
<View style={{ flex: 1, zIndex: -2 }}>
|
||||
<View style={{ flex: 1, zIndex: 0 }}>
|
||||
{Device.deviceType === DeviceType.TABLET ? (
|
||||
<TabletCalendarPage />
|
||||
) : (
|
||||
@ -60,14 +62,17 @@ export default function Screen() {
|
||||
style={{
|
||||
position: "absolute",
|
||||
top: 0,
|
||||
left: Device.deviceType === DeviceType.TABLET ? "15%" : 0,
|
||||
right: Device.deviceType === DeviceType.TABLET ? "25%" : 0,
|
||||
height: Device.deviceType === DeviceType.TABLET ? "9%" : "12%",
|
||||
width: Device.deviceType === DeviceType.TABLET ? "62%" : "100%",
|
||||
zIndex: 100,
|
||||
left: isTablet ? "15%" : "0",
|
||||
height: isTablet ? "9%" : "4%",
|
||||
width: isTablet ? "62%" : "100%",
|
||||
zIndex: 50,
|
||||
backgroundColor: "transparent",
|
||||
}}
|
||||
contentContainerStyle={{ flex: 1 }}
|
||||
contentContainerStyle={{
|
||||
flex: 1,
|
||||
justifyContent: "center",
|
||||
paddingRight: 200,
|
||||
}}
|
||||
refreshControl={
|
||||
<RefreshControl
|
||||
colors={[
|
||||
@ -81,6 +86,14 @@ export default function Screen() {
|
||||
progressBackgroundColor={"white"}
|
||||
refreshing={refreshing || isSyncing}
|
||||
onRefresh={onRefresh}
|
||||
style={{
|
||||
position: "absolute",
|
||||
left: "50%", // Position at screen center
|
||||
transform: [
|
||||
// Offset by half its own width
|
||||
{ translateX: -20 }, // Assuming the refresh control is ~40px wide
|
||||
],
|
||||
}}
|
||||
/>
|
||||
}
|
||||
bounces={true}
|
||||
|
||||
Reference in New Issue
Block a user