diff --git a/app/(tabs)/_layout.tsx b/app/(tabs)/_layout.tsx index aa80758..e3d8560 100644 --- a/app/(tabs)/_layout.tsx +++ b/app/(tabs)/_layout.tsx @@ -21,14 +21,6 @@ export default function TabLayout() { ), }} /> - ( - - ), - }} - /> + ( + + ), + }} + /> ); } diff --git a/app/(tabs)/profile.tsx b/app/(tabs)/profile.tsx index e30bb3b..249d9a8 100644 --- a/app/(tabs)/profile.tsx +++ b/app/(tabs)/profile.tsx @@ -1,27 +1,53 @@ +import AppBar from '@/elements/AppBar'; import LanguageSelector from '@/elements/LanguageSelector'; -import { ProfileView } from '@/elements/user/ProfileView'; +import { Link } from 'expo-router'; import { useTranslation } from 'react-i18next'; -import { Divider, Surface, Text, useTheme } from 'react-native-paper'; +import { View } from 'react-native'; +import { Surface, Text, useTheme } from 'react-native-paper'; +import { useSafeAreaInsets } from 'react-native-safe-area-context'; export default function HomeScreen() { const { t } = useTranslation(); const theme = useTheme(); + const insets = useSafeAreaInsets(); + return ( - - {t('home')} - - - - + + + + + + {t('working-on-this')} + + + {t('meanwhile')} + + + + + {/** */} + ); } diff --git a/app/_layout.tsx b/app/_layout.tsx index d25f9bf..6ac37a5 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -1,12 +1,14 @@ +import { TabBarIcon } from '@/components'; import { GlobalStateProvider } from '@/hooks/providers/GlobalStateProvider'; import Locales from '@/locales'; import { Themes } from '@/styles'; import { useFonts } from 'expo-font'; -import { Stack } from 'expo-router'; +import { Stack, router } from 'expo-router'; import * as SplashScreen from 'expo-splash-screen'; import i18n from 'i18next'; import { useEffect } from 'react'; -import { initReactI18next } from 'react-i18next'; +import { initReactI18next, useTranslation } from 'react-i18next'; +import { Platform } from 'react-native'; import { PaperProvider } from 'react-native-paper'; import 'react-native-reanimated'; import { SafeAreaProvider } from 'react-native-safe-area-context'; @@ -32,6 +34,8 @@ export default function RootLayout() { Roboto: require('../assets/fonts/Roboto-Regular.ttf'), }); + const { t } = useTranslation(); + useEffect(() => { if (loaded) { SplashScreen.hideAsync(); @@ -49,6 +53,27 @@ export default function RootLayout() { + + ( + router.canGoBack() && router.back()} + /> + ), + }} + /> diff --git a/app/credits.tsx b/app/credits.tsx new file mode 100644 index 0000000..fdaecdc --- /dev/null +++ b/app/credits.tsx @@ -0,0 +1,91 @@ +import { useTranslation } from 'react-i18next'; +import { ImageBackground, View } from 'react-native'; +import { ScrollView } from 'react-native'; +import { Text, useTheme } from 'react-native-paper'; + +export default function Credits() { + const theme = useTheme(); + const { t } = useTranslation(); + return ( + + + + + + {t('testausserveri-credits')} + + {t('project-management')} + + + + + Samu Kupiainen + + + {t('devteam')} + + + Luukas Pörtfors + Otto Laakkonen + Eero Salla + Onni Linnala + Anto Keinänen + Samu Kupiainen + + + {t('some-great-administrative-work')} + + + Mikael Hannolainen + + + ); +} diff --git a/assets/images/ASSEMBLY_Logo_White_TightCrop.png b/assets/images/ASSEMBLY_Logo_White_TightCrop.png new file mode 100644 index 0000000..ca9966c Binary files /dev/null and b/assets/images/ASSEMBLY_Logo_White_TightCrop.png differ diff --git a/assets/images/TSRY_Hero.png b/assets/images/TSRY_Hero.png new file mode 100644 index 0000000..8655088 Binary files /dev/null and b/assets/images/TSRY_Hero.png differ diff --git a/assets/images/haze.png b/assets/images/haze.png new file mode 100644 index 0000000..5caf358 Binary files /dev/null and b/assets/images/haze.png differ diff --git a/elements/map/EventMap.tsx b/elements/map/EventMap.tsx index 54c91ee..3886668 100644 --- a/elements/map/EventMap.tsx +++ b/elements/map/EventMap.tsx @@ -7,7 +7,7 @@ function EventMap() { maxZoom={2.5} minZoom={0.5} zoomStep={0.5} - initialZoom={1} + initialZoom={0.5} bindToBorders={true} style={{ width: 'fit-content', diff --git a/elements/user/ProfileView.tsx b/elements/user/ProfileView.tsx index d2766f7..e2f488a 100644 --- a/elements/user/ProfileView.tsx +++ b/elements/user/ProfileView.tsx @@ -3,6 +3,7 @@ import { loginRequest, signupRequest } from '@/api/userService'; import { useGlobalState } from '@/hooks/providers/GlobalStateProvider'; import { useState } from 'react'; import { useTranslation } from 'react-i18next'; +import { View } from 'react-native'; import { Button, Portal, Snackbar, Surface, Text, TextInput, useTheme } from 'react-native-paper'; export function ProfileView() { @@ -28,7 +29,7 @@ export function ProfileView() { return ( {login ? ( <> @@ -51,7 +52,15 @@ export function ProfileView() { ) : ( - <> + + {t('sign-in')} {t(errorText)} - + )} ); diff --git a/hooks/providers/GlobalStateProvider.tsx b/hooks/providers/GlobalStateProvider.tsx index 9e397bf..50ee85d 100644 --- a/hooks/providers/GlobalStateProvider.tsx +++ b/hooks/providers/GlobalStateProvider.tsx @@ -1,5 +1,5 @@ import { ProfileData } from '@/api/userService'; -import { PropsWithChildren, createContext, useContext, useState } from 'react'; +import { PropsWithChildren, createContext, useContext, useEffect, useState } from 'react'; export type Login = { token: string; @@ -23,6 +23,8 @@ export function useGlobalState() { export function GlobalStateProvider({ children }: PropsWithChildren) { const [state, setState] = useState({}); + useEffect(() => {}, []); + const context = { state, signin(login: Login) { diff --git a/locales/en.ts b/locales/en.ts index ecd4e31..2efdeaf 100644 --- a/locales/en.ts +++ b/locales/en.ts @@ -24,5 +24,16 @@ export default { 'empty-fields': 'Please fill in all fields', 'email-exists': 'Email already exists', 'invalid-credentials': 'Invalid credentials', + profile: 'Profile', + 'working-on-this': + 'Hi! We are still working on the app. There are bunch of cool features coming to the app that are currently available on the web site. There are a lot of even cooler people that are putting in voluntary hours on your user experience. Hope you understand that creating awesome things take time and still find the app useful. Have a great event!', + meanwhile: + 'Meanwhile, why not check out the team that almost magically have put this app together!', + 'testausserveri-credits': + 'Volunteers of "Testausserveri Ry" have put in the work to make this happen. Thank you!', + 'project-management': 'Project Management', + devteam: 'Development Team', + 'some-great-administrative-work': 'Some great administrative work', + credits: 'Credits', }, }; diff --git a/locales/fi.ts b/locales/fi.ts index 8a32ab0..9ba3762 100644 --- a/locales/fi.ts +++ b/locales/fi.ts @@ -24,5 +24,16 @@ export default { 'empty-fields': 'Täytä kaikki kentät', 'email-exists': 'Sähköposti on jo käytössä', 'invalid-credentials': 'Virheelliset tunnistetiedot', + profile: 'Profiili', + 'working-on-this': + 'Hei! Työstämme sovellusta edelleen. Sovellukseen on tulossa paljon uusia hienoja ominaisuuksia, jotka ovat tällä hetkellä saatavilla verkkosivuilla. Vielä hienompaa, kuin tulevat ominaisuudet, ovat vapaaehtoiset velhot, jotka käyttävät paljon tunteja käyttäjäkokemuksesi eteen. Toivottavasti ymmärrät, että upeiden asioiden luominen vie aikaa ja läydät sovelluksesta silti hyötyä. Mahtavaa tapahtumaa!', + meanwhile: + 'Sillä välin, mikset kävisi vilkisemasssa tiimiä, joka kuin taikasauvalla, on tämän sovelluksen koonnut!', + 'testausserveri-credits': + 'Testausserveri Ry:n vapaaehtoiset ovat mahdollistaneet sovelluksen syntymisen. Kiitos!', + 'project-management': 'Projektin hallinta', + devteam: 'Kehitystiimi', + 'some-great-administrative-work': 'Hienoa hallinnollista työtä', + credits: 'Kiitokset', }, };