import * as Notifications from 'expo-notifications'; import { StatusBar } from 'expo-status-bar'; import React, { useEffect, useState } from "react"; import { Alert, Platform, StyleSheet, Text, TextInput, TouchableOpacity, View } from "react-native"; const PRIMARY = '#A24BFA'; const BG = '#0c0a0a'; Notifications.setNotificationHandler({ handleNotification: async () => ({ shouldShowBanner: true, shouldShowList: true, shouldPlaySound: false, shouldSetBadge: false, }) }); async function registerForPushNotificationsAsync() { const { status: existingStatus } = await Notifications.getPermissionsAsync(); let finalStatus = existingStatus; if (existingStatus !== 'granted') { const { status } = await Notifications.requestPermissionsAsync(); finalStatus = status; } if (finalStatus !== 'granted') { Alert.alert('Permission for notifications not granted!'); return false; } return true; } async function sendNotification() { try { const id = await Notifications.scheduleNotificationAsync({ content: { title: "Hello!", body: "Ez egy értesítés példája.", }, trigger: Platform.OS === 'android' ? ({ seconds: 1, repeats: false } as any) : null, }); Alert.alert('Notification scheduled!', `ID: ${id}`); } catch (e) { Alert.alert('Hiba történt!', String(e)); } } export default function Index() { const [username, setUsername] = useState(""); const [password, setPassword] = useState(""); useEffect(() => { registerForPushNotificationsAsync(); }, []); return ( ANGELIC{"\n"}MC Üdv újra Jelentkezz be a fiókodba Felhasználónév Jelszó Elfelejtetted? Bejelentkezés Nincs még fiókod? Regisztrálj most! ); } export const options = { headerShown: false, }; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: BG, justifyContent: 'center', alignItems: 'center', }, card: { width: '90%', maxWidth: 400, backgroundColor: 'rgba(24, 20, 28, 0.95)', borderRadius: 24, padding: 32, shadowColor: '#000', shadowOpacity: 0.3, shadowRadius: 24, shadowOffset: { width: 0, height: 8 }, elevation: 8, }, logoText: { color: PRIMARY, fontWeight: 'bold', fontSize: 28, textAlign: 'center', letterSpacing: 2, marginBottom: 4, }, title: { color: '#fff', fontWeight: 'bold', fontSize: 28, textAlign: 'center', marginBottom: 4, }, subtitle: { color: '#bdbdbd', fontSize: 16, textAlign: 'center', marginBottom: 8, }, label: { color: '#bdbdbd', fontSize: 14, marginBottom: 4, }, input: { backgroundColor: 'rgba(20,18,24,1)', borderColor: PRIMARY, borderWidth: 1, borderRadius: 12, color: '#fff', paddingHorizontal: 16, paddingVertical: 12, fontSize: 16, }, forgot: { color: PRIMARY, fontSize: 14, fontWeight: '500', }, button: { backgroundColor: PRIMARY, borderRadius: 12, paddingVertical: 14, alignItems: 'center', marginTop: 8, shadowColor: PRIMARY, shadowOpacity: 0.3, shadowRadius: 8, shadowOffset: { width: 0, height: 2 }, elevation: 2, }, buttonText: { color: '#fff', fontWeight: 'bold', fontSize: 18, }, bottomText: { color: '#bdbdbd', fontSize: 15, }, register: { color: PRIMARY, fontWeight: 'bold', fontSize: 15, }, });