325246826a
- Add CaldavService with tsdav/ical.js for CalDAV server communication - Add CaldavController, CaldavRepository, and caldav routes - Add client-side CaldavConfigService with sync(), config CRUD - Add CalDAV settings UI with config load/save in settings screen - Sync on login, auto-login (AuthGuard), periodic timer (calendar), and sync button - Push single events to CalDAV on server-side create/update/delete - Push all events to CalDAV after chat event confirmation - Refactor ChatService to use EventService instead of direct EventRepository - Rename CalDav/calDav to Caldav/caldav for consistent naming - Add Radicale Docker setup for local CalDAV testing - Update PlantUML diagrams and CLAUDE.md with CalDAV architecture
39 lines
1008 B
TypeScript
39 lines
1008 B
TypeScript
import { Pressable, Text } from "react-native";
|
|
import { useThemeStore } from "../stores/ThemeStore";
|
|
import { ReactNode } from "react";
|
|
|
|
export type BaseButtonProps = {
|
|
children?: ReactNode;
|
|
className?: string;
|
|
onPress: () => void;
|
|
solid?: boolean;
|
|
};
|
|
|
|
const BaseButton = ({ className, children, onPress, solid = false }: BaseButtonProps) => {
|
|
const { theme } = useThemeStore();
|
|
return (
|
|
<Pressable
|
|
className={`rounded-lg p-4 mb-4 border-4 ${className}`}
|
|
onPress={onPress}
|
|
style={{
|
|
borderColor: theme.borderPrimary,
|
|
backgroundColor: solid ? theme.chatBot : theme.primeBg,
|
|
shadowColor: theme.shadowColor,
|
|
shadowOffset: { width: 0, height: 2 },
|
|
shadowOpacity: 0.25,
|
|
shadowRadius: 3.84,
|
|
elevation: 5,
|
|
}}
|
|
>
|
|
<Text
|
|
className="text-center font-semibold text-lg"
|
|
style={{ color: theme.buttonText }}
|
|
>
|
|
{children}
|
|
</Text>
|
|
</Pressable>
|
|
);
|
|
};
|
|
|
|
export default BaseButton;
|