Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions .expo-shared/README.md

This file was deleted.

1 change: 0 additions & 1 deletion .expo-shared/assets.json

This file was deleted.

143 changes: 143 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
name: ci
on:
push:
branches:
- master
pull_request:
branches:
- master
env:
EAS_PROJECT_ID: ${{ vars.EAS_PROJECT_ID }}
EXPO_OWNER: ${{ vars.EXPO_OWNER }}
jobs:
prebuild:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
cache: yarn
- run: yarn install
- run: yarn doctor
env:
# todo: `yarn doctor` - look into warnings that were found when validating dependencies against React Native Directory (@likashefqet/react-native-image-zoom, etc...)
EXPO_DOCTOR_ENABLE_DIRECTORY_CHECK: false
- run: yarn tsc
- run: yarn expo prebuild
- run: yarn expo export
- uses: actions/upload-pages-artifact@v3
with:
name: dist
path: dist
retention-days: 0
build:
needs: prebuild
runs-on: ${{ matrix.run-on }}
name: build-${{ matrix.extension }}
continue-on-error: true
strategy:
matrix:
include:
- platform: android
profile: production
extension: aab
run-on: ubuntu-latest
- platform: android
profile: preview # builds apk instead of aab
extension: apk
run-on: ubuntu-latest
- platform: ios
profile: production
extension: ipa
run-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
cache: yarn
- uses: expo/expo-github-action@v8
with:
eas-version: latest
expo-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: yarn install
- if: matrix.extension == 'apk'
run: yarn f-droid
- run: >-
yarn eas build --local --non-interactive
--output Alovoa.${{ matrix.extension }}
--platform ${{ matrix.platform }}
--profile ${{ matrix.profile }}
- uses: actions/upload-artifact@v4
with:
name: Alovoa.${{ matrix.extension }}
path: Alovoa.${{ matrix.extension }}
verify-artifacts:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: Alovoa.aab
- uses: actions/download-artifact@v4
with:
name: Alovoa.apk
- uses: actions/download-artifact@v4
with:
name: Alovoa.ipa
- uses: actions/download-artifact@v4
with:
name: dist
- run: >- # upload-pages-artifact archives dist to artifact.tar
mkdir dist &&
tar -xvf artifact.tar -C dist &&
file Alovoa.* &&
ls -lah
expo-application-services:
needs: verify-artifacts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: latest
cache: yarn
- uses: expo/expo-github-action@v8
with:
eas-version: latest
expo-version: latest
token: ${{ secrets.EXPO_TOKEN }}
- run: yarn install
- if: github.event_name == 'pull_request'
uses: expo/expo-github-action/preview@v8
with:
command: eas update --auto --branch ${{ github.event.pull_request.head.ref }}
qr-target: expo-go
- if: github.ref_name == github.event.repository.default_branch
run: |
if git diff --name-only HEAD | grep -E 'app.json|package.json'; then
yarn eas build --platform all --non-interactive --no-wait
# todo: configure and run eas submit to publish new versions
# yarn eas submit --platform all --latest --non-interactive --verbose --verbose-fastlane
else
yarn eas update --auto --non-interactive
fi
deploy-github-pages:
if: github.ref_name == github.event.repository.default_branch
needs: verify-artifacts
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/configure-pages@v5
- id: deployment
uses: actions/deploy-pages@v4
with:
artifact_name: dist
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.aab
*.apk
*.hmap
*.ipa
*.xcuserstate
Expand Down Expand Up @@ -74,6 +76,8 @@ buck-out/

# Expo
.expo/
credentials.json
credentials/
web-build/
dist/

Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
EXPO_DOCTOR_ENABLE_DIRECTORY_CHECK=false yarn doctor
43 changes: 21 additions & 22 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import { Login, Register, Onboarding, Main, Profile, MessageDetail, PasswordReset } from "./screens";
import Main from "./screens/Main";
import { Login, Register, Onboarding, Profile, MessageDetail, PasswordReset } from "./screens";
import * as SplashScreen from 'expo-splash-screen';
import * as WebBrowser from 'expo-web-browser';
import { NavigationContainer } from "@react-navigation/native";
Expand All @@ -9,7 +10,7 @@ import { LogBox, useColorScheme } from 'react-native';
import { MD3LightTheme, MD3DarkTheme, Provider as PaperProvider, configureFonts } from 'react-native-paper';
import { DefaultTheme, DarkTheme } from '@react-navigation/native';
import { StatusBar } from 'expo-status-bar';
import { Pictures, ProfileSettings, SearchSettings, Settings, Prompts, AdvancedSettings } from "./screens/profile";
import { Pictures, ProfileSettings, SearchSettings, Settings, Prompts, AdvancedSettings } from "./screens/profile/index";
import * as ScreenOrientation from 'expo-screen-orientation';
import * as Device from 'expo-device';
import { ThemeProp } from "react-native-paper/lib/typescript/types";
Expand All @@ -19,23 +20,21 @@ import {
useFonts, Montserrat_400Regular, Montserrat_500Medium, Montserrat_500Medium_Italic,
Montserrat_600SemiBold, Montserrat_700Bold, Montserrat_700Bold_Italic
} from '@expo-google-fonts/montserrat';
import { TransitionSpec } from "@react-navigation/stack/lib/typescript/src/types";
import { enGB, en, de, registerTranslation } from 'react-native-paper-dates'
import { TransitionSpec } from "@react-navigation/stack/src/types";
import { enGB, en, es, de, registerTranslation } from 'react-native-paper-dates'
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { RootStackParamList } from "./types";

LogBox.ignoreAllLogs();
SplashScreen.preventAutoHideAsync();
setTimeout(SplashScreen.hideAsync, 1000)
WebBrowser.maybeCompleteAuthSession();
const Stack = createStackNavigator();
const Stack = createStackNavigator<RootStackParamList>();
registerTranslation('en-GB', enGB);
registerTranslation('en', en);
registerTranslation('es', es);
registerTranslation('de', de);

//TEST
//const RCTNetworking = require('react-native/Libraries/Network/RCTNetworking');
//RCTNetworking.clearCookies(() => { });

export default function App() {

const i18n = I18N.getI18n();
Expand Down Expand Up @@ -168,7 +167,7 @@ export default function App() {
<Stack.Screen
name="Login"
options={{
headerShown: false, animationEnabled: true, transitionSpec: {
headerShown: false, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -179,7 +178,7 @@ export default function App() {
name="Register"
options={{
title: i18n.t('register.title'),
headerShown: true, animationEnabled: true, transitionSpec: {
headerShown: true, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -189,7 +188,7 @@ export default function App() {
<Stack.Screen
name="Onboarding"
options={{
headerShown: false, animationEnabled: true, transitionSpec: {
headerShown: false, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -199,7 +198,7 @@ export default function App() {
<Stack.Screen
name="Main"
options={{
headerShown: false, animationEnabled: true, transitionSpec: {
headerShown: false, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -209,7 +208,7 @@ export default function App() {
<Stack.Screen
name="Profile"
options={{
headerShown: false, animationEnabled: true, transitionSpec: {
headerShown: false, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -219,7 +218,7 @@ export default function App() {
<Stack.Screen
name="MessageDetail"
options={{
headerShown: true, animationEnabled: true, transitionSpec: {
headerShown: true, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -230,7 +229,7 @@ export default function App() {
name={Global.SCREEN_PROFILE_PICTURES}
options={{
title: i18n.t('profile.screen.pictures'),
headerShown: true, animationEnabled: true, transitionSpec: {
headerShown: true, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -241,7 +240,7 @@ export default function App() {
name={Global.SCREEN_PROFILE_PROFILESETTINGS}
options={{
title: i18n.t('profile.screen.profile'),
headerShown: true, animationEnabled: true, transitionSpec: {
headerShown: true, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -252,7 +251,7 @@ export default function App() {
name={Global.SCREEN_PROFILE_SEARCHSETTINGS}
options={{
title: i18n.t('profile.screen.search'),
headerShown: true, animationEnabled: true, transitionSpec: {
headerShown: true, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -263,7 +262,7 @@ export default function App() {
name={Global.SCREEN_PROFILE_SETTINGS}
options={{
title: i18n.t('profile.screen.settings'),
headerShown: true, animationEnabled: true, transitionSpec: {
headerShown: true, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -274,7 +273,7 @@ export default function App() {
name={Global.SCREEN_PROFILE_ADVANCED_SETTINGS}
options={{
title: i18n.t('profile.screen.advanced-settings'),
headerShown: true, animationEnabled: true, transitionSpec: {
headerShown: true, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -284,7 +283,7 @@ export default function App() {
<Stack.Screen
name="PasswordReset"
options={{
headerShown: true, animationEnabled: true, transitionSpec: {
headerShown: true, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand All @@ -295,7 +294,7 @@ export default function App() {
name="Profile.Prompts"
options={{
title: i18n.t('profile.screen.prompts'),
headerShown: true, animationEnabled: true, transitionSpec: {
headerShown: true, animation: 'default', transitionSpec: {
open: config,
close: config,
},
Expand Down
9 changes: 5 additions & 4 deletions Global.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as SecureStore from 'expo-secure-store';
import AsyncStorage from '@react-native-async-storage/async-storage';
import * as URL from "./URL";
import { createNavigationContainerRef, CommonActions } from '@react-navigation/native';
import { ConversationDto, UserDto } from "./types";
import { ConversationDto, RootStackParamList, UserDto } from "./types";
import Toast from 'react-native-toast-message';
import * as ImagePicker from 'expo-image-picker';
import * as ImageManipulator from 'expo-image-manipulator';
Expand All @@ -14,9 +14,10 @@ import FormData from "form-data";
import { Buffer } from "buffer";
import { cloneDeep } from 'lodash';

export const FLAG_FDROID = true;
export const FLAG_FDROID = false; // updated by f-droid.sh
export const FLAG_ENABLE_DONATION = !FLAG_FDROID;

export const navigationRef = createNavigationContainerRef()
export const navigationRef = createNavigationContainerRef<RootStackParamList>()
export const INDEX_LOGIN = "0"
export const INDEX_REGISTER = "1"
export const INDEX_ONBOARDING = "2"
Expand Down Expand Up @@ -192,7 +193,7 @@ export function calcAge(dob: Date | undefined): number {

export async function pickImage(): Promise<string | null | undefined> {
let result = await ImagePicker.launchImageLibraryAsync({
mediaTypes: ImagePicker.MediaTypeOptions.Images,
mediaTypes: 'images',
allowsEditing: true,
aspect: [1, 1],
quality: 1,
Expand Down
Loading